File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/IPO_HUB/wp-content/plugins/td-cloud-library/assets/js/js_posts_autoload.min.js
Back
var tdbAutoload={}; (function(f,c,l){var n=f(document),d=f(c);tdbAutoload={original_post_id:null,is_ajax_running:!1,init:function(){var a=f("#tdb-autoload-article");if(0!==a.length){var g=a.data("autoload"),b=a.data("autoload-type"),k=a.data("autoload-count"),e=a.data("autoload-org-post-id"),h=e,m=0;tdbAutoload.original_post_id=e;tdbAutoload.log("%c tdbAutoload(inf) art. settings","background: #ffaa00; color: #ffffff; padding:3px 6px");tdbAutoload.log("tdbAutoload status: "+g);tdbAutoload.log("tdbAutoload type: "+b); tdbAutoload.log("tdbAutoload original post id: "+e);tdbAutoload.log("tdbAutoload count: "+parseInt(k,10));tdbAutoload.log("tdbAutoload scroll percent: "+c.tdb_globals.autoloadScrollPercent);b=l.debounce(function(){tdbAutoload.log("ajax autoload > scroll");if(!0!==tdbAutoload.is_ajax_running){var b=100*d.scrollTop()/(n.height()-d.height()),g=c.tdb_globals.autoloadScrollPercent;(!k||m<parseInt(k,10))&&b>=g&&e===h&&(tdbAutoload._ajaxLoadingStart(a),tdbAutoload.is_ajax_running=!0,f.ajax({timeout:5E4, type:"POST",url:tdbAutoload._getRestEndPoint("td-cloud-library/ajax_autoload","uid="+tdbAutoload._getUniqueID()),beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",c.tdb_globals.wpRestNonce);e=null},data:{currentPostId:h,originalPostId:tdbAutoload.original_post_id},success:function(b,g,d){null!==b&&void 0===b.error&&(void 0!==b.noPosts?tdbAutoload._ajaxLoadingEnd(a):(m++,g=f(b.article),f(g).appendTo(a.find(".tdc-content-wrap")),h=e=b.id,g.filter("#tdb-infinte-post-"+h+"-iframe").load(function(){var b= f(this);tdbAutoload.is_ajax_running=!1;tdbAutoload._ajaxLoadingEnd(a);b.css("opacity",1);setTimeout(function(){var a=b.contents().find("html").outerHeight(!0)+2;tdbAutoload.log("initial iframe load height set to: "+a);b.height(a)},50);b.contents().find("html").attr("id",b.attr("id"));var g=c.MutationObserver||c.WebKitMutationObserver||c.MozMutationObserver,m=document.querySelector("#"+b.attr("id")),d=(m.contentDocument||m.contentWindow.document).getElementsByTagName("html"),e=l.debounce(function(){var a= d[0].offsetHeight;tdbAutoload.log("setHeight: height set to: "+a);b.height(a)},10);(new g(function(a){a.forEach(function(a){tdbAutoload.log("mutation occurred!");tdbAutoload.log(a);e()})})).observe(d[0],{childList:!0,subtree:!0})})))},error:function(a,b,g){}}))}},100);var p=l.debounce(function(){tdbAutoload.log("ajax_autoload > resize");f(".tdb-autoload-wrap").find(".tdb-infinte-post-iframe").each(function(){var a=f(this);a.height(a.contents().find("html").outerHeight())})},100),q=l.debounce(function(){tdbAutoload.log("ajax autoload > scroll location change"); tdbAutoload._locationChange()},10);"on"===g&&(d.scroll(b),d.scroll(q),d.resize(p),d.resize(function(){}),d.scroll(function(){}))}},_fixSmartSidebar:function(){var a=d.scrollTop(),g=a+d.height();f(".tdb-autoload-wrap").find("iframe").each(function(){var b=f(this),c=b.offset().top-f("#wpadminbar").outerHeight(),d=b.outerHeight(!0);b=b.attr("id");c<a&&c+d>g&&document.getElementById(b).contentWindow.tdSmartSidebar.td_events_scroll(a-c)})},_locationChange:function(){var a=d.scrollTop(),g=a+d.height(), b=[];f(".tdb-autoload-wrap").find("article, iframe").each(function(){var c=f(this);if(!c.parent().hasClass("wpb_video_wrapper")){var d=c.offset().top-(f(".td-header-menu-wrap.td-affix").outerHeight()+f("#wpadminbar").outerHeight()),e=c.outerHeight(!0),h=c.data("post-url"),k=c.data("post-edit-url");c=c.data("post-title");e=d+e;d<a&&e>g?b.push({top:d,bottom:e,post_url:h,post_edit_url:k,post_title:c}):d>a&&d<g?b.push({top:d,bottom:e,post_url:h,post_edit_url:k,post_title:c}):e>a&&e<g&&b.push({top:d,bottom:e, post_url:h,post_edit_url:k,post_title:c})}});if(0===b.length){var k=c.location.href;var e=c.tdb_globals.origPostEditUrl;var h=document.title}else 1===b.length?(h=b.pop(),k=h.post_url,e=h.post_edit_url,h=h.post_title):(k=b[0].post_url,e=b[0].post_edit_url,h=b[0].post_title);tdbAutoload._updatePostURL(k,e,h)},_updatePostURL:function(a,d,b){c.location.href===a||""===a||c.location.href.includes(a)||(c.history.replaceState(null,null,a),document.title=b,c.tdb_globals.isAdminBarShowing&&f("#wp-admin-bar-edit").find("a").attr("href", d))},_ajaxLoadingStart:function(a){f(".td-loader-gif").remove();a.find(".tdc-content-wrap").append('<div class="td-loader-gif td-loader-animation-start tdb-loader-autoload"></div>');tdLoadingBox.init(tds_theme_color_site_wide);setTimeout(function(){f(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")},50)},_ajaxLoadingEnd:function(a){a.find(".td-loader-gif").removeClass("td-loader-animation-mid").addClass("td-loader-animation-end");setTimeout(function(){a.find(".td-loader-gif").remove(); tdLoadingBox.stop()},400)},_getRestEndPoint:function(a,d){return l.isEmpty(c.tdb_globals.permalinkStructure)?c.tdb_globals.wpRestUrl+a+"&"+d:c.tdb_globals.wpRestUrl+a+"?"+d},_getUniqueID:function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},log:function(a,c){}};n.ready(function(){tdbAutoload.init()})})(jQuery,this,_);
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings