mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-16 00:17:56 +00:00
Merge branch 'config-generator'
This commit is contained in:
Vendored
+3
-9
@@ -1034,10 +1034,7 @@
|
|||||||
// Re-prefill base-url
|
// Re-prefill base-url
|
||||||
const baseUrlInput = modal.querySelector("[data-key=\"base-url\"]");
|
const baseUrlInput = modal.querySelector("[data-key=\"base-url\"]");
|
||||||
if (baseUrlInput) {
|
if (baseUrlInput) {
|
||||||
const host = window.location.hostname;
|
baseUrlInput.value = "https://ntfy.example.com";
|
||||||
if (host && !host.includes("ntfy.sh")) {
|
|
||||||
baseUrlInput.value = "https://ntfy.example.com";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Reset to General tab
|
// Reset to General tab
|
||||||
switchPanel(modal, "cg-panel-general");
|
switchPanel(modal, "cg-panel-general");
|
||||||
@@ -1322,13 +1319,10 @@
|
|||||||
setupFormListeners(els);
|
setupFormListeners(els);
|
||||||
setupWebPushEvents(els);
|
setupWebPushEvents(els);
|
||||||
|
|
||||||
// Pre-fill base-url if not on ntfy.sh
|
// Pre-fill base-url
|
||||||
const baseUrlInput = modal.querySelector("[data-key=\"base-url\"]");
|
const baseUrlInput = modal.querySelector("[data-key=\"base-url\"]");
|
||||||
if (baseUrlInput && !baseUrlInput.value.trim()) {
|
if (baseUrlInput && !baseUrlInput.value.trim()) {
|
||||||
const host = window.location.hostname;
|
baseUrlInput.value = "https://ntfy.example.com";
|
||||||
if (host && !host.includes("ntfy.sh")) {
|
|
||||||
baseUrlInput.value = "https://ntfy.example.com";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-open if URL hash points to config generator
|
// Auto-open if URL hash points to config generator
|
||||||
|
|||||||
Reference in New Issue
Block a user