PageSourceSearch

https://www.findeks.com/src/js/mobileAppPills.BceeulDI.js

js findeks.com collected 2026-10-01 12:37:14 UTC 3,275 bytes, 1 lines download raw bytes

1class t{constructor(){this.sectionSelector="#mobile-app-pills-section",this.pillSelector=".pill-default",this.activeClass="pill--active",this.inactiveClass="pill--inactive",this.init()}init(){this.cacheDOMElements(),this.validateElements()&&(this.bindEvents(),this.updateNavigationButtons())}cacheDOMElements(){this.section=document.querySelector(this.sectionSelector),this.section&&(this.pillButtons=Array.from(this.section.querySelectorAll(this.pillSelector)),this.prevButton=this.section.querySelector(".prev-pill"),this.nextButton=this.section.querySelector(".next-pill"),this.iframe=this.section.querySelector("iframe"),this.scrollContainer=this.section.querySelector(".overflow-auto"))}validateElements(){return!(!this.section||0===this.pillButtons.length)}bindEvents(){this.pillButtons.forEach(t=>{t.addEventListener("click",this.handlePillClick.bind(this))}),this.prevButton&&this.prevButton.addEventListener("click",this.handlePrevClick.bind(this)),this.nextButton&&this.nextButton.addEventListener("click",this.handleNextClick.bind(this))}handlePillClick(t){const e=t.target;this.setActivePill(e),this.scrollToActivePill()}handlePrevClick(){const t=this.getUniquePillGroups(),e=this.getActivePillIndex();if(e>0){const i=t[e-1];this.setActivePill(i),this.scrollToActivePill()}}handleNextClick(){const t=this.getUniquePillGroups(),e=this.getActivePillIndex();if(e>=0&&e<t.length-1){const i=t[e+1];this.setActivePill(i),this.scrollToActivePill()}}setActivePill(t){this.pillButtons.forEach(t=>{t.classList.remove(this.activeClass),t.classList.add(this.inactiveClass)});const e=t.textContent.trim(),i=t.getAttribute("data-link");this.pillButtons.forEach(t=>{t.textContent.trim()===e&&t.getAttribute("data-link")===i&&(t.classList.remove(this.inactiveClass),t.classList.add(this.activeClass))}),this.updateNavigationButtons(),this.updateIframe()}getActivePillIndex(){const t=this.getUniquePillGroups(),e=this.section.querySelector(`.${this.activeClass}`);if(!e)return-1;const i=e.textContent.trim(),s=e.getAttribute("data-link");return t.findIndex(t=>t.textContent.trim()===i&&t.getAttribute("data-link")===s)}getUniquePillGroups(){const t=[],e=new Set;return this.pillButtons.forEach(i=>{const s=`${i.textContent.trim()}-${i.getAttribute("data-link")}`;e.has(s)||(e.add(s),t.push(i))}),t}updateNavigationButtons(){if(!this.prevButton||!this.nextButton)return;const t=this.getUniquePillGroups(),e=this.getActivePillIndex(),i=0===e,s=e===t.length-1;this.toggleButtonState(this.prevButton,i),this.toggleButtonState(this.nextButton,s)}toggleButtonState(t,e){e?(t.classList.add("opacity-50"),t.classList.remove("cursor-pointer"),t.style.pointerEvents="none"):(t.classList.remove("opacity-50"),t.classList.add("cursor-pointer"),t.style.pointerEvents="auto")}updateIframe(){if(!this.iframe)return;const t=this.section.querySelector(`.${this.activeClass}`);if(!t)return;const e=t.getAttribute("data-link");e&&this.iframe.src!==e&&(this.iframe.src=e)}scrollToActivePill(){if(!this.scrollContainer)return;const t=this.section.querySelector(`.${this.activeClass}`);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}}"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#mobile-app-pills-section")&&new t});

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.