PageSourceSearch

https://rugtomize.co/cdn/shop/t/113/assets/global-loader.js?v=138178080445067728501787834255

js rugtomize.co collected 2026-10-10 01:01:04 UTC 3,166 bytes, 9 lines download raw bytes

1(function(){if(window.GlobalLoader)return;const DEFAULT_INTERVAL=2500;class GlobalLoaderController{constructor(){this.overlay=null,this.textEl=null,this.texts=[],this.index=0,this.timer=null,this.visible=!1,this.previousBodyOverflow=""}build(){if(this.overlay)return this.overlay;const overlay=document.createElement("div");return overlay.className="global-loader",overlay.setAttribute("role","alert"),overlay.setAttribute("aria-live","assertive"),overlay.setAttribute("aria-hidden","true"),overlay.innerHTML=`
2        <div class="global-loader__box">
3          <span class="global-loader__spinner-holder" aria-hidden="true">
4            <span class="global-loader__spinner"></span>
5          </span>
6          <p class="global-loader__text"></p>
7        </div>
8      `,document.body.appendChild(overlay),this.overlay=overlay,this.textEl=overlay.querySelector(".global-loader__text"),overlay}normalizeTexts(text){return text==null||text===""?[]:(Array.isArray(text)?text:[text]).map(item=>String(item)).filter(item=>item.length>0)}show(text,options={}){const overlay=this.build();return this.texts=this.normalizeTexts(text),this.index=0,this.interval=Number(options.interval)>0?Number(options.interval):DEFAULT_INTERVAL,this.loop=options.loop!==!1,this.renderText(),this.startRotation(),this.visible||(this.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.visible=!0),overlay.setAttribute("aria-hidden","false"),overlay.offsetWidth,overlay.classList.add("is-visible"),this}setText(text,options={}){return this.texts=this.normalizeTexts(text),this.index=0,Number(options.interval)>0&&(this.interval=Number(options.interval)),options.loop!==void 0&&(this.loop=options.loop!==!1),this.renderText(),this.startRotation(),this}renderText(){if(!this.textEl)return;const current=this.texts[this.index]||"";this.textEl.textContent=current,this.textEl.style.display=current?"":"none"}startRotation(){this.stopRotation(),!(this.texts.length<2)&&(this.timer=setInterval(()=>{const next=this.index+1;if(next>=this.texts.length){if(!this.loop){this.stopRotation();return}this.index=0}else this.index=next;this.fadeToCurrentText()},this.interval))}fadeToCurrentText(){this.textEl&&(this.textEl.classList.add("is-fading"),setTimeout(()=>{this.renderText(),this.textEl.classList.remove("is-fading")},200))}stopRotation(){this.timer&&(clearInterval(this.timer),this.timer=null)}hide(){return this.stopRotation(),this.visible?(this.visible=!1,document.body.style.overflow=this.previousBodyOverflow,this.overlay&&(this.overlay.classList.remove("is-visible"),this.overlay.setAttribute("aria-hidden","true")),this):this}get isVisible(){return this.visible}}const controller=new GlobalLoaderController;window.addEventListener("pagehide",()=>controller.hide()),window.addEventListener("pageshow",event=>{event.persisted&&controller.hide()}),window.GlobalLoader={show:(text,options)=>controller.show(text,options),setText:(text,options)=>controller.setText(text,options),hide:()=>controller.hide(),get isVisible(){return controller.isVisible}}})();
9//# sourceMappingURL=/cdn/shop/t/113/assets/global-loader.js.map?v=138178080445067728501787834255

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.