PageSourceSearch

https://www.weatherbell.com/js/c_policy.js

js weatherbell.com collected 2026-10-02 04:59:09 UTC 3,268 bytes, 66 lines download raw bytes

1var docCookies = {
2    getItem: function (sKey) {
3        if (!sKey) {
4            return null;
5        }
6        return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
7    },
8    setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {
9        if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) {
10            return false;
11        }
12        var sExpires = "";
13        if (vEnd) {
14            switch (vEnd.constructor) {
15                case Number:
16                    sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd;
17                    /*
18                    Note: Despite officially defined in RFC 6265, the use of `max-age` is not compatible with any
19                    version of Internet Explorer, Edge and some mobile browsers. Therefore passing a number to
20                    the end parameter might not work as expected. A possible solution might be to convert the the
21                    relative time to an absolute time. For instance, replacing the previous line with:
22                    */
23                    /*
24                    sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; expires=" + (new Date(vEnd * 1e3 + Date.now())).toUTCString();
25                    */
26                    break;
27                case String:
28                    sExpires = "; expires=" + vEnd;
29                    break;
30                case Date:
31                    sExpires = "; expires=" + vEnd.toUTCString();
32                    break;
33            }
34        }
35        document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : "");
36        return true;
37    },
38    removeItem: function (sKey, sPath, sDomain) {
39        if (!this.hasItem(sKey)) {
40            return false;
41        }
42        document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "");
43        return true;
44    },
45    hasItem: function (sKey) {
46        if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) {
47            return false;
48        }
49        return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
50    },
51    keys: function () {
52        var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/);
53        for (var nLen = aKeys.length, nIdx = 0; nIdx < nLen; nIdx++) {
54            aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]);
55        }
56        return aKeys;
57    }
58};
59$(document).ready(function () {
60    $('#cookie-accept-button').click(function () {
61        $('#cookie-policy-wrapper').hide();
62        var hostnames_reversed = location.hostname.split('.').reverse();
63        var wildcard_domain = "." + hostnames_reversed[1] + "." + hostnames_reversed[0];
64        docCookies.setItem('cookie_policy_accepted', '1', Infinity, '/', wildcard_domain);
65    });
66});

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.