This commit is contained in:
binwiederhier
2026-03-14 14:21:09 -04:00
parent 2bf8f6271b
commit 22868f4742

View File

@@ -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