// Erişilebilirlik widget'ı — Teknik Atölye Mersin (klimacimersin.com) (function(){ var css = [ '#acc-btn{position:fixed;bottom:20px;left:20px;z-index:999999;width:52px;height:52px;border-radius:50%;background:#1a1a2e;color:#fff;border:2px solid #e67e22;font-size:24px;cursor:pointer;box-shadow:0 2px 14px rgba(0,0,0,.35);line-height:1}', '#acc-btn:hover{background:#e67e22}', '#acc-btn:focus-visible{outline:3px solid #e67e22;outline-offset:2px}', '#acc-panel{position:fixed;bottom:80px;left:20px;z-index:999999;background:#fff;border:1px solid #d0d7de;border-radius:10px;width:250px;padding:12px;display:none;box-shadow:0 8px 30px rgba(0,0,0,.3);font-family:system-ui,Arial,sans-serif;text-align:left}', '#acc-panel.open{display:block}', '#acc-panel .acc-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}', '#acc-panel .acc-head strong{font-size:15px;color:#1a1a2e}', '#acc-panel .acc-x{border:none;background:none;font-size:20px;cursor:pointer;color:#666;line-height:1;padding:0 4px}', '#acc-panel .acc-opt{display:block;width:100%;text-align:left;padding:9px 10px;margin:4px 0;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;cursor:pointer;font-size:13px;color:#334155}', '#acc-panel .acc-opt:hover{background:#e8eef5}', '#acc-panel .acc-opt:focus-visible{outline:2px solid #e67e22}', 'html.acc-hc body{background:#000 !important}', 'html.acc-hc body *:not(#acc-btn):not(#acc-panel):not(#acc-panel *){color:#fff !important;background-color:#000 !important;border-color:#666 !important}', 'html.acc-hc img,html.acc-hc svg,html.acc-hc video,html.acc-hc iframe{background-color:transparent !important}', 'html.acc-hc a{color:#ffd54f !important;text-decoration:underline !important}', 'html.acc-gs{filter:grayscale(100%) !important}', 'html.acc-ul a{text-decoration:underline !important}' ].join(''); var st = document.createElement('style'); st.textContent = css; document.head.appendChild(st); var btn = document.createElement('button'); btn.id = 'acc-btn'; btn.setAttribute('aria-label', 'Erişilebilirlik seçeneklerini aç'); btn.title = 'Erişilebilirlik'; btn.textContent = '♿'; var panel = document.createElement('div'); panel.id = 'acc-panel'; panel.setAttribute('role', 'dialog'); panel.setAttribute('aria-label', 'Erişilebilirlik seçenekleri'); panel.innerHTML = '
Erişilebilirlik
' + '' + '' + '' + '' + '' + ''; document.body.appendChild(btn); document.body.appendChild(panel); var d = document.documentElement, LS = 'accPrefs'; function save(){ try{ localStorage.setItem(LS, JSON.stringify({fs:d.style.fontSize, cls:d.className})); }catch(e){} } function font(n){ var f = parseFloat(getComputedStyle(d).fontSize)||16; d.style.fontSize = (f+n)+'px'; save(); } function toggle(c){ d.classList.toggle('acc-'+c); save(); } function reset(){ d.style.fontSize = ''; d.className = d.className.split(' ').filter(function(x){ return x.indexOf('acc-')!==0; }).join(' ').trim(); try{ localStorage.removeItem(LS); }catch(e){} } function restore(){ try{ var p = JSON.parse(localStorage.getItem(LS)); if(p){ if(p.fs) d.style.fontSize=p.fs; if(p.cls) d.className=p.cls; } }catch(e){} } btn.onclick = function(){ panel.classList.toggle('open'); }; panel.querySelector('.acc-x').onclick = function(){ panel.classList.remove('open'); }; panel.querySelectorAll('.acc-opt').forEach(function(b){ b.onclick = function(){ var a = b.getAttribute('data-acc'); if(a === 'font'){ font(parseInt(b.getAttribute('data-v'),10)); } else if(a === 'reset'){ reset(); } else { toggle(a); } }; }); restore(); })();