dynamic-toc

Von $1

    Inhaltsverzeichnis
    keine Gliederung

    Version seit 15:43, 5 Nov 2026

    zu dieser Version.

    Zurück zu Versionshistorie.

    Zeige aktuelle Version

    (function(){var C={sel:'h2,h3,h4',thr:0.35,thr2:80,rng:2,exc:['Von $1','*Edit'],box:['.deki-page-titlex','#siteSubx'],bot:110,bot2:300,ret:30,del:300,lpt:3000},p,l,h=[],ci=-1,t,mo=0,st=0,sc=0,ui=0;function s(){p=document.getElementById('trackerPageContent');l=document.getElementById('trackerList');if(!p||!l)return;var m=document.querySelector('.menu-toggle-icon'),ph=Math.max(document.documentElement.scrollHeight||0,document.body.scrollHeight||0);if(ph<C.lpt){var ic=document.querySelector('img[src="/skins/common/icons/icon-trans.gif"][width="185"]');if(ic){var r=ic.getBoundingClientRect();st=r.bottom+(window.pageYOffset||document.documentElement.scrollTop);ui=1}}else{ui=0;sc=window.innerHeight}if(m)m.addEventListener('click',function(){mo=!mo;p.style.bottom=(mo?C.bot2:C.bot)+'px'});c();function c(){var tx=[];h=Array.from(document.querySelectorAll(C.sel)).filter(function(e){for(var i=0;i<C.box.length;i++)if(e.closest(C.box[i]))return 0;return 1}).map(function(e){return{el:e,text:e.textContent.trim()}}).filter(function(e){for(var i=0;i<C.exc.length;i++){var p=C.exc[i];if(p[0]==='*'&&e.text.endsWith(p.substring(1)))return 0;if(p[p.length-1]==='*'&&e.text.startsWith(p.slice(0,-1)))return 0;if(e.text===p)return 0}if(tx.includes(e.text))return 0;tx.push(e.text);return 1})}function gt(e){var r=e.getBoundingClientRect();return r.top+(window.pageYOffset||document.documentElement.scrollTop)}function fc(){if(!h.length)return 0;var sp=window.pageYOffset||document.documentElement.scrollTop,vh=window.innerHeight,ph=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);if(sp+vh>=ph-100)return h.length-1;var tp=sp+(vh*C.thr);for(var i=h.length-1;i>=0;i--)if(tp>=gt(h[i].el))return i;return 0}function uv(){var sp=window.pageYOffset||document.documentElement.scrollTop;if(ui){if(sp>st)p.classList.add('visible');else p.classList.remove('visible')}else{if(sp>sc)p.classList.add('long-page');else p.classList.remove('long-page')}}function r(){l.innerHTML='';if(!h.length)return;var s=Math.max(0,ci-C.rng),e=Math.min(h.length-1,ci+C.rng);for(var i=s;i<=e;i++){var it=document.createElement('div');it.className='tracker-item';if(i===ci)it.classList.add('current');else if(Math.abs(i-ci)===1)it.classList.add('near');else it.classList.add('far');it.textContent=h[i].text;l.appendChild(it)}}function u(){uv();if(!h.length)return;var i=fc();if(i!==ci){ci=i;r()}}window.addEventListener('scroll',function(){clearTimeout(t);t=setTimeout(u,C.thr2)},{passive:1});window.addEventListener('resize',u);function ini(a){c();if(h.length>0){ci=fc();r();uv();return}if(a<C.ret)setTimeout(function(){ini(a+1)},C.del)}if(document.readyState==='complete')setTimeout(function(){ini(0)},2000);else window.addEventListener('load',function(){setTimeout(function(){ini(0)},2000)})}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',s);else s()})();
    
    <div id="trackerPageContent"><div class="tracker-list" id="trackerList"></div></div>
    #trackerPageContent{position:fixed;bottom:110px;left:20px;width:250px;z-index:2147483000;pointer-events:none;opacity:0;transition:bottom .3s,opacity .4s}#trackerPageContent.long-page,#trackerPageContent.visible{opacity:1!important}.tracker-list{display:flex;flex-direction:column;gap:6px}.tracker-item{line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .25s}.tracker-item.current{font-size:22px;font-weight:600;color:#06C}.tracker-item.near{font-size:16px;color:#777}.tracker-item.far{font-size:14px;color:#7777776b}

     
    Use the language selection below for English Utilise le sélecteur de langue ci-dessous pour français Per l'italiano, utilizzare la selezione della lingua qui sotto Schön sprichst du deutsch :-)