PageSourceSearch

https://starrcompanies.com/-/media/Base-Themes/Core-Libraries/scripts/ie-origin-fix.js

js starrcompanies.com collected 2026-09-24 19:05:25 UTC 2,575 bytes, 81 lines download raw bytes

1/* Taken from: http://tosbourn.com/a-fix-for-window-location-origin-in-internet-explorer/ */
2
3if (!window.location.origin) {
4  window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
5}
6
7if (typeof Array.prototype.filter === "undefined" )
8{
9  Array.prototype.filter = function(fun /*, thisp */)
10  {
11    "use strict";
12
13    if (this === void 0 || this === null)
14      throw new TypeError();
15
16    var t = Object(this);
17    var len = t.length >>> 0;
18    if (typeof fun !== "function")
19      throw new TypeError();
20
21    var res = [];
22    var thisp = arguments[1];
23    for (var i = 0; i < len; i++)
24    {
25      if (i in t)
26      {
27        var val = t[i]; // in case fun mutates this
28        if (fun.call(thisp, val, i, t))
29          res.push(val);
30      }
31    }
32
33    return res;
34  };
35};
36/* Take from https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/find */
37if (typeof Array.prototype.find === "undefined") {
38    Object.defineProperty(Array.prototype, 'find', {
39        value: function (predicate) {
40            // 1. Let O be ? ToObject(this value).
41            if (this == null) {
42                throw new TypeError('"this" is null or not defined');
43            }
44
45            var o = Object(this);
46
47            // 2. Let len be ? ToLength(? Get(O, "length")).
48            var len = o.length >>> 0;
49
50            // 3. If IsCallable(predicate) is false, throw a TypeError exception.
51            if (typeof predicate !== 'function') {
52                throw new TypeError('predicate must be a function');
53            }
54
55            // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
56            var thisArg = arguments[1];
57
58            // 5. Let k be 0.
59            var k = 0;
60
61            // 6. Repeat, while k < len
62            while (k < len) {
63                // a. Let Pk be ! ToString(k).
64                // b. Let kValue be ? Get(O, Pk).
65                // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
66                // d. If testResult is true, return kValue.
67                var kValue = o[k];
68                if (predicate.call(thisArg, kValue, k, o)) {
69                    return kValue;
70                }
71                // e. Increase k by 1.
72                k++;
73            }
74
75            // 7. Return undefined.
76            return undefined;
77        },
78        configurable: true,
79        writable: true
80    });
81};

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.