PageSourceSearch

https://neurozeh.ru/wp-content/themes/neurozeh/assets/scripts/more-posts-handler.js?ver=1.1.56

js neurozeh.ru collected 2026-10-09 00:37:09 UTC 2,522 bytes, 1 lines download raw bytes

1"use strict";function initializeCatalogLoadMore(e){let t=!1,n=null;function o(){n&&n.disconnect()}async function r(){if(t)return!0;t=!0;const n=e.href;e.textContent="Загрузка...";try{const t=await fetch(n,{credentials:"same-origin"});if(!t.ok)throw new Error("Response error");const r=(new DOMParser).parseFromString(await t.text(),"text/html"),a=r.querySelector(".placeholder-container"),c=document.querySelector(".placeholder-container");if(!a||!c)throw new Error("Catalog markup error");c.insertAdjacentHTML("beforeend",a.innerHTML);const i=r.querySelector(".load-more-button[data-catalog-load-more]");return i?(e.href=i.getAttribute("href"),e.textContent="Показать ещё"):(o(),e.closest(".load-more-button-container").remove()),!0}catch(t){return e.textContent="Показать ещё",!1}finally{t=!1}}e.addEventListener("click",async function(t){t.preventDefault();const n=e.href;await r()||window.location.assign(n)}),"IntersectionObserver"in window&&(n=new IntersectionObserver(async t=>{if(!t.some(e=>e.isIntersecting))return;await r()?e.isConnected&&(n.unobserve(e),n.observe(e)):o()},{rootMargin:"200px 0px"}),n.observe(e))}document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".load-more-button");if(!e)return;if(e.dataset.catalogLoadMore)return void initializeCatalogLoadMore(e);const t=morePostsObject,n=t.nonce,o=t.homeUrl;let r=2,a=!1;e.addEventListener("click",i);let c=!1;async function i(t){if(a)return;t&&t.preventDefault(),c=!0,e.textContent="Загрузка...";const i=e.dataset.template,s=e.dataset.catId,l=e.dataset.searchQuery,d=e.dataset.free,u=e.dataset.resultType,f=e.dataset.findingFormat,m=i?"&template="+i:"",w=s?"&cat_id="+s:"",h=f?"&finding_format="+f:"",g=l?"&search_query="+l:"",p=d?"&free=true":"",y=u?"&result_type="+u:"",b=e.dataset.blog?"&blog=true":"",v="".concat(o,"/wp-json/neurozeh/v1/get-more-posts/?_wpnonce=").concat(n,"&page=").concat(r).concat(m).concat(w).c
1oncat(g).concat(p).concat(y).concat(h).concat(b);try{const e=await fetch(v);if(!e.ok)throw new Error("Response error");{const t=await e.json(),n=t.html,o=t.isLast;document.querySelector(".placeholder-container").insertAdjacentHTML("beforeend",n),t&&o&&(document.querySelector(".load-more-button-container").remove(),a=!0),r++}}catch(e){console.log(e)}finally{c=!1,e.textContent="Показать еще"}}let s=!1;window.addEventListener("scroll",async()=>{c||(s?window.scrollY+window.innerHeight>=document.documentElement.scrollHeight-100&&await i():s=!0)})});

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.