PageSourceSearch

https://www.gamesblog.it/app/themes/webnews/scripts/main0_0_279.js

js gamesblog.it collected 2026-09-24 22:50:29 UTC 9,148 bytes, 1 lines download raw bytes

1(()=>{var e={296:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=296,e.exports=t}},t={};function s(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,s),n.exports}s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";class e{constructor(e=null,t=null,s=null){this.loading=!1,this.onLoad=e,this.onError=t,this.onLoading=s,this.loader=this._setWorker()}_setLoaderWorker(){try{if(window.Worker)return new Worker(this.worker)}catch(e){console.log("_b| [loader] ",e.message)}}_loading(){this.loading=!0,this.onLoading&&this.onLoading()}_error(e){this.loading=!1,this.onError&&this.onError(e)}_loaded(e){this.loading=!1,this.onLoad&&this.onLoad(e)}_parallelLoad(e){if(this.loader)this.loader.onmessage=e=>{switch(e.data.type){case"loaded":this._loaded.call(this,e.data.payload);break;case"loading":this._loading.call(this);break;case"error":this._error.call(this,e.data.payload);break;default:console.warn("!! _b| [loader] unknown message",e.data)}},this.loader.postMessage({url:e});else{console.log("_b| [loader] not threaded");var t=new XMLHttpRequest;t.onload=e=>{var t=this.responseText;this._loaded.call(this,t)},t.onerror=()=>{load_self._error.call(this)},t.open("GET",e),t.send(),this._loading.call(this)}}load(e){null!=e&&this._parallelLoad(e)}_setWorker(){var e=new Blob([" onmessage = function(msg) { if(msg.data.url) load(msg.data.url); else postMessage({type : 'error', text : 'no url specified'}); }\n load = function(url) { var oReq = new XMLHttpRequest(); oReq.onload = transferComplete; oReq.onerror = transferFailed; console.log('_b| loading...', url); oReq.open('GET', url); oReq.send(); postMessage({type : 'loading'}); }\n function transferComplete() { console.log('_b| loaded'/*, this*/); postMessage({type: 'loaded', payload : this.response}); }\n function transferFailed() { console.log('_b| load error', this.responseText); postMessage({type: 'error', text : this.response}); }\n"]);return new Worker(window.URL.createObjectURL(e))}}class t{constructor(t){this.files=t,this.loader=new e(this.loaded,this.error),this.includes=this.load()}error(e){console.error(e)}loaded(e){document.head.insertAdjacentHTML("beforeend",`<style>${e}</style>`)}load(){this.files.forEach((e=>this.loader.load(e)))}}class o{constructor(e){this.groups=e,this.load()}load(){this.groups.forEach((async e=>{this.loadComponent(e)}))}loadComponent(e){if(0==e.length)return;let t=e.shift();this.loadScript(t,e)}async loadModule(e,t){await s(296)(e).then((e=>{void 0!==e.default&&(window[e.default.name]=e.default),this.loadComponent(t)}))}loadScript(e,t){let s=document.createElement("script");s.type="text/javascript",s.src=e,s.addEventListener("load",(()=>this.loadComponent(t))),document.head.appendChild(s)}}
1class r{constructor(e={jsdir:"/js/components/",cssdir:"/css/components/"}){this.base_url=`${window.location.protocol}//${window.location.host}`,this.js_dir=e.jsdir,this.css_dir=`${this.base_url}${e.cssdir}`,this.js_dep_selector="[data-js-dependency]",this.def_js_dep_selector="[data-js-deferred-dependency]",this.css_dep_selector="[data-css-dependency]",this.fallback=void 0===window.IntersectionObserver}scanDependencies(){this.fallback?this.FallbackLoadDeps():this.getDeps()}scanJS(){return this.scan(this.js_dep_selector,"jsDependency",this.js_dir)}scanCSS(){return this.scan(this.css_dep_selector,"cssDependency",this.css_dir)}scanDeferredJS(){return this.scan(this.def_js_dep_selector,"jsDeferredDependency",this.js_dir)}getDeps(){return this.js_deps=this.scanJS(),this.def_deps=this.scanDeferredJS(),this.css_deps=this.scanCSS(),this.firstScrollTrigger((()=>{new o(this.def_deps)})),{jsinc:new o(this.js_deps),cssinc:new t(this.css_deps)}}scan(e,t,s){return[].map.call(document.querySelectorAll(e),(e=>e)).reduce(((e,o)=>{let r=o.dataset[t].split(",").map((e=>e.trim())).filter((e=>e)).map((e=>s+e)).filter((t=>!e.flat().includes(t)));return delete o.dataset[t],r.length&&e.push(r),e}),[])}firstScrollTrigger(e){var t=document.createElement("span");t.style.position="absolute",t.style.display="block",t.style.top=window.innerHeight+10+"px",t.style.left="0",t.style.width="1px",t.style.height="1px",t.style.backgroundColor="transparent",document.body.style.position="relative",document.body.appendChild(t),new IntersectionObserver(function(s,o){s.forEach(function(s){s.isIntersecting&&(e(),o.unobserve(t))}.bind(this))}.bind(this)).observe(t)}}class n{constructor(e="[data-container]"){try{this.props=JSON.parse(document.querySelector(e).dataset.container),this.props.contents.unshift({title:document.title,url:window.location.href})}catch(t){this.props={error:`${t.message} or selector ${e} not found`,type:"single",title:"",paged:!1,contents:[{title:document.title,url:window.location.href}],infinite:!1,ajaxSelector:"",appendToRequest:"?is_ajax_request"}}}}class i{constructor(t=[],s="body",o="article",r="#wait-loading",n=2,i="#loadmore",a=!0,l=null){this.container=s,this.containerElement=document.querySelector(this.container),this.content=o,this.relateds=t,this.loadedContents=[],this.loadingContent={...t.shift(),count:0},this.currentReading={intersectionRatio:0,target:null},this.maxLoads=n,this.change_addressbar=a,this.preloader=document.querySelector(r),this.loadMore=document.querySelector(i),this.setLoadedContent(this.containerElement.querySelector(this.content)),this.current_url=this.loadingContent.url,this.current_content=0,this.loader=new e(this.complete.bind(this),null,this.loading.bind(this)),this.enableTrigger(this.loadMore,this.loadNext),this.loadCallbackStack=[],this.viewportCallbackStack=[],this.otherObserver=null}doThings(){console.log("doThings");let e=document.querySelector(".articles-loader-top"),t=document.querySelector(".articles-loader-bottom");const s={root:document.querySelector("main-container"),threshold:Array.from({length:100},((e,t)=>t/100))};this.otherObserver=new IntersectionObserver(((e,t)=>{if(this.maxLoads>0&&1==e.length&&!e[0].target.getAttribute("alreadyLoaded")&&-1!==e[0].target.className.indexOf("articles-loader-bottom")&&e[0].intersectionRatio>0&&(this.loadNext(),this.maxLoads--,e[0].target.setAttribute("alreadyLoaded",1)),2===e.length)e[0].intersectionRatio>e[1].intersectionRatio?e[0]:e[1];else if(1===e.length){const t=e[0].target.parentElement.getAttribute("data-url");window.history.replaceState(null,"",t)}}),s),this.otherObserver.observe(e),this.otherObserver.observe(t)}async loadNext(){this.loader.loading||0!=this.relateds.length&&(this.loadingContent={...this.relateds.shift(),count:this.loadedContents.length},this.loader.load(`${this.loadingContent.url}?is_ajax_request`))}loading(){this.preloader.style.display="block"}complete(e){this.preloader.style.display="none";let t=document.createElement("div");t.insertAdjacentHTML("beforeend",e);let s=t.querySelector(this.content);for(this.setLoadedContent(s);t.children.length;)this.containerElement.appendChild(t.removeChild(t.firstChild));this.loadCallbackStack.forEach((e=>e.call())),0==this.relateds.length&&void 0!==this.onMaxLoads&&this.onMaxLoads();let o=document.querySelectorAll(".articles-loader-top"),r=document.querySelectorAll(".articles-loader-bottom");o.forEach((e=>{e.getAttribute("inited")||(this.otherObserver.observe(e),e.setAttribute("inited",1))})),r.forEach((e=>{e.getAttribute("inited")||(this.otherObserver.observe(e),e.setAttribute("inited",1))}))}onMaxLoads(){this.observer.unobserve(this.loadMore)}setLoadedContent(e){e.dataset.url=this.loadingContent.url,e.dataset.count=this.loadingContent.count,e.dataset.title=this.loadingContent.title,this.loadedContents.push(this.loadingContent),this.enableTrigger(e,this.onElementShow)}onElementShow(e){this.current_content=e.count,this.current_url=e.url,this.current_title=e.title,this.current_tracking_url="",this.current_url!=window.location.href&&this.setAddressBar(),e.count>0&&this.viewportCallbackStack.forEach((e=>e.call()))}setAddressBar(e,t){window.history.replaceState(null,this.current_title,this.current_url),document.title=this.current_title}enableTrigger(e,t){e.callback=t.bind(this);const s={root:document.querySelector("main-container"),threshold:Array.from({length:100},((e,t)=>t/100))};this.observer=new IntersectionObserver(((e,t)=>{e.forEach((e=>{this.currentReading.intersectionRatio<e.intersectionRatio&&(e.target.callback(e.target.dataset),"loadmore"!=e.target.id&&(this.currentReading=e)),this.currentReading.target==e.target&&(this.currentReading=e)}))}),s),this.observer.observe(e)}}window.UI=new class{constructor(){this.page=new n,this.theme_name="webnews",this.dynamicDeps=new r(this.getBaseDir()),this.infinite="true"==this.page.props.infinite?new i(this.page.props.contents,this.page.props.container,this.page.props.content,"#wait-loading",4):null}getBaseDir(){let e=window.location.host.replace(/(.*?)\..*/,"$1");return["www","staging","preprod","local","new"].includes(e)?{jsdir:`/app/themes/${this.theme_name}/`,cssdir:`/app/themes/${this.theme_name}/`}:{jsdir:"/",cssdir:"/"}}},console.log(UI),UI.dynamicDeps.scanDependencies()})()})();

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.