Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/modules/infinite.min.js
Назад
'use strict';(function(l,e,k,m){let n=null,p=null;const q=[],w=function(a){return new k.IntersectionObserver(function(b,c){for(let e=b.length-1;-1<e;--e)!0===b[e].isIntersecting&&(null===a.button?c.disconnect():v(a))},{threshold:.1})},t=function(a,b){null===p&&(p=new k.IntersectionObserver(function(a,b){for(b=a.length-1;-1<b;--b)!0===a[b].isIntersecting&&k.history.replaceState(null,null,a[b].target.getAttribute("data-tf-history"))},{rootMargin:"100% 0px -100% 0px"}));a.setAttribute("data-tf-history", e.UpdateQueryString("tf-scroll",null,b));p.observe(a)},u=function(a){return e.UpdateQueryString("tf-scroll",1,a)},x=function(a,b){e.lazyScroll(e.selectWithParent("[data-lazy]",a),!0);const c=l(a);void 0!==k.Isotope&&k.Isotope.data(a)&&(a=a.previousElementSibling,null!==a&&a.classList.contains("post-filter")&&(a=a.getElementsByClassName("active")[0],void 0!==a&&l(a).trigger("click.tf_isotop_filter")));c.triggerHandler("infinitebeforeloaded.themify",b);e.trigger("infinitebeforeloaded.themify",[c,b]); setTimeout(e.reLayoutIsoTop.bind(e),1500)},y=function(a,b,c){const r=a.length,g=l(b),h=void 0!==k.Isotope?k.Isotope.data(b):null;null===n&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent));a[0].className+=" tf_firstitem";var f=0;for(b=0;b<r;++b)a[b].style.opacity=0,e.imagesLoad(a[b],function(d){d=d.elements[0];if(n){var b=d.querySelector("img[srcset]");null!==b&&(b.outerHTML=b.outerHTML)}++f;h&&h.appended(d);d.style.opacity="";if(f===r){if(h||g[0].classList.contains("auto_tiles"))d=g[0].previousElementSibling, null!==d&&d.classList.contains("post-filter")&&e.body.triggerHandler("themify_isotop_filter",[d]),g[0].classList.contains("auto_tiles")&&e.autoTiles(g[0]);d=l(a);for(b=0;b<r;++b)e.lazyScroll(e.convert(e.selectWithParent("[data-lazy]",a[b])).reverse(),!0);g.triggerHandler("infiniteloaded.themify",[d]);e.trigger("infiniteloaded.themify",[g,d]);if("scroll"===c.scrollToNewOnLoad){d=g[0].getElementsByClassName("tf_firstitem");d=d[d.length-1];d=l(d).offset().top;b=800<=d?800+Math.abs(d/1E3*100):800;const a= m.getElementById("headerwrap");null!==a&&(a.classList.contains("fixed-header")||e.body[0].classList.contains("fixed-header"))&&(d-=l(a).outerHeight(!0));(!1===c.scrollThreshold||d-m.documentElement.scrollTop>c.scrollThreshold)&&e.scrollTo(d,b)}e.fontAwesome()}})},v=function(a){if(!0!==a.isWorking){a.isWorking=!0;a.status.classList.add("tf_scroll_request");var b=new Headers({"X-Requested-With":"XMLHttpRequest"});fetch(u(a.button.href),{headers:b}).then(function(a){return a.text()}).then(function(b){var c= (new DOMParser).parseFromString(b,"text/html");b=c.querySelector(a.id);const g=e.UpdateQueryString("tf-scroll",null,a.button.getAttribute("href"));var h=a.container;let f=null;if(null!==b){x(h,c);c=m.createDocumentFragment();const d=e.convert(b.children);f=b.getElementsByClassName("load-more-button")[0];f||(f=b.nextElementSibling);null!==f&&(f.classList.contains("load-more-button")||(f=f.children[0]),f&&f.classList.contains("load-more-button")||(f=null));f&&"A"!==f.tagName&&((f=f.children[0])&&"A"=== f.tagName||(f=null));if(void 0!==d[0]){for(let a=0,b=d.length;a<b;++a)c.appendChild(d[a]);h.appendChild(c);a.history&&t(d[0],g);y(d,h,a)}else f=null}null===f?(a.button.remove(),a.button=null):(h=u(f.getAttribute("href")),void 0!==a.prefetchBtn&&void 0===q[h]&&(q[h]=!0,a.prefetchBtn.setAttribute("href",h)),a.button.href=h,k.addEventListener("scroll",function(a,b){a.isWorking=null}.bind(null,a),{passive:!0,once:!0}));void 0!==k.ga&&(h=m.createElement("a"),h.href=g,ga("set","page",h.pathname),ga("send", "pageview"));a.history&&k.history.replaceState(null,null,g);a.status.classList.remove("tf_scroll_request");return b}).catch(function(a){console.warn("InfiniteScroll error.",a)})}};e.on("tf_infinite_init",function(a,b){a instanceof jQuery&&(a=a[0]);let c=a.getElementsByClassName("load-more-button")[0];c||(c=a.nextElementSibling);if(c){var l=c;if(!c.classList.contains("load-more-button")&&(c=c.children[0],!c||!c.classList.contains("load-more-button"))||"A"!==c.tagName&&(c=c.children[0],!c||"A"!==c.tagName)|| !b.id&&(b.id=a.getAttribute("id"),b.id=b.id?"#"+b.id:"."+a.className.split(" ").join("."),!b.id))return;e.cssLazy.tf_infinite||(e.cssLazy.tf_infinite=!0,e.LoadCss(e.url+"/css/modules/infinite.css"));var g=m.createElement("div");g.className="tf_load_status tf_loader tf_clear tf_hide";a.parentNode.insertBefore(g,a.nextSibling);b.status=g;b.button=c;b.container=a;!1!==b.scrollThreshold?k.addEventListener("scroll",function(a,b){const d=m.createElement("link"),c=u(a.button.getAttribute("href"));d.setAttribute("as", "document");d.setAttribute("rel","prefetch");d.setAttribute("href",c);a.button.parentNode.insertBefore(d,a.button.nextSibling);a.prefetchBtn=d;q[c]=!0;t(a.container.children[0],k.location.href);e.imagesLoad(null);w(a).observe(b)}.bind(null,b,l),{passive:!0,once:!0}):(t(a.children[0],k.location.href),c.style.display="inline-block",c.addEventListener("click",function(a,b){b.preventDefault();v(a)}.bind(null,b)))}})})(jQuery,Themify,window,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка