var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); //Masonry init jQuery(function($) { var $container; function nsc_trigger_masonry() { // don't proceed if $grid has not been selected if ( !$container ) { return; } $container.show(); // init Masonry $container.imagesLoaded( function() { $container.masonry({ itemSelector: '.hentry', isAnimated: true, animationOptions: { duration: 300, easing: 'linear', } }); }); } $(window).load(function(){ $container = $('.grid-layout'); // this is the grid container nsc_trigger_masonry(); // Triggers re-layout on infinite scroll $( document.body ).on( 'post-load', function () { // I removed the infinite_count code var $selector = $('.infinite-wrap'); var $elements = $selector.find('.hentry'); /* here is the idea which is to catch the selector whether it contain element or not, if it's move it to the masonry grid. */ if( $selector.children().length > 0 ) { $container.append( $elements ).masonry( 'appended', $elements, true ); nsc_trigger_masonry(); } }); }); }); Masonry.prototype._getItemLayoutPosition = function(item) { item.getSize(); // how many columns does this brick span var remainder = item.size.outerWidth % this.columnWidth; var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; // round if off by 1 pixel, otherwise use ceil var colSpan = Math[mathMethod](item.size.outerWidth / this.columnWidth); colSpan = Math.min(colSpan, this.cols); var colGroup = this._getColGroup(colSpan); // get the minimum Y value from the columns //var minimumY = Math.min.apply( Math, colGroup ); //var shortColIndex = colGroup.indexOf( minimumY ); var shortColIndex = this.items.indexOf(item) % this.cols; var minimumY = colGroup[shortColIndex]; // position the brick var position = { x: this.columnWidth * shortColIndex, y: minimumY }; // apply setHeight to necessary columns var setHeight = minimumY + item.size.outerHeight; var setSpan = this.cols + 1 - colGroup.length; for (var i = 0; i < setSpan; i++) { this.colYs[shortColIndex + i] = setHeight; } return position; }; } /* FILE ARCHIVED ON 08:09:04 Oct 21, 2017 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 10:17:05 May 16, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 1.631 exclusion.robots: 0.027 exclusion.robots.policy: 0.011 esindex: 0.014 cdx.remote: 42.603 LoadShardBlock: 392.208 (3) PetaboxLoader3.datanode: 178.192 (4) PetaboxLoader3.resolve: 219.365 (2) load_resource: 98.25 */