vendor: 41,658 bytes, lines 1-819
1/*! 2 * jQuery & Zepto Lazy - v1.7.10 3 * http://jquery.eisbehr.de/lazy/ 4 * 5 * Copyright 2012 - 2018, Daniel 'Eisbehr' Kern 6 * 7 * Dual licensed under the MIT and GPL-2.0 licenses: 8 * http://www.opensource.org/licenses/mit-license.php 9 * http://www.gnu.org/licenses/gpl-2.0.html 10 * 11 * $("img.lazy").lazy(); 12 */ 13 14; 15(function (window, undefined) { 16 "use strict"; 17 18 // noinspection JSUnresolvedVariable 19 /** 20 * library instance - here and not in construct to be shorter in minimization 21 * @return void 22 */ 23 var $ = window.jQuery || window.Zepto, 24 /** 25 * unique plugin instance id counter 26 * @type {number} 27 */ 28 lazyInstanceId = 0, 29 /** 30 * helper to register window load for jQuery 3 31 * @type {boolean} 32 */ 33 windowLoaded = false; 34 35 /** 36 * make lazy available to jquery - and make it a bit more case-insensitive :) 37 * @access public 38 * @type {function} 39 * @param {object} settings 40 * @return {LazyPlugin} 41 */ 42 $.fn.Lazy = $.fn.lazy = function (settings) { 43 return new LazyPlugin(this, settings); 44 }; 45 46 /** 47 * helper to add plugins to lazy prototype configuration 48 * @access public 49 * @type {function} 50 * @param {string|Array} names 51 * @param {string|Array|function} [elements] 52 * @param {function} loader 53 * @return void 54 */ 55 $.Lazy = $.lazy = function (names, elements, loader) { 56 // make second parameter optional 57 if ($.isFunction(elements)) { 58 loader = elements; 59 elements = []; 60 } 61 62 // exit here if parameter is not a callable function 63 if (!$.isFunction(loader)) { 64 return; 65 } 66 67 // make parameters an array of names to be sure 68 names = $.isArray(names) ? names : [names]; 69 elements = $.isArray(elements) ? elements : [elements]; 70 71 var config = LazyPlugin.prototype.config, 72 forced = config._f || (config._f = {}); 73 74 // add the loader plugin for every name 75 for (var i = 0, l = names.length; i < l; i++) { 76 if (config[names[i]] === undefined || $.isFunction(config[names[i]])) { 77 config[names[i]] = loader; 78 } 79 } 80 81 // add forced elements loader 82 for (var c = 0, a = elements.length; c < a; c++) { 83 forced[elements[c]] = names[0]; 84 } 85 }; 86 87 /** 88 * contains all logic and the whole element handling 89 * is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance 90 * @access private 91 * @type {function} 92 * @param {LazyPlugin} instance 93 * @param {object} config 94 * @param {object|Array} items 95 * @param {object} events 96 * @param {string} namespace 97 * @return void 98 */ 99 function _executeLazy(instance, config, items, events, namespace) { 100 /** 101 * a helper to trigger the 'onFinishedAll' callback after all other events 102 * @access private 103 * @type {number} 104 */ 105 var _awaitingAfterLoad = 0, 106 /** 107 * visible content width 108 * @access private 109 * @type {number} 110 */ 111 _actualWidth = -1, 112 /** 113 * visible content height 114 * @access private 115 * @type {number} 116 */ 117 _actualHeight = -1, 118 /** 119 * determine possibly detected high pixel density 120 * @access private 121 * @type {boolean} 122 */ 123 _isRetinaDisplay = false, 124 /** 125 * dictionary entry for better minimization 126 * @access private 127 * @type {string} 128 */ 129 _afterLoad = 'afterLoad', 130 /** 131 * dictionary entry for better minimization 132 * @access private 133 * @type {string} 134 */ 135 _load = 'load', 136 /** 137 * dictionary entry for better minimization 138 * @access private 139 * @type {string} 140 */ 141 _error = 'error', 142 /** 143 * dictionary entry for better minimization 144 * @access private 145 * @type {string} 146 */ 147 _img = 'img', 148 /** 149 * dictionary entry for better minimization 150 * @access private 151 * @type {string} 152 */ 153 _src = 'src', 154 /** 155 * dictionary entry for better minimization 156 * @access private 157 * @type {string} 158 */ 159 _srcset = 'srcset', 160 /** 161 * dictionary entry for better minimization 162 * @access private 163 * @type {string} 164 */ 165 _sizes = 'sizes', 166 /** 167 * dictionary entry for better minimization 168 * @access private 169 * @type {string} 170 */ 171 _backgroundImage = 'background-image'; 172 173 /** 174 * initialize plugin 175 * bind loading to events or set delay time to load all items at once 176 * @access private 177 * @return void 178 */ 179 function _initialize() { 180 // detect actual device pixel ratio 181 // noinspection JSUnresolvedVariable 182 _isRetinaDisplay = window.devicePixelRatio > 1; 183 184 // prepare all initial items 185 items = _prepareItems(items); 186 187 // if delay time is set load all items at once after delay time 188 if (config.delay >= 0) { 189 setTimeout(function () { 190 _lazyLoadItems(true); 191 }, config.delay); 192 } 193 194 // if no delay is set or combine usage is active bind events 195 if (config.delay < 0 || config.combined) { 196 // create unique event function 197 events.e = _throttle(config.throttle, function (event) { 198 // reset detected window size on resize event 199 if (event.type === 'resize') { 200 _actualWidth = _actualHeight = -1; 201 } 202 203 // execute 'lazy magic' 204 _lazyLoadItems(event.all); 205 }); 206 207 // create function to add new items to instance 208 events.a = function (additionalItems) { 209 additionalItems = _prepareItems(additionalItems); 210 items.push.apply(items, additionalItems); 211 }; 212 213 // create function to get all instance items left 214 events.g = function () { 215 // filter loaded items before return in case internal filter was not running until now 216 return (items = $(items).filter(function () { 217 return !$(this).data(config.loadedName); 218 })); 219 }; 220 221 // create function to force loading elements 222 events.f = function (forcedItems) { 223 for (var i = 0; i < forcedItems.length; i++) { 224 // only handle item if available in current instance 225 // use a compare function, because Zepto can't handle object parameter for filter 226 // var item = items.filter(forcedItems[i]); 227 /* jshint loopfunc: true */ 228 var item = items.filter(function () { 229 return this === forcedItems[i]; 230 }); 231 232 if (item.length) { 233 _lazyLoadItems(false, item); 234 } 235 } 236 }; 237 238 // load initial items 239 _lazyLoadItems(); 240 241 // bind lazy load functions to scroll and resize event 242 // noinspection JSUnresolvedVariable 243 $(config.appendScroll).on('scroll.' + namespace + ' resize.' + namespace, events.e); 244 } 245 } 246 247 /** 248 * prepare items before handle them 249 * @access private 250 * @param {Array|object|jQuery} items 251 * @return {Array|object|jQuery} 252 */ 253 function _prepareItems(items) { 254 // fetch used configurations before loops 255 var defaultImage = config.defaultImage, 256 placeholder = config.placeholder, 257 imageBase = config.imageBase, 258 srcsetAttribute = config.srcsetAttribute, 259 loaderAttribute = config.loaderAttribute, 260 forcedTags = config._f || {}; 261 262 // filter items and only add those who not handled yet and got needed attributes available 263 items = $(items).filter(function () { 264 var element = $(this), 265 tag = _getElementTagName(this); 266 267 return !element.data(config.handledName) && 268 (element.attr(config.attribute) || element.attr(srcsetAttribute) || element.attr(loaderAttribute) || forcedTags[tag] !== undefined); 269 }) 270 271 // append plugin instance to all elements 272 .data('plugin_' + config.name, instance); 273 274 for (var i = 0, l = items.length; i < l; i++) { 275 var element = $(items[i]), 276 tag = _getElementTagName(items[i]), 277 elementImageBase = element.attr(config.imageBaseAttribute) || imageBase; 278 279 // generate and update source set if an image base is set 280 if (tag === _img && elementImageBase && element.attr(srcsetAttribute)) { 281 element.attr(srcsetAttribute, _getCorrectedSrcSet(element.attr(srcsetAttribute), elementImageBase)); 282 } 283 284 // add loader to forced element types 285 if (forcedTags[tag] !== undefined && !element.attr(loaderAttribute)) { 286 element.attr(loaderAttribute, forcedTags[tag]); 287 } 288 289 // set default image on every element without source 290 if (tag === _img && defaultImage && !element.attr(_src)) { 291 element.attr(_src, defaultImage); 292 } 293 294 // set placeholder on every element without background image 295 else if (tag !== _img && placeholder && (!element.css(_backgroundImage) || element.css(_backgroundImage) === 'none')) { 296 element.css(_backgroundImage, "url('" + placeholder + "')"); 297 } 298 } 299 300 return items; 301 } 302 303 /** 304 * the 'lazy magic' - check all items 305 * @access private 306 * @param {boolean} [allItems] 307 * @param {object} [forced] 308 * @return void 309 */ 310 function _lazyLoadItems(allItems, forced) { 311 // skip if no items where left 312 if (!items.length) { 313 // destroy instance if option is enabled 314 if (config.autoDestroy) { 315 // noinspection JSUnresolvedFunction 316 instance.destroy(); 317 } 318 319 return; 320 } 321 322 var elements = forced || items, 323 loadTriggered = false, 324 imageBase = config.imageBase || '', 325 srcsetAttribute = config.srcsetAttribute, 326 handledName = config.handledName; 327 328 // loop all available items 329 for (var i = 0; i < elements.length; i++) { 330 // item is at least in loadable area 331 if (allItems || forced || _isInLoadableArea(elements[i])) { 332 var element = $(elements[i]), 333 tag = _getElementTagName(elements[i]), 334 attribute = element.attr(config.attribute), 335 elementImageBase = element.attr(config.imageBaseAttribute) || imageBase, 336 customLoader = element.attr(config.loaderAttribute); 337 338 // is not already handled 339 if (!element.data(handledName) && 340 // and is visible or visibility doesn't matter 341 (!config.visibleOnly || element.is(':visible')) && ( 342 // and image source or source set attribute is available 343 (attribute || element.attr(srcsetAttribute)) && ( 344 // and is image tag where attribute is not equal source or source set 345 (tag === _img && (elementImageBase + attribute !== element.attr(_src) || element.attr(srcsetAttribute) !== element.attr(_srcset))) || 346 // or is non image tag where attribute is not equal background 347 (tag !== _img && elementImageBase + attribute !== element.css(_backgroundImage)) 348 ) || 349 // or custom loader is available 350 customLoader)) 351 { 352 // mark element always as handled as this point to prevent double handling 353 loadTriggered = true; 354 element.data(handledName, true); 355 356 // load item 357 _handleItem(element, tag, elementImageBase, customLoader); 358 } 359 } 360 } 361 362 // when something was loaded remove them from remaining items 363 if (loadTriggered) { 364 items = $(items).filter(function () { 365 return !$(this).data(handledName); 366 }); 367 } 368 } 369 370 /** 371 * load the given element the lazy way 372 * @access private 373 * @param {object} element 374 * @param {string} tag 375 * @param {string} imageBase 376 * @param {function} [customLoader] 377 * @return void 378 */ 379 function _handleItem(element, tag, imageBase, customLoader) { 380 // increment count of items waiting for after load 381 ++_awaitingAfterLoad; 382 383 // extended error callback for correct 'onFinishedAll' handling 384 var errorCallback = function () { 385 _triggerCallback('onError', element); 386 _reduceAwaiting(); 387 388 // prevent further callback calls 389 errorCallback = $.noop; 390 }; 391 392 // trigger function before loading image 393 _triggerCallback('beforeLoad', element); 394 395 // fetch all double used data here for better code minimization 396 var srcAttribute = config.attribute, 397 srcsetAttribute = config.srcsetAttribute, 398 sizesAttribute = config.sizesAttribute, 399 retinaAttribute = config.retinaAttribute, 400 removeAttribute = config.removeAttribute, 401 loadedName = config.loadedName, 402 elementRetina = element.attr(retinaAttribute); 403 404 // handle custom loader 405 if (customLoader) { 406 // on load callback 407 var loadCallback = function () { 408 // remove attribute from element 409 if (removeAttribute) { 410 element.removeAttr(config.loaderAttribute); 411 } 412 413 // mark element as loaded 414 element.data(loadedName, true); 415 416 // call after load event 417 _triggerCallback(_afterLoad, element); 418 419 // remove item from waiting queue and possibly trigger finished event 420 // it's needed to be asynchronous to run after filter was in _lazyLoadItems 421 setTimeout(_reduceAwaiting, 1); 422 423 // prevent further callback calls 424 loadCallback = $.noop; 425 }; 426 427 // bind error event to trigger callback and reduce waiting amount 428 element.off(_error).one(_error, errorCallback) 429 430 // bind after load callback to element 431 .one(_load, loadCallback); 432 433 // trigger custom loader and handle response 434 if (!_triggerCallback(customLoader, element, function (response) { 435 if (response) { 436 element.off(_load); 437 loadCallback(); 438 } else { 439 element.off(_error); 440 errorCallback(); 441 } 442 })) { 443 element.trigger(_error); 444 } 445 } 446 447 // handle images 448 else { 449 // create image object 450 var imageObj = $(new Image()); 451 452 // bind error event to trigger callback and reduce waiting amount 453 imageObj.one(_error, errorCallback) 454 455 // bind after load callback to image 456 .one(_load, function () { 457 // remove element from view 458 element.hide(); 459 460 // set image back to element 461 // do it as single 'attr' calls, to be sure 'src' is set after 'srcset' 462 if (tag === _img) { 463 element.attr(_sizes, imageObj.attr(_sizes)) 464 .attr(_srcset, imageObj.attr(_srcset)) 465 .attr(_src, imageObj.attr(_src)); 466 } else { 467 element.css(_backgroundImage, "url('" + imageObj.attr(_src) + "')"); 468 } 469 470 // bring it back with some effect! 471 element[config.effect](config.effectTime); 472 473 // remove attribute from element 474 if (removeAttribute) { 475 element.removeAttr(srcAttribute + ' ' + srcsetAttribute + ' ' + retinaAttribute + ' ' + config.imageBaseAttribute); 476 477 // only remove 'sizes' attribute, if it was a custom one 478 if (sizesAttribute !== _sizes) { 479 element.removeAttr(sizesAttribute); 480 } 481 } 482 483 // mark element as loaded 484 element.data(loadedName, true); 485 486 // call after load event 487 _triggerCallback(_afterLoad, element); 488 489 // cleanup image object 490 imageObj.remove(); 491 492 // remove item from waiting queue and possibly trigger finished event 493 _reduceAwaiting(); 494 }); 495 496 // set sources 497 // do it as single 'attr' calls, to be sure 'src' is set after 'srcset' 498 var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || ''; 499 imageObj.attr(_sizes, element.attr(sizesAttribute)) 500 .attr(_srcset, element.attr(srcsetAttribute)) 501 .attr(_src, imageSrc ? imageBase + imageSrc : null); 502 503 // call after load even on cached image 504 imageObj.complete && imageObj.trigger(_load); // jshint ignore : line 505 } 506 } 507 508 /** 509 * check if the given element is inside the current viewport or threshold 510 * @access private 511 * @param {object} element 512 * @return {boolean} 513 */ 514 function _isInLoadableArea(element) { 515 var elementBound = element.getBoundingClientRect(), 516 direction = config.scrollDirection, 517 threshold = config.threshold, 518 vertical = // check if element is in loadable area from top 519 ((_getActualHeight() + threshold) > elementBound.top) && 520 // check if element is even in loadable are from bottom 521 (-threshold < elementBound.bottom), 522 horizontal = // check if element is in loadable area from left 523 ((_getActualWidth() + threshold) > elementBound.left) && 524 // check if element is even in loadable area from right 525 (-threshold < elementBound.right); 526 527 if (direction === 'vertical') { 528 return vertical; 529 } else if (direction === 'horizontal') { 530 return horizontal; 531 } 532 533 return vertical && horizontal; 534 } 535 536 /** 537 * receive the current viewed width of the browser 538 * @access private 539 * @return {number} 540 */ 541 function _getActualWidth() { 542 return _actualWidth >= 0 ? _actualWidth : (_actualWidth = $(window).width()); 543 } 544 545 /** 546 * receive the current viewed height of the browser 547 * @access private 548 * @return {number} 549 */ 550 function _getActualHeight() { 551 return _actualHeight >= 0 ? _actualHeight : (_actualHeight = $(window).height()); 552 } 553 554 /** 555 * get lowercase tag name of an element 556 * @access private 557 * @param {object} element 558 * @returns {string} 559 */ 560 function _getElementTagName(element) { 561 return element.tagName.toLowerCase(); 562 } 563 564 /** 565 * prepend image base to all srcset entries 566 * @access private 567 * @param {string} srcset 568 * @param {string} imageBase 569 * @returns {string} 570 */ 571 function _getCorrectedSrcSet(srcset, imageBase) { 572 if (imageBase) { 573 // trim, remove unnecessary spaces and split entries 574 var entries = srcset.split(','); 575 srcset = ''; 576 577 for (var i = 0, l = entries.length; i < l; i++) { 578 srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : ''); 579 } 580 } 581 582 return srcset; 583 } 584 585 /** 586 * helper function to throttle down event triggering 587 * @access private 588 * @param {number} delay 589 * @param {function} callback 590 * @return {function} 591 */ 592 function _throttle(delay, callback) { 593 var timeout, 594 lastExecute = 0; 595 596 return function (event, ignoreThrottle) { 597 var elapsed = +new Date() - lastExecute; 598 599 function run() { 600 lastExecute = +new Date(); 601 // noinspection JSUnresolvedFunction 602 callback.call(instance, event); 603 } 604 605 timeout && clearTimeout(timeout); // jshint ignore : line 606 607 if (elapsed > delay || !config.enableThrottle || ignoreThrottle) { 608 run(); 609 } else { 610 timeout = setTimeout(run, delay - elapsed); 611 } 612 }; 613 } 614 615 /** 616 * reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero 617 * @access private 618 * @return void 619 */ 620 function _reduceAwaiting() { 621 --_awaitingAfterLoad; 622 623 // if no items were left trigger finished event 624 if (!items.length && !_awaitingAfterLoad) { 625 _triggerCallback('onFinishedAll'); 626 } 627 } 628 629 /** 630 * single implementation to handle callbacks, pass element and set 'this' to current instance 631 * @access private 632 * @param {string|function} callback 633 * @param {object} [element] 634 * @param {*} [args] 635 * @return {boolean} 636 */ 637 function _triggerCallback(callback, element, args) { 638 if ((callback = config[callback])) { 639 // jQuery's internal '$(arguments).slice(1)' are causing problems at least on old iPads 640 // below is shorthand of 'Array.prototype.slice.call(arguments, 1)' 641 callback.apply(instance, [].slice.call(arguments, 1)); 642 return true; 643 } 644 645 return false; 646 } 647 648 // if event driven or window is already loaded don't wait for page loading 649 if (config.bind === 'event' || windowLoaded) { 650 _initialize(); 651 } 652 653 // otherwise load initial items and start lazy after page load 654 else { 655 // noinspection JSUnresolvedVariable 656 $(window).on(_load + '.' + namespace, _initialize); 657 } 658 } 659 660 /** 661 * lazy plugin class constructor 662 * @constructor 663 * @access private 664 * @param {object} elements 665 * @param {object} settings 666 * @return {object|LazyPlugin} 667 */ 668 function LazyPlugin(elements, settings) { 669 /** 670 * this lazy plugin instance 671 * @access private 672 * @type {object|LazyPlugin|LazyPlugin.prototype} 673 */ 674 var _instance = this, 675 /** 676 * this lazy plugin instance configuration 677 * @access private 678 * @type {object} 679 */ 680 _config = $.extend({}, _instance.config, settings), 681 /** 682 * instance generated event executed on container scroll or resize 683 * packed in an object to be referenceable and short named because properties will not be minified 684 * @access private 685 * @type {object} 686 */ 687 _events = {}, 688 /** 689 * unique namespace for instance related events 690 * @access private 691 * @type {string} 692 */ 693 _namespace = _config.name + '-' + (++lazyInstanceId); 694 695 // noinspection JSUndefinedPropertyAssignment 696 /** 697 * wrapper to get or set an entry from plugin instance configuration 698 * much smaller on minify as direct access 699 * @access public 700 * @type {function} 701 * @param {string} entryName 702 * @param {*} [value] 703 * @return {LazyPlugin|*} 704 */ 705 _instance.config = function (entryName, value) { 706 if (value === undefined) { 707 return _config[entryName]; 708 } 709 710 _config[entryName] = value; 711 return _instance; 712 }; 713 714 // noinspection JSUndefinedPropertyAssignment 715 /** 716 * add additional items to current instance 717 * @access public 718 * @param {Array|object|string} items 719 * @return {LazyPlugin} 720 */ 721 _instance.addItems = function (items) { 722 _events.a && _events.a($.type(items) === 'string' ? $(items) : items); // jshint ignore : line 723 return _instance; 724 }; 725 726 // noinspection JSUndefinedPropertyAssignment 727 /** 728 * get all left items of this instance 729 * @access public 730 * @returns {object} 731 */ 732 _instance.getItems = function () { 733 return _events.g ? _events.g() : {}; 734 }; 735 736 // noinspection JSUndefinedPropertyAssignment 737 /** 738 * force lazy to load all items in loadable area right now 739 * by default without throttle 740 * @access public 741 * @type {function} 742 * @param {boolean} [useThrottle] 743 * @return {LazyPlugin} 744 */ 745 _instance.update = function (useThrottle) { 746 _events.e && _events.e({}, !useThrottle); // jshint ignore : line 747 return _instance; 748 }; 749 750 // noinspection JSUndefinedPropertyAssignment 751 /** 752 * force element(s) to load directly, ignoring the viewport 753 * @access public 754 * @param {Array|object|string} items 755 * @return {LazyPlugin} 756 */ 757 _instance.force = function (items) { 758 _events.f && _events.f($.type(items) === 'string' ? $(items) : items); // jshint ignore : line 759 return _instance; 760 }; 761 762 // noinspection JSUndefinedPropertyAssignment 763 /** 764 * force lazy to load all available items right now 765 * this call ignores throttling 766 * @access public 767 * @type {function} 768 * @return {LazyPlugin} 769 */ 770 _instance.loadAll = function () { 771 _events.e && _events.e({all: true}, true); // jshint ignore : line 772 return _instance; 773 }; 774 775 // noinspection JSUndefinedPropertyAssignment 776 /** 777 * destroy this plugin instance 778 * @access public 779 * @type {function} 780 * @return undefined 781 */ 782 _instance.destroy = function () { 783 // unbind instance generated events 784 // noinspection JSUnresolvedFunction, JSUnresolvedVariable 785 $(_config.appendScroll).off('.' + _namespace, _events.e); 786 // noinspection JSUnresolvedVariable 787 $(window).off('.' + _namespace); 788 789 // clear events 790 _events = {}; 791 792 return undefined; 793 }; 794 795 // start using lazy and return all elements to be chainable or instance for further use 796 // noinspection JSUnresolvedVariable 797 _executeLazy(_instance, _config, elements, _events, _namespace); 798 return _config.chainable ? elements : _instance; 799 } 800 801 /** 802 * settings and configuration data 803 * @access public 804 * @type {object|*} 805 */ 806 LazyPlugin.prototype.config = { 807 // general 808 name: 'lazy', 809 chainable: true, 810 autoDestroy: true, 811 bind: 'load', 812 threshold: 500, 813 visibleOnly: false, 814 appendScroll: window, 815 scrollDirection: 'both', 816 imageBase: null, 817 defaultImage: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', 818 placeholder: null, 819 delay: -1,
820 combined: false, 821 822 // attributes 823 attribute: 'data-src', 824 srcsetAttribute: 'data-srcset', 825 sizesAttribute: 'data-sizes', 826 retinaAttribute: 'data-retina', 827 loaderAttribute: 'data-loader', 828 imageBaseAttribute: 'data-imagebase', 829 removeAttribute: true, 830 handledName: 'handled', 831 loadedName: 'loaded', 832 833 // effect 834 effect: 'show', 835 effectTime: 0, 836 837 // throttle 838 enableThrottle: true, 839 throttle: 250, 840 841 // callbacks 842 beforeLoad: undefined, 843 afterLoad: undefined, 844 onError: undefined, 845 onFinishedAll: undefined 846 }; 847 848 // register window load event globally to prevent not loading elements 849 // since jQuery 3.X ready state is fully async and may be executed after 'load' 850 $(window).on('load', function () { 851 windowLoaded = true; 852 }); 853 })(window);
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.