1/**==================================================================== 2 * 3 * QT Ajax Page Loader main script 4 * @author QantumThemes 5 * 6 ====================================================================**/ 7!function($){"use strict";$("body").append('<div id="qtajaxpreloadericon" class="qt-kenthapreloader-icon"><div class="preloader-wrapper big active"><div class="spinner-layer spinner-white-only"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div></div>');var qtAplSelector="#maincontent",qtBreadcrumbSelector="#qtBreadcrumb",qtAplMaincontent=$(qtAplSelector),atAplPreloader=$("#qtajaxpreloadericon"); 8/** 9 * [Before switching content let's scroll to top] 10 * @return {[bol]} 11 */$.fn.qtAplScrollTop=function(){return $("html, body").animate({scrollTop:0},100,"easeOutExpo"),!0}, 12/** 13 * [Main ajax initialization function] 14 */ 15$.fn.qtAplInitAjaxPageLoad=function(){ 16/** 17 * [ajax call] 18 * @param {[text]} link [url to load] 19 * @return {[bol]} 20 */ 21function qtAplExecuteAjaxLink(link){var docClass,parser;return $.ajax({url:link,success:function(data){ 22/* 23 * Retrive the contents 24 */ 25$.ajaxData=data,parser=new DOMParser,$.qtAplAjaxContents=$($.ajaxData).find(qtAplSelector).html(),$.qtAplAjaxBreadcrumb=$($.ajaxData).find(qtBreadcrumbSelector).html(),$.qtAplAjaxTitle=$($.ajaxData).filter("title").text(),docClass=$($.ajaxData).filter("body").attr("class"),$.qtAplBodyMatches=data.match(/<body.*class=["']([^"']*)["'].*>/),void 0!==$.qtAplBodyMatches?docClass=$.qtAplBodyMatches[1]:window.location.replace(link); 26// New method better working: 27var modifiedAjaxResult=data.replace(/<body/i,'<div id="re_body"').replace(/<\/body/i,"</div"),bodyClassesNew=$(modifiedAjaxResult).filter("#re_body").attr("class"), 28//20190527 29//Custom css change id 30js_composer_front_css=$(modifiedAjaxResult).filter("#js_composer_front-inline-css").text(); 31// since 2.0 checkbox skip 32if(bodyClassesNew&&(docClass=bodyClassesNew.split("qt-body-preloading").join("")),0<=bodyClassesNew.indexOf("qtapl-skip"))return window.location.replace(link);$.wpadminbar=$($.ajaxData).filter("#wpadminbar").html(),$.qtCustomTextFxStyles=$($.ajaxData).filter("#kentha-textfx-inline-css"),$("html").remove("#kentha-textfx-inline-css"),0<$.qtCustomTextFxStyles.length&&$("head").append('<style id="kentha-textfx-inline-css" >'+$.qtCustomTextFxStyles.text()+"</style>"),$.visual_composer_styles=$($.ajaxData).filter("style[data-type=vc_shortcodes-custom-css]").text(), 33/** 34 * [if we have WPML plugin language selector] 35 */ 36$("#qwLLT")&&($.langswitcher=$($.ajaxData).find("#qwLLT").html()) 37/* 38 * Start putting the data in the page 39 */,void 0!==docClass&&void 0!==$.qtAplAjaxContents?($("body").attr("class",docClass),$("title").text($.qtAplAjaxTitle),$("#wpadminbar").html($.wpadminbar),$("#qwLLT").html($.langswitcher),$.qtAplAjaxBreadcrumb&&$(qtBreadcrumbSelector)&&$(qtBreadcrumbSelector).html($.qtAplAjaxBreadcrumb),$("head").remove("#qt_ajax_vc_shortcodes_customcss"),0<$("style[data-type=vc_shortcodes-custom-css]").length?$("style[data-type=vc_shortcodes-custom-css]").append($.visual_composer_styles):$("head").append('<style id="qt_ajax_vc_shortcodes_customcss" data-type="vc_shortcodes-custom-css">'+$.visual_composer_styles+"</style>"), 40// 2019 may 27 js composer update css 41""!=js_composer_front_css&&0!=js_composer_front_css&&null!=js_composer_front_css?0<$("style#js_composer_front-inline-css").length?$("style#js_composer_front-inline-css").html(js_composer_front_css):$("head").append('<style id="js_composer_front-inline-css">'+js_composer_front_css+"</style>"):$("head style#js_composer_front-inline-css").remove(),qtAplMaincontent.html($.qtAplAjaxContents).delay(100).promise().done(function(){var scripts=qtAplMaincontent.find("script");0<scripts.length&&scripts.each(function(){eval($(this).html())}),!0===$.qtWebsiteObj.fn.initializeAfterAjax()?($.qtWebsiteObj.fn.initializeVisualComposerAfterAjax(),$(".wp-playlist").each(function(){return new WPPlaylistView({el:this})}),atAplPreloader.removeClass("qt-visible"),qtAplMaincontent.fadeTo("fast",1).promise().done(function(){
42// After reloading we scroll till the place of the anchor 43// Since 2019 04 18 + support internal links 44var t=link.split("#"),e=!1;if(1<t.length){var a=$("#"+t[1]);if(0<a.length){var s=a.offset().top;return void $("html, body").animate({scrollTop:s},1500,"swing")}}}), 45// Reload woocommerce scripts 46/** 47 * Skip ajax for WooCommerce endpoints 48 * Scripts are listed from qt-kentha-ajax-pageload/_woocommerce-support.php 49 * PHP function qt_ajax_pageload_wc_script_reload 50 */ 51$.each($("#qt-ajax-pageload-woocommerce-scripts").data(),function(t,e){$.getScript(e)})):window.location.replace(link)})):window.location.replace(link)},error:function(){ 52//Go to the link normally 53window.location.replace(link)}}),!0} 54/** 55 * Manage browser back and forward arrows 56 */$("body").off("click","a"), 57/** 58 * [Bind click function to all the links] 59 */ 60$("body").on("click","a",function(a){var t=$(this),s=$(this).attr("href");if(void 0===s)return a;if(""===s)return a; 61/** 62 * Skip ajax for WooCommerce endpoints 63 */$.each($("#qt-ajax-pageload-woocommerce-urls").data(),function(t,e){if(s===e) 64// alert('WooCommerce endpoint'); 65return a}); 66/** 67 * [exceptions that will skip ajax loading] 68 */ 69var e=/(\/respond|\/wp-admin|mailto:|\.zip|\.jpg|\.gif|\.mp3|\.pdf|\.png|\.rar|#noajax|noajax|download_file)/;if(t.hasClass("ajax_add_to_cart")||t.parent().hasClass("noajax")||!s.match(document.domain)||"_blank"===t.attr("target")||t.hasClass("noajax")||"submit"===t.attr("type")||"button"===t.attr("type")||s.match(e)) 70// alert('Non ajax loading for this link'); 71return a;if(s.match(document.domain)){if(a.preventDefault(),window.history.pushState){var o=s;o!==window.location&&window.history.pushState({path:o,state:"new"},"",o)} 72/** 73 * Close the sidebar and player 74 */$(".button-collapse").sideNav("hide"),$(".button-playlistswitch").sideNav("hide"),$("li.current_page_item").removeClass("current_page_item"),t.closest("li").addClass("current_page_item"),atAplPreloader.addClass("qt-visible"),qtAplMaincontent.fadeTo("fast",0,function(){$.fn.qtAplScrollTop()}).promise().done(function(){qtAplExecuteAjaxLink(s)})}}),$(window).on("popstate",function(t){var e;t.originalEvent.state,void 0!==(e=location.href)&&(e.match(document.domain)?qtAplMaincontent.fadeTo("fast",0,function(){$.fn.qtAplScrollTop()}).promise().done(function(){qtAplExecuteAjaxLink(e)}):window.location.replace(e))})},// $.fn.qtAplInitAjaxPageLoad 75/**==================================================================== 76 * 77 * Page Ready Trigger 78 * This needs to call only $.fn.qtInitTheme 79 * 80 ====================================================================*/ 81jQuery(document).ready(function(){$.fn.qtAplInitAjaxPageLoad()})}(jQuery); 82//# sourceMappingURL=qt-kentha-ajax-pageload-min.js.map
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.