Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

may not exist yet at first apply(), but as soon as the // parser appends it we want the legacy class bridge in place so any // CSS keyed on `.quarto-dark` paints correctly on first render. if (!document.body) { var earlyObserver = new MutationObserver(function () { if (document.body) { apply(preferredScheme()); earlyObserver.disconnect(); } }); earlyObserver.observe(document.documentElement, { childList: true }); } // Quarto's toggle updates localStorage but not , so wrap it to // mirror the new value onto data-bs-theme; otherwise clicking the toggle // leaves CSS keyed off [data-bs-theme="dark"] rendering against the wrong // stylesheet until the next reload. function syncFromStorage() { try { var n = normalize(window.localStorage.getItem(STORAGE_KEY)); if (n) apply(n); } catch (e) {} } function wrapToggle() { var orig = window.quartoToggleColorScheme; if (typeof orig !== 'function' || orig.__mlsbWrapped) return; var wrapped = function () { var r = orig.apply(this, arguments); syncFromStorage(); return r; }; wrapped.__mlsbWrapped = true; window.quartoToggleColorScheme = wrapped; } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { wrapToggle(); syncFromStorage(); }); } else { wrapToggle(); syncFromStorage(); } // Defend the legacy `.quarto-dark` body class against Quarto's own // `toggleBodyColor(mode)`, which runs *after* this script and re-asserts // the body class based on `mode` — and `mode` defaults to 'light' when // there's no stored quarto-color-scheme value, even when the OS / first // paint already resolved to dark via `data-bs-theme`. Without this // observer, on every fresh visit Quarto would clobber our bridge and // restore `.quarto-light`, leaving `.quarto-dark`-keyed CSS variables // (about/community/newsletter pages) at their light-mode defaults // against the dark `data-bs-theme="dark"` background. function bridgeBody() { var body = document.body; if (!body) return; var wantDark = document.documentElement.getAttribute('data-bs-theme') === 'dark'; if (wantDark && !body.classList.contains('quarto-dark')) { body.classList.add('quarto-dark'); body.classList.remove('quarto-light'); } else if (!wantDark && body.classList.contains('quarto-dark')) { body.classList.remove('quarto-dark'); body.classList.add('quarto-light'); } } function watchBody() { if (!document.body) return; bridgeBody(); var bodyObs = new MutationObserver(bridgeBody); bodyObs.observe(document.body, { attributes: true, attributeFilter: ['class'] }); var htmlObs = new MutationObserver(bridgeBody); htmlObs.observe(document.documentElement, { attributes: true, attributeFilter: ['data-bs-theme'] }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', watchBody); } else { watchBody(); } window.addEventListener('storage', function (ev) { if (ev.key !== STORAGE_KEY) return; var n = normalize(ev.newValue); if (n) apply(n); }); if (window.matchMedia) { try { window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function (ev) { try { if (window.localStorage.getItem(STORAGE_KEY)) return; } catch (e) {} apply(ev.matches ? 'dark' : 'light'); }); } catch (e) {} } })();