1$(document).ready(function() { 2 $('body *:not(script)').filter(function( index ) { 3 let $this = $(this); 4 let count = $this.css('column-count'); 5 count !== 'auto' && count !== 'unset' && $this.attr('column', ''); 6 }); 7 if (typeof $.initialize == 'function'){ 8 $.initialize('[column]:not([finish])', function() { 9 $this = $(this); 10 $this.on('column.update', function(){ 11 let count = $this.css('column-count'); 12 let orphans = $this.css('orphans'); 13 let padding = $this.css('column-gap'); 14 let children = $this.children(); 15 let waterFall = $(children.waterFall(count, orphans)); 16 waterFall.each(function(){ 17 this.wrapAll(`<div column-block style="width: calc(100% / ${count});padding: 0 ${padding}"/>`) 18 }); 19 20 (waterFall.length < count) && $this.append(`<div style="width: calc(100% / ${count})"/></div>`) 21 $this.attr('finish', '') 22 $this.css('column-count', 'unset').css('orphans', 'unset').css('column-gap', 'unset').css('display', 'flex'); 23 }).trigger('column.update'); 24 25 }); 26 } 27 /* 28 * This is column resize function 29 * @author Hugh 30 * @requires help.js 31 * @p.s. before all if use 32 * @void 33 */ 34 window.resizeClosure = window.resizeClosure || {}; 35 window.resizeClosure[23] = [ 36 window.waitForFinalEvent, 37 function(){ 38 $('[column]').each(function() { 39 $this = $(this); 40 $this.css('column-count', '').css('orphans', '').css('column-gap', ''); 41 // let count = $this.css('column-count'); 42 // let orphaned = $this.css('orphans'); 43 // let padding = $this.css('column-gap'); 44 $this.find('[column-block]').children().unwrap(); 45 $this.removeAttr('finish').html($this.html()); 46 $this.trigger('column.update'); 47 }); 48 }, 49 '01.column', 50 ]; 51});
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.