Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/modules/infinite.min.js
Назад
(($,f,u,g,d)=>{"use strict";let h=null,l=null;const m=new Set,p=(t,e)=>{null===l&&(l=new IntersectionObserver((e,t)=>{for(let t=e.length-1;-1<t;--t)!0===e[t].isIntersecting&&u.history.replaceState(null,null,e[t].target.dataset.tfHistory)},{rootMargin:"100% 0px -100% 0px"})),t.dataset.tfHistory=_(e),l.observe(t)},_=t=>f.updateQueryString("tf-scroll",null,t),b=t=>f.updateQueryString("tf-scroll",1,t),y=(t,e,l)=>{if(f.lazyScroll(f.selectWithParent("[data-lazy]",t),!0),!l){const a=u.Isotope?.data(t);if(a){const i=t.previousElementSibling;if(i?.classList.contains("post-filter")){const n=i.querySelector(".cat-item.active:not(.cat-item-all)");null!==n&&f.triggerEvent(f.click,n)}}}f.triggerEvent(t,"infinitebeforeloaded",{d:e}).trigger("infinitebeforeloaded",[t,e])},v=(n,s,o)=>{const r=n.length,c=u.Isotope?.data(s);null===h&&(h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),n[0].className+=" tf_firstitem";var d=0;for(let t=0;t<r;++t)n[t].style.opacity=0,f.imagesLoad(n[t]).then(t=>{if(h){const e=t.querySelector("img[srcset]");null!==e&&(e.outerHTML=e.outerHTML)}if(++d,c?.appended(t),t.style.opacity="",d===r){if(c||s.classList.contains("auto_tiles")){if(!o.ajax_loading){const l=s.previousElementSibling;l?.classList.contains("post-filter")&&f.trigger("themify_isotop_filter",[l])}s.classList.contains("auto_tiles")&&f.autoTiles(s)}for(let t=0;t<r;++t)f.lazyScroll(f.convert(f.selectWithParent("[data-lazy]",n[t])).reverse(),!0);if(f.triggerEvent(s,"infiniteloaded",{items:n}).trigger("infiniteloaded",[s,n]),"scroll"===o.scrollToNewOnLoad){let t=s.tfClass("tf_firstitem"),e=(t=t[t.length-1],$(t).offset().top);const a=800<=e?800+Math.abs(e/10):800,i=g.tfId("headerwrap");null!==i&&(i.classList.contains("fixed-header")||g.body.classList.contains("fixed-header"))&&(e-=$(i).outerHeight(!0)),(!1===o.scrollThreshold||e-g.docElement.scrollTop>o.scrollThreshold)&&f.scrollTo(e,a)}f.fonts(),f.wpEmbed(g.tfClass("wp-embedded-content")),f.largeImages()}})},o=c=>{if(!0!==c.isWorking){c.isWorking=!0,c.status.classList.add("tf_scroll_request");let t,e="GET",l;if(c.filter){const a=c.filter.hasAttribute("data-sort"),i=c.filter.querySelector(".cat-item.active");if(i){if(c.ajax_loading=i,l={action:"themify_ajax_load_more",module:c.filter.dataset.el,id:c.filter.dataset.id,page:i.dataset.p},!i.classList.contains("cat-item-all")){const n=i.className.replace(/(current-cat)|(cat-item)|(-)|(active)/g,"").replace(" ","");l.tax=n.trim()}if(a){const s=c.filter.querySelector(".tf_ajax_sort_order.active"),o=c.filter.querySelector(".tf_ajax_sort_order_by .active");s&&(l.order=s.dataset.type),o&&(l.orderby=o.dataset.orderBy)}e="POST",t=themify_vars.ajax_url}}c.ajax_loading||(t=b(c.button.href)),f.fetch(l,"html",{method:e},t).then(t=>{const e=t.querySelector(c.id),l=_(c.button.href),a=c.container;let i=null;if(null!==e){y(a,t,!!c.ajax_loading);const n=g.createDocumentFragment(),s=f.convert(e.children);if(!(i=!(i=e.tfClass("load-more-button")[0]||e.nextElementSibling)||(i=i.classList.contains("load-more-button")?i:i.children[0])?.classList.contains("load-more-button")?i:null)||"A"===i.tagName||(i=i.children[0])&&"A"===i.tagName||(i=null),s[0]!==d){for(let t=0,e=s.length;t<e;++t)n.appendChild(s[t]);a.appendChild(n),c.history&&p(s[0],l),v(s,a,c)}else i=null;c.ajax_loading&&null===i&&(c.ajax_loading.dataset.done=!0,c.filter.parentNode.classList.add("tb_hide_loadmore"))}if(c.ajax_loading)c.ajax_loading.dataset.p=parseInt(c.ajax_loading.dataset.p)+1,c.isWorking=null;else{if(null===i)c.button.remove(),c.button=null;else{const o=b(i.href);c.prefetchBtn===d||m.has(o)||(m.add(o),c.prefetchBtn.setAttribute("href",o)),c.button.href=o,u.tfOn("scroll",t=>{c.isWorking=null},{passive:!0,once:!0})}if(u.ga!==d){const r=g.createElement("a");r.href=l,ga("set","page",r.pathname),ga("send","pageview")}c.history&&u.history.replaceState(null,null,l)}return c.status.classList.remove("tf_scroll_request"),e}).catch(t=>{console.warn("InfiniteScroll error.",t)})}};f.loadCss(f.url+"/css/modules/infinite","tf_infinite"),f.on("tf_infinite_init",(t,i)=>{const n=t.length!==d?t:[t];for(let l=n.length-1;-1<l;--l){let t=n[l],e=t.tfClass("load-more-button")[0],a=g.createElement("div");if(e=e||t.nextElementSibling){let l=e;if((e.classList.contains("load-more-button")||(e=e.children[0])?.classList.contains("load-more-button"))&&("A"===e.tagName||(e=e.children[0])&&"A"===e.tagName)){if(i.id||(i.id=t.id,i.id=i.id?"#"+i.id:"."+t.className.split(" ").join(".")),a.className="tf_load_status tf_loader tf_clear tf_hide",t.after(a),i.status=a,i.button=e,(i.container=t).classList.contains("tb_ajax_pagination")){const s=t.previousElementSibling;s?.classList.contains("post-filter")&&(i.filter=s)}!1!==i.scrollThreshold?u.tfOn("scroll",()=>{const t=g.createElement("link"),e=b(i.button.getAttribute("href"));t.setAttribute("as","document"),t.rel="prefetch",t.href=e,i.button.after(t),i.prefetchBtn=t,m.add(e),p(i.container.children[0],u.location.href),(a=>new IntersectionObserver((e,l)=>{for(let t=e.length-1;-1<t;--t)!0===e[t].isIntersecting&&(null===a.button?l.disconnect():o(a))},{threshold:.1}))(i).observe(l)},{passive:!0,once:!0}):(p(t.children[0],u.location.href),e.tfOn(f.click,t=>{t.preventDefault(),delete i.ajax_loading,o(i)}).style.display="inline-block")}}}})})(jQuery,Themify,window,document,void 0);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка