Dash
Items
Angepasstes JavaScript
Speichern
Abbrechen
(function () { const HC_CLASS = 'hc'; const KEY = 'hc_enabled'; if (localStorage.getItem(KEY) === '1') { document.body.classList.add(HC_CLASS); } const btn = document.createElement('button'); btn.id = 'hc-toggle'; btn.type = 'button'; const on = document.body.classList.contains(HC_CLASS); btn.textContent = on ? 'HC: ON' : 'HC: OFF'; btn.title = 'High-Contrast umschalten'; btn.setAttribute('aria-label', 'High-Contrast umschalten'); Object.assign(btn.style, { position: 'fixed', top: '14px', right: '14px', zIndex: 99999, padding: '10px 14px', borderRadius: '12px', border: '1px solid rgba(107,229,255,.35)', background: 'linear-gradient(180deg, rgba(0,215,255,.18), rgba(0,215,255,.10))', color: '#e6f0ff', boxShadow: '0 10px 30px rgba(0,0,0,.35), 0 0 22px rgba(0,215,255,.25)', cursor: 'pointer', backdropFilter: 'saturate(120%) blur(6px)', userSelect: 'none', font: '600 14px ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto' }); btn.addEventListener('mouseenter', () => { btn.style.borderColor = 'rgba(0,215,255,.6)'; btn.style.boxShadow = '0 10px 30px rgba(0,0,0,.35), 0 0 30px rgba(0,215,255,.38)'; }); btn.addEventListener('mouseleave', () => { btn.style.borderColor = 'rgba(107,229,255,.35)'; btn.style.boxShadow = '0 10px 30px rgba(0,0,0,.35), 0 0 22px rgba(0,215,255,.25)'; }); btn.onclick = () => { document.body.classList.toggle(HC_CLASS); const state = document.body.classList.contains(HC_CLASS); localStorage.setItem(KEY, state ? '1' : ''); btn.textContent = state ? 'HC: ON' : 'HC: OFF'; btn.setAttribute('aria-pressed', state ? 'true' : 'false'); }; document.body.appendChild(btn); })();
Home Dashboard
Nutzer
Anwendungsliste
Tags Liste
Einstellungen