PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/thread-self/root/proc/self/root/proc/self/cwd/wp-content/themes/jnews/assets/js/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/thread-self/root/proc/self/root/proc/self/cwd/wp-content/themes/jnews/assets/js/sidefeed.js

!function(t){"use strict";function e(){var e=t("#jeg_sidecontent");if(e.length){var i,a,n,s=t(".jeg_header.full").outerHeight()||0,o=t(".jeg_stickybar"),d=0,r=0;!function(){var e=t(".sidecontent_postwrapper");if(e.length){e.jScrollPane({mouseWheelSpeed:50});var i=e.data("jsp"),a=1==jnewsoption.admin_bar?32:0;t(window).on("resize load",(function(){t(window).width()>1024?e.css("height",t(window).height()-t(".jeg_side_heading").outerHeight()-a):(t("#jeg_sidecontent").css("height",t(window).height()-t(".jeg_navbar_mobile_wrapper").outerHeight()),e.css("height",t(window).height()-t(".jeg_side_heading").outerHeight()-t(".jeg_navbar_mobile_wrapper").outerHeight())),i.reinitialise()}))}}();var c=function(){r=t(window).scrollTop(),d=1==jnewsoption.admin_bar?32:0,o.length&&(i=o.css("-webkit-transform")||o.css("-moz-transform")||o.css("-ms-transform")||o.css("-o-transform")||o.css("transform"),a=i.replace(/[^0-9\-.,]/g,"").split(","),n=a[13]||a[5]),r>s?(e.addClass("fixed"),t(".jeg_header").hasClass("full")&&n>0&&o.length&&(d+=o.outerHeight())):(e.removeClass("fixed"),d=s+d),e.css({top:d})};t(window).width()>1024?t(window).on("scroll load",c):t(window).off("scroll load",c)}}window.jnews.sidefeed=window.jnews.sidefeed||{},window.jnews.sidefeed={init:function(){this.container=t("#jeg_sidecontent"),this.container.length&&(this.variable=window.side_feed,this.xhr=null,this.xhr_cache=[],this.lock_action=!1,this.current_post_id=jnewsoption.postid,this.min_prev_sidefeed=5,this.post_xhr=null,this.post_xhr_cache=[],this.tab=this.container.find(".jeg_side_tabs > li"),this.menu=this.container.find(".jeg_filter_menu a"),this.loadbutton=this.container.find(".sidefeed_loadmore button"),this.sidefeed=this.container.find(".jeg_sidefeed"),this.overlay_loader=this.container.find(".jeg_sidefeed_overlay"),this.sectionwrap=t(".post-wrapper"),this.postoverlay=t(".post-ajax-overlay"),this.bind_autoload(),this.bind_tab(),this.bind_menu(),this.bind_load_button(),jnewsoption.sidefeed_ajax&&this.bind_ajax())},load_first_item:function(){var e=this.sidefeed.find(".jeg_post").first();e&&t(e).find("a.ajax").trigger("click")},load_ajax:function(e,i,a){"append"===e?t(this.sidefeed).append(a.content):"replace"===e&&this.sidefeed.html(a.content),this.after_ajax_request(e,i,a)},cache_get:function(t){for(var e=JSON.stringify(t),i=0;i<this.xhr_cache.length;i++)if(this.xhr_cache[i].param==e)return this.xhr_cache[i].result;return!1},cache_save:function(t,e){var i=JSON.stringify(t);this.xhr_cache.push({param:i,result:e})},before_ajax_request:function(e){"append"===e?this.loadbutton.addClass("btn-loading").text(t(this.loadbutton).data("loading")):"replace"===e&&this.overlay_loader.show(),this.lock_action=!0},after_ajax_request:function(e,i,a){this.loadbutton.removeClass("btn-end").text(t(this.loadbutton).data("loadmore")),a.next?this.loadbutton.text(t(this.loadbutton).data("loadmore")):this.loadbutton.addClass("btn-end").text(t(this.loadbutton).data("end")),"append"===e?this.loadbutton.removeClass("loading"):"replace"===e&&(this.overlay_loader.hide(),this.load_first_item(),this.active_state_feed(this.current_post_id)),this.lock_action=!1,this.cache_save(i,a),this.reinitialize_view()},load_content:function(e){this.before_ajax_request(e);var i={action:"jnews_newsfeed_load",data:this.variable},a=this.cache_get(i);this.xhr&&this.xhr.abort(),a?this.load_ajax(e,i,a):this.xhr=t.ajax({url:jnews_ajax_url,type:"post",dataType:"json",data:i,success:t.proxy(this.load_ajax,this,e,i)})},bind_autoload:function(){var e=this;t(document).on("jnews-autoload-change-id",(function(t,i){e.current_post_id=i,e.active_state_feed(i)}))},bind_tab:function(){var e=this;e.tab.on("click",(function(i){i.preventDefault(),e.lock_action||(e.tab.removeClass("active"),t(this).addClass("active"),e.variable.sort_by=t(this).data("sort"),e.variable.paged=1,e.load_content("replace"))}))},bind_menu:function(){var e=this;e.menu.on("click",(function(i){i.preventDefault(),e.lock_action||(e.menu.removeClass("active"),t(this).addClass("active"),e.variable.include_category=t(this).data("id"),e.variable.paged=1,e.load_content("replace"))}))},bind_load_button:function(){var t=this;t.loadbutton.on("click",(function(e){e.preventDefault(),t.lock_action||t.loadbutton.hasClass("btn-end")||(t.variable.paged=t.variable.paged+1,t.load_content("append"))}))},bind_ajax:function(){jnewsoption.isblog&&window.history&&window.history.pushState&&this.ajax_dispatch(),window.history.pushState&&!jnewsoption.ismobile&&t(window).on("popstate",t.proxy(this.popstate,this))},popstate:function(t){if(void 0!==t.originalEvent){var e=t.originalEvent.state,i=location.href;"sidefeed"===e.type&&(this.current_post_id=e.postid,this.active_state_feed(this.current_post_id),this.do_request(i,!0))}},ajax_dispatch:function(){var e=this;e.sidefeed.on("click","a.ajax",(function(i){i.preventDefault();var a=t(this).parents(".jeg_post"),n=t(a).data("id"),s=t(this).attr("href");n==e.current_post_id||(t("body").removeClass("menu-active").removeClass("push-content-right"),e.current_post_id=n,e.set_side_active(a),e.do_request(s,!1))}))},do_request:function(e,i){var a=this;a.postoverlay.fadeIn(500,(function(){t(document).trigger("jnews-sidefeed-ajax-begin"),a.sectionwrap.height(t(window).height()),a.sectionwrap.find(".post-wrap").remove(),t("html, body").scrollTop(0),a.fetch_content(e,a.current_post_id,i)}))},active_state_feed:function(t){this.sidefeed.find(".jeg_post").removeClass("active");var e=this.sidefeed.find(".jeg_post[data-id="+t+"]").addClass("active");this.load_sidefeed_content(e),this.scroll_to_view(e)},load_sidefeed_content:function(t){for(var e=0;e<this.min_prev_sidefeed;e++)t.length&&(t=t.next());0===t.length&&this.try_load_sidefeed_content()},try_load_sidefeed_content:function(){this.loadbutton.trigger("click")},close_curtain:function(){this.postoverlay.fadeOut(500),this.sectionwrap.css({height:"auto"})},fetch_content:function(e,i,a){var n=this;null!==n.post_xhr&&n.post_xhr.abort(),n.post_xhr=t.ajax({url:e,type:"get",dataType:"html",success:function(t){a||window.history.pushState({postid:i,type:"sidefeed"},"",e),jnews.ajax_analytic.update(e,i),n.set_meta_data(t),n.setup_content(t,i)},timeout:function(){window.location=e}})},set_side_active:function(e){this.sidefeed.find(".jeg_post").removeClass("active"),t(e).addClass("active"),this.load_sidefeed_content(e),this.scroll_to_view(e)},reinitialize_view:function(){t(".sidecontent_postwrapper").data("jsp").reinitialise(),setTimeout((function(){window.dispatchEvent(new Event("resize"))}),500)},scroll_to_view:function(e){if(t(e).length){var i=t(".sidecontent_postwrapper"),a=i.data("jsp"),n=t(e).position().top,s=i.height(),o=n+t(".jspPane").position().top,d=t(e).height();if(o<0||o>s-d){var r=0;r=o<0?n-20:n-s+d+50,a.scrollTo(0,r)}}},set_meta_data:function(e){var i=t(e).filter("title").text(),a=t(e).filter("meta[name=keyword]").attr("content"),n=t(e).filter("meta[name=description]").attr("content");t("meta[name=description]").attr("content",n),t("meta[name=keyword]").attr("content",a),document.title=i},setup_content:function(e,i){var a=t(e).find(".post-wrap");this.sectionwrap.append(a);var n=t(e).find("#post-body-class").attr("class");t("body").attr("class",n),this.close_curtain(),t(document).trigger("jnews-sidefeed-ajax",[i]),t(document).trigger("jnews-ajax-load",[a])}},t(document).on("ready",(function(){e(),jnews.sidefeed.init()}))}(jQuery);