console.log("loading config for themarysue");console.log("no config found");window.gamursInfScroll={infScrollURL:"https://infinite-scroll-system.gamurs.workers.dev"};console.log("Infinite scroll initialised");(function(){var C,b,I,O;let s=window.gamursInfScrollCustomSiteConfig,p=window.gamursInfScroll,$=s&&(C=s.categories)!=null?C:"",E=s&&(b=s.tags)!=null?b:"",T=!(s&&s.useCategories===!1),x=!(s&&s.useTags===!1),h=p&&(I=p.infScrollURL)!=null?I:"",y=document.getElementsByClassName("gamurs-inf-scroll-post")[0].attributes["data-categories"].value,S=document.getElementsByClassName("gamurs-inf-scroll-post")[0].attributes["data-tags"].value,w=document.getElementsByClassName("gamurs-inf-scroll-post")[0].dataset.id,r=window.location.hostname.split(".")[window.location.hostname.split(".").length-2];r==="lndo"?r=window.location.hostname.split(".")[0]:r==="go-vip"&&(r=window.location.hostname.split(".")[0],r=r.split("-")[0],r==="www"&&(r=window.location.hostname.split(".")[0].split("-")[1]));let i=`${h}/infscroll/${r}/${w}?categories=${y}&tags=${S}&useCategories=${T}&useTags=${x}&forceCategories=${$}&forceTags=${E}`,U={root:document.querySelector("#scroll-area"),rootMargin:"0px",threshold:.5},L={rootMargin:"-50% 0% -50% 0%",threshold:0};function A(e,o,l){let t;return l==="middle"?t=new IntersectionObserver(o,L):t=new IntersectionObserver(o,U),t=c(e,t),t}function R(e){if(typeof window.gamursInfScrollOnInfiniteScrollAppend=="function")try{window.gamursInfScrollOnUrlChange(e)}catch(o){console.log(o)}}function N(e,o){e[0].isIntersecting&&(m(),o.unobserve(e[0].target))}function c(e,o){return o.observe(e),o}let a=[],u=document.querySelector(".gamurs-inf-scroll-post");a[u&&(O=u.dataset.id)!=null?O:0]=document.URL;let v=!1;function M(e,o){e.forEach(l=>{if(l.isIntersecting){let t=a[l.target.dataset.id];if(history.pushState(null,"",t),typeof window.gamursInfScrollOnUrlChange=="function")try{window.gamursInfScrollOnUrlChange(t)}catch(n){console.log(n)}}}),Array.from(document.getElementsByClassName("gamurs-inf-scroll-post")).map(l=>o.observe(l))}function m(){v?fetch(i).then(e=>{if(e.status!==200)throw e.text();return e.json()}).then(function(o){let l=o;if(l.html!=null){a[l.id]=l.url,i=l.nextUrl;let t=document.createElement("div");t.innerHTML=l.html;let n=document.querySelector("#gamurs-inf-scroll-main");n&&n.appendChild(t),Array.from(t.querySelectorAll("script")).forEach(d=>{try{(0,eval)(d.innerText)}catch(f){console.log(f)}}),c(document.querySelectorAll(".gamurs-inf-scroll-post")[document.querySelectorAll(".gamurs-inf-scroll-post").length-1],g),c(document.querySelectorAll(".gamurs-inf-scroll-post")[document.querySelectorAll(".gamurs-inf-scroll-post").length-1],q),g.unobserve(document.querySelectorAll(".gamurs-inf-scroll-post")[document.querySelectorAll(".gamurs-inf-scroll-post").length-2])}}).catch(e=>{let o=i.split("?")[1].split("&").filter(t=>t.slice(0,5)==="page="),l=o.length?parseInt(o[0].split("=")[1]):1;if(l<20){let t=i.split("?");i=t[0]+"?page="+(l+1).toString()+"&"+t[1].split("&").filter(n=>n.slice(0,5)!=="page=").join("&"),m()}}):(v=!0,fetch(`${h}/campaign/${r}/${w}?categories=${y}&tags=${S}`).then(e=>{if(e.status!==200)throw"No Campaign";return e.json()}).then(function(o){let l=o;if(l.html!=null){a[l.id]=l.url;let t=document.createElement("div");t.innerHTML=l.html;let n=document.querySelector("#gamurs-inf-scroll-main");n&&n.appendChild(t),Array.from(t.querySelectorAll("script")).forEach(d=>{try{(0,eval)(d.innerText)}catch(f){console.log(f)}}),c(document.querySelectorAll(".gamurs-inf-scroll-post")[document.querySelectorAll(".gamurs-inf-scroll-post").length-1],g),c(document.querySelectorAll(".gamurs-inf-scroll-post")[document.querySelectorAll(".gamurs-inf-scroll-post").length-1],q),g.unobserve(document.querySelectorAll(".gamurs-inf-scroll-post")[document.querySelectorAll(".gamurs-inf-scroll-post").length-2])}}).catch(e=>{console.log(e),m()}))}let q=A(u,M,"middle"),g=A(u,N,"middle")})();
