diff --git a/app/index.php b/app/index.php
index 2b20526..aa236f8 100644
--- a/app/index.php
+++ b/app/index.php
@@ -566,18 +566,10 @@ textarea.code:focus { border-color: var(--accent); }
-
-
- — required for KonCad to reach Caddy
-
+ placeholder="# Global options
email admin@example.com
admin :2019">
@@ -621,7 +613,7 @@ async function init() {
if (!d.ok) throw new Error(d.error);
document.getElementById('global-editor').value = d.data.global;
sites = d.data.sites;
- syncAdminToggle();
+
renderSites();
try {
@@ -827,25 +819,6 @@ function togglePanel(id) {
chev.classList.toggle('open', !open);
}
-// ─── Admin toggle ─────────────────────────────────────────────────────────────
-function syncAdminToggle() {
- const val = document.getElementById('global-editor').value;
- const enabled = /^\s*admin(?!\s+off)\b/m.test(val);
- document.getElementById('admin-toggle').checked = enabled;
- document.getElementById('admin-badge').style.display = enabled ? '' : 'none';
-}
-
-function toggleAdmin(enable) {
- const ta = document.getElementById('global-editor');
- if (enable) {
- if (!/^\s*admin(?!\s+off)\b/m.test(ta.value)) {
- ta.value = (ta.value.trimEnd() ? ta.value.trimEnd() + '\n' : '') + ' admin :2019\n';
- }
- } else {
- ta.value = ta.value.replace(/^[ \t]*admin\b.*\n?/mg, '');
- }
- syncAdminToggle();
-}
// ─── Modal ────────────────────────────────────────────────────────────────────
function showModal(unreachable) {
@@ -907,7 +880,7 @@ function handleTab(e) {
}
document.addEventListener('DOMContentLoaded', () => {
- document.getElementById('global-editor').addEventListener('input', syncAdminToggle);
+
init();
});