1jQuery(document).ready(function ($) { 2 $('.penci-featured-cat-sc').each(function () { 3 if ($(this).find('.pcflx-nav').length > 0) { 4 var maxnum = $(this).find('.pcflx li.all a').attr('data-maxp'); 5 if (parseInt(maxnum) <= 1) { 6 $(this).find('.pcflx-nav .pcaj-nav-link').addClass('disable'); 7 } 8 } 9 }); 10 jQuery('body').on('click', '.penci-featured-cat-sc .pc-ajaxfil-link', function (event) { 11 event.preventDefault(); 12 if (!$(this).hasClass('loading-posts')) { 13 var $this = $(this), 14 $navthis = $this, 15 wrapId = $this.data('id'), 16 parentclass = $(this).closest('.pcnav-lgroup'), 17 wrapper = $(this).closest('.penci-featured-cat-sc').find('.home-featured-cat-wrapper'), 18 tag = $this.data('tag'), 19 cat = $this.data('cat'), 20 author = $this.data('author'), 21 navlink = false, 22 prev, 23 pagednum = parseInt($this.attr('data-paged')), 24 curpaged = pagednum, 25 dataFilter, 26 $wrap_content_id = wrapper.find('.pwf-id-' + wrapId), 27 ppp = parentclass.data('ppp'), 28 OBjBlockData = penciGetOBjBlockData(parentclass.data('blockid')); 29 30 if (OBjBlockData.atts_json) { 31 var sanitizedJsonString = OBjBlockData.atts_json.replace(/[\u0000-\u001F]/g, ''); 32 33 try { 34 dataFilter = JSON.parse(sanitizedJsonString); 35 } catch (e) { 36 console.error("Error parsing JSON:", e); 37 } 38 } else { 39 dataFilter = OBjBlockData.atts_json; 40 } 41 42 $this.addClass('loading-posts'); 43 44 wrapper.addClass('loading-posts pcftaj-ld'); 45 46 if ($this.hasClass('pcaj-nav-link')) { 47 navlink = true; 48 } 49 50 if (navlink && $this.hasClass('prev')) { 51 prev = true; 52 } 53 54 if (navlink) { 55 $this = parentclass.find('.current-item'); 56 wrapId = $this.data('id'); 57 cat = $this.data('cat'); 58 tag = $this.data('tag'); 59 60 curpaged = parseInt($this.attr('data-paged')); 61 62 63 if (prev) { 64 pagednum = curpaged - 1; 65 } else { 66 pagednum = curpaged + 1; 67 } 68 } 69 70 if (!navlink) { 71 parentclass.find('.pc-ajaxfil-link').removeClass('current-item'); 72 $this.addClass('current-item'); 73 } 74 75 if ($wrap_content_id.length && !navlink) { 76 wrapper.find('.home-featured-cat-content').hide(); 77 wrapper.find('.pwf-id-' + wrapId).show(); 78 wrapper.removeClass('loading-posts pcftaj-ld'); 79 $this.removeClass('loading-posts'); 80 $navthis.removeClass('loading-posts'); 81 82 if (curpaged <= 1) { 83 parentclass.find('.pc-ajaxfil-link.prev').addClass('disable'); 84 } else { 85 parentclass.find('.pc-ajaxfil-link.prev').removeClass('disable'); 86 } 87 88 var maxp = undefined; 89 if (wrapId == 'default') { 90 maxp = parentclass.find('li.all .pc-ajaxfil-link').attr('data-maxp'); 91 } 92 93 if ($wrap_content_id.hasClass('pc-nomorepost') || parseInt(maxp) <= 1) { 94 parentclass.find('.pc-ajaxfil-link.next').addClass('disable'); 95 } else { 96 parentclass.find('.pc-ajaxfil-link.next').removeClass('disable'); 97 } 98 99 var o = 0; 100 $wrap_content_id.find('.hentry').each(function () { 101 o++; 102 $(this).addClass('penci-ajrs-animate').attr('style', 'animation-delay:' + o / 10 + 's') 103 }); 104 105 } else { 106 107 var data = { 108 action: 'penci_more_featured_post_ajax', 109 datafilter: dataFilter, 110 id: wrapId, 111 tag: tag, 112 cat: cat, 113 author: author, 114 ppp: ppp, 115 pagednum: pagednum, 116 nonce: pcfcat_ajax.nonce, 117 }; 118 119 $.ajax({ 120 type: "POST", 121 dataType: "html", 122 url: ajax_var_more.url, 123 data: data, 124 success: function (data) { 125 if (data) { 126 127 var data_paded = curpaged; 128 129 if (navlink) { 130 wrapper.find('.pwf-id-' + wrapId).remove(); 131 data_paded = curpaged + 1; 132 } 133 134 if (prev) { 135 data_paded = curpaged - 1; 136 } 137 138 if (data_paded <= 1) { 139 parentclass.find('.pc-ajaxfil-link.prev').addClass('disable'); 140 } else { 141 parentclass.find('.pc-ajaxfil-link.prev').removeClass('disable'); 142 } 143 144 wrapper.append(data); 145 146 if ($('.pwf-id-' + wrapId).hasClass('pc-nomorepost')) { 147 parentclass.find('.pc-ajaxfil-link.next').addClass('disable'); 148 } else { 149 parentclass.find('.pc-ajaxfil-link.next').removeClass('disable'); 150 } 151 152 $this.attr('data-paged', data_paded); 153 154 155 $(".home-featured-cat-wrapper").fitVids(); 156 157 $('body').trigger( 'penci_swiper_sliders' ); 158 159 if ($().easyPieChart) { 160 $('.penci-piechart').each(function () { 161 var $this = $(this); 162 $this.one('inview', function (event, isInView, visiblePartX, visiblePartY) { 163 var chart_args = { 164 barColor: $this.data('color'), 165 trackColor: $this.data('trackcolor'), 166 scaleColor: false, 167 lineWidth: $this.data('thickness'), 168 size: $this.data('size'), 169 animate: 1000 170 }; 171 $this.easyPieChart(chart_args); 172 }); // bind inview 173 }); // each 174 } 175 176 var $justified_gallery = $('.penci-post-gallery-container.justified'); 177 var $masonry_gallery = $('.penci-post-gallery-container.masonry'); 178 if ($().justifiedGallery && $justified_gallery.length) { 179 $('.penci-post-gallery-container.justified').each(function () { 180 var $this = $(this); 181 $this.justifiedGallery({ 182 rowHeight: $this.data('height'), 183 lastRow: 'nojustify', 184 margins: $this.data('margin'), 185 randomize: false 186 }); 187 }); // each .penci-post-gallery-container 188 } 189 190 if ($().isotope && $masonry_gallery.length) { 191 192 $('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function () { 193 var $this = $(this); 194 if ($this.attr('title')) { 195 var $title = $this.attr('title'); 196 $this.children().append('<div class="caption">' + $title + '</div>'); 197 } 198 }); 199 } 200 201 if ($masonry_gallery.length) { 202 $masonry_gallery.each(function () { 203 var $this = $(this); 204 $this.imagesLoaded(function () { 205 // initialize isotope 206 $this.isotope({ 207 itemSelector: '.item-gallery-masonry', 208 transitionDuration: '.55s', 209 layoutMode: 'masonry' 210 }); 211 212 $this.addClass('loaded'); 213 214 $('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function () { 215 var $this = $(this); 216 $this.one('inview', function (event, isInView, visiblePartX, visiblePartY) { 217 $this.addClass('animated'); 218 }); // inview 219 }); // each 220 }); 221 }); 222 } 223 224 if ($().theiaStickySidebar) { 225 var top_margin = 90; 226 if ($('body').hasClass('admin-bar')) { 227 top_margin = 122; 228 } 229 $('#main.penci-main-sticky-sidebar, #sidebar.penci-sticky-sidebar').theiaStickySidebar({ 230 // settings 231 additionalMarginTop: top_margin 232 }); 233 } // if sticky 234 235 wrapper.find('.home-featured-cat-content').hide(); 236 wrapper.find('.pwf-id-' + wrapId).show(); 237 wrapper.removeClass('loading-posts pcftaj-ld'); 238 $this.removeClass('loading-posts'); 239 $navthis.removeClass('loading-posts'); 240 $(document).trigger('penci_bf_check'); 241 242 var o = 0; 243 wrapper.find('.pwf-id-' + wrapId + ' .hentry').each(function () { 244 o++; 245 $(this).addClass('penci-ajrs-animate').attr('style', 'animation-delay:' + o / 10 + 's') 246 }); 247 } 248 } 249 }); 250 } 251 } 252 }); 253 254 function penciGetOBjBlockData($blockID) { 255 var $obj = new penciBlock(); 256 257 jQuery.each(penciBlocksArray, function (index, block) { 258 259 if (block.blockID === $blockID) { 260 $obj = penciBlocksArray[index]; 261 } 262 }); 263 264 return $obj; 265 } 266});
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.