1(function ($) { 2 $.fn.down = function () { 3 var el = this[0] && this[0].firstChild; 4 while (el && el.nodeType != 1) 5 el = el.nextSibling; 6 return $(el); 7 }; 8 $.fn.exists = function () { 9 return this.length !== 0; 10 }; 11 if (!String.prototype.endsWith) { 12 Object.defineProperty(String.prototype, 'endsWith', { 13 value: function (searchString, position) { 14 var subjectString = this.toString(); 15 if (position === undefined || position > subjectString.length) { 16 position = subjectString.length; 17 } 18 position -= searchString.length; 19 var lastIndex = subjectString.indexOf(searchString, position); 20 return lastIndex !== -1 && lastIndex === position; 21 } 22 }); 23 } 24 if (!Array.prototype.includes) { 25 Object.defineProperty(Array.prototype, 'includes', { 26 value: function (searchElement, fromIndex) { 27 28 if (this == null) { 29 throw new TypeError('"this" is null or not defined'); 30 } 31 32 // 1. Let O be ? ToObject(this value). 33 var o = Object(this); 34 35 // 2. Let len be ? ToLength(? Get(O, "length")). 36 var len = o.length >>> 0; 37 38 // 3. If len is 0, return false. 39 if (len === 0) { 40 return false; 41 } 42 43 // 4. Let n be ? ToInteger(fromIndex). 44 // (If fromIndex is undefined, this step produces the value 0.) 45 var n = fromIndex | 0; 46 47 // 5. If n ⥠0, then 48 // a. Let k be n. 49 // 6. Else n < 0, 50 // a. Let k be len + n. 51 // b. If k < 0, let k be 0. 52 var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); 53 54 function sameValueZero(x, y) { 55 return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y)); 56 } 57 58 // 7. Repeat, while k < len 59 while (k < len) { 60 // a. Let elementK be the result of ? Get(O, ! ToString(k)). 61 // b. If SameValueZero(searchElement, elementK) is true, return true. 62 if (sameValueZero(o[k], searchElement)) { 63 return true; 64 } 65 // c. Increase k by 1. 66 k++; 67 } 68 69 // 8. Return false 70 return false; 71 } 72 }); 73 } 74})(jQuery);
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.