mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-03-18 21:30:44 +01:00
Derp
This commit is contained in:
12
docs/static/js/config-generator.js
vendored
12
docs/static/js/config-generator.js
vendored
@@ -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