PageSourceSearch

https://www.kofiannanfoundation.org/wp-content/litespeed/js/fa6a1d2790921cc14a92d6d260d60281.js?ver=6f596

js kofiannanfoundation.org collected 2026-10-02 03:33:21 UTC 8,758 bytes, 10 lines download raw bytes

1document.addEventListener('DOMContentLoaded',function(){function closeOtherAccordionItems(activeItem){const allItems=document.querySelectorAll('.gb-accordion__item');allItems.forEach(item=>{if(item!==activeItem){item.classList.remove('gb-accordion__item-open');let toggle=item.querySelector('.gb-accordion__toggle');toggle.setAttribute('aria-expanded','false');toggle.classList.remove('gb-block-is-current')}})}
2document.addEventListener('keydown',function(event){if(event.key==="Escape"){closeOtherAccordionItems(null)}});document.addEventListener('click',function(event){if(!event.target.closest('.gb-accordion')){closeOtherAccordionItems(null)}});document.querySelectorAll('.navigation-overlay').forEach(overlay=>{overlay.addEventListener('click',event=>{if(event.target===overlay){closeOtherAccordionItems(null)}})});document.querySelectorAll('.gb-accordion__item').forEach(item=>{const toggle=item.querySelector('.gb-accordion__toggle');toggle.addEventListener('click',function(event){if(!item.classList.contains('gb-accordion__item-open')){event.preventDefault()}})})});jQuery(document).ready(function($){const yoast={accordion:function(){$('.schema-faq-answer').hide();$('.wp-block-yoast-faq-block').find('.schema-faq-question').click(function(){$(this).nextAll('.schema-faq-answer').eq(0).slideToggle('fast',function(){if($(this).hasClass('collapse')){$(this).removeClass('collapse')}else{$(this).addClass('collapse')}})});$('.wp-block-yoast-faq-block .schema-faq-question').click(function(){if($(this).hasClass('collapse')){$(this).removeClass('collapse')}else{$(this).addClass('collapse')}})}};yoast.accordion()});jQuery(document).ready(function($){$('.show-more-button a').on('click',function(event){event.preventDefault();var $this=$(this);var $container=$this.closest('.has-show-more').find('.hidden-frontend');$container.slideToggle(function(){if($container.is(':visible')){$this.text('- Show less')}else{$this.text('+ Show more')}})})});jQuery(document).ready(function($){$('.show-more-group .show-more-link a').on('click',function(event){event.preventDefault();var $this=$(this);var $container=$this.closest('.show-more-group').find('.truncate');if($container.hasClass('expanded')){$this.html('<strong>+ Show more</strong>');$container.removeClass('expanded')}else{$container.addClass('expanded');$this.html('<strong>+ Show less</strong>')}})});document.addEventListener('DOMContentLoaded',function(){let currentPathSegments=window.location.pathname.split('/').filter(Boolean);const navLinks=document.querySelectorAll('.site-header a:not([href=""]):not([href*="#"]):not([href*="?"]):not(.wp-block-button__link), .site-footer a:not([href=""]):not([href="#"]):not(.wp-block-button__link)');navLinks.forEach(link=>{let linkPath=link.pathname;if(linkPath.endsWith('/')){linkPath=linkPath.slice(0,-1)}
3let linkPathSegments=linkPath.split('/').filter(Boolean);let allSegmentsMatch=linkPathSegments.every((segment,index)=>{return segment===currentPathSegments[index]});if(allSegmentsMatch){link.parentElement.classList.add('current-menu-item');let accordionItem=link.closest('.gb-accordion__item');if(accordionItem){let toggle=accordionItem.querySelector('.gb-accordion__toggle');toggle.setAttribute('aria-expanded','true');toggle.classList.add('current-menu-item')}}})});window.addEventListener('load',function(){if(document.querySelector('.has-toc')){let headers=document.querySelectorAll('.entry-content h2[id]:not(.has-crimson-primary-color)');let toc=document.createElement('ul');let backToTop=document.createElement('li');let backToTopLink=document.createElement('a');backToTopLink.href='#';backToTopLink.textContent='↑ Top';backToTop.appendChild(backToTopLink);toc.appendChild(backToTop);headers.forEach(header=>{let listItem=document.createElement('li');let link=document.createElement('a');link.href='#'+header.id;link.textContent='↓ '+header.textContent;listItem.appendChild(link);toc.appendChild(listItem)});let mainElement=document.querySelector('main');let logoElement=document.querySelector('.wp-block-site-logo');let tocWrapper=document.createElement('div');tocWrapper.classList.add('toc-block');tocWrapper.style.position='absolute';tocWrapper.style.top=`${mainElement.offsetTop}px`;tocWrapper.style.paddingLeft=`${logoElement.offsetLeft}px`;tocWrapper.appendChild(toc);mainElement.parentNode.insertBefore(tocWrapper,mainElement);let tocBlock=document.querySelector('.toc-block');if(!tocBlock){return}
4let sentinel=document.createElement('div');sentinel.style.position='absolute';sentinel.style.height='1px';sentinel.style.width='1px';sentinel.style.top=`${tocBlock.offsetTop - 1}px`;document.body.appendChild(sentinel);let initialPosition=mainElement.offsetTop-1;let observer=new IntersectionObserver(function(entries){if((!entries[0].isIntersecting&&window.scrollY>initialPosition)||window.scrollY>initialPosition){tocBlock.style.position='fixed';tocBlock.classList.add('sticky');tocBlock.style.top='0'}else{tocBlock.style.position='absolute';tocBlock.classList.remove('sticky');tocBlock.style.top=initialPosition+'px'}},{threshold:0});observer.observe(sentinel);let scrollTimeout;window.addEventListener('scroll',function(){clearTimeout(scrollTimeout);scrollTimeout=setTimeout(function(){if(window.scrollY>initialPosition){tocBlock.style.position='fixed';tocBlock.classList.add('sticky');tocBlock.style.top='0'}else{tocBlock.style.position='absolute';tocBlock.classList.remove('sticky');tocBlock.style.top=initialPosition+'px'}},100)})}
5window.addEventListener('resize',debounce(function(){if(document.querySelector('.has-toc')){let mainElement=document.querySelector('main');let logoElement=document.querySelector('.wp-block-site-logo');let tocWrapper=document.querySelector('.toc-block');let mainElementTop=mainElement.offsetTop;let logoElementLeft=logoElement.offsetLeft;tocWrapper.style.top=`${mainElementTop}px`;tocWrapper.style.paddingLeft=`${logoElementLeft}px`}},250))});document.addEventListener('DOMContentLoaded',function(){let headers=document.querySelectorAll('.entry-content h2[id]:not(.has-crimson-primary-color)');if(!document.querySelector('.has-toc')){return}
6let observer=new IntersectionObserver(function(entries){entries.forEac
6h(entry=>{if(entry.isIntersecting){let link=document.querySelector(`.toc-block a[href="#${entry.target.id}"]`);document.querySelectorAll('.toc-block a').forEach(link=>{link.classList.remove('active')});link.classList.add('active')}})},{rootMargin:'-50% 0px',threshold:0});headers.forEach(header=>{observer.observe(header)})});document.addEventListener('DOMContentLoaded',function(){let footerColumn=document.querySelector('footer.wp-block-template-part .wp-block-columns');let backToTopContainer=document.createElement('div');backToTopContainer.classList.add('back-to-top');let backToTopLink=document.createElement('a');backToTopLink.href='#';backToTopLink.textContent='↑';backToTopContainer.appendChild(backToTopLink);footerColumn.appendChild(backToTopContainer)});document.addEventListener('DOMContentLoaded',function(){document.querySelectorAll('.shape-linkedin-track a').forEach(link=>{link.addEventListener('click',function(){console.log('linkedin click');window.lintrk('track',{conversion_id:19816010})})})});document.addEventListener('DOMContentLoaded',function(){const wrappers=document.querySelectorAll('.wyde-copy-link');if(!wrappers.length){return}
7function fallbackCopy(text){const textarea=document.createElement('textarea');textarea.value=text;textarea.setAttribute('readonly','');textarea.style.position='absolute';textarea.style.left='-9999px';document.body.appendChild(textarea);textarea.select();let ok=!1;try{ok=document.execCommand('copy')}catch(e){ok=!1}
8document.body.removeChild(textarea);return ok}
9wrappers.forEach(function(wrapper){const trigger=wrapper.matches('a, button')?wrapper:wrapper.querySelector('a, button');if(!trigger)return;const initialLabel=trigger.dataset.label||trigger.textContent.trim();const copiedLabel=trigger.dataset.copiedLabel||'Copied!';let resetTimer;trigger.addEventListener('click',function(event){event.preventDefault();const url='https://accountabilityhubs.org'+window.location.pathname;const showCopied=function(){wrapper.classList.add('is-copied');trigger.textContent=copiedLabel;clearTimeout(resetTimer);resetTimer=setTimeout(function(){wrapper.classList.remove('is-copied');trigger.textContent=initialLabel},2000)};if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(url).then(showCopied).catch(function(){if(fallbackCopy(url))showCopied();})}else if(fallbackCopy(url)){showCopied()}})})});function debounce(func,wait){let timeout;return function executedFunction(...args){const later=()=>{clearTimeout(timeout);func(...args)};clearTimeout(timeout);timeout=setTimeout(later,wait)}}
10;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.