PageSourceSearch

https://dmyt.ru/wp-content/plugins/add-notice-coockie/public/js/cookieinfo.min.js

js dmyt.ru collected 2026-10-04 03:31:56 UTC 11,108 bytes, 163 lines download raw bytes

1! function(e) {
2    "use strict";
3    var t = e,
4        i = t.document,
5        o = "cbinstance";
6    var n = {
7            get: function(e) { return decodeURIComponent(i.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(e).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null },
8            set: function(e, t, o, n, s, r) {
9                if (!e || /^(?:expires|max\-age|path|domain|secure)$/i.test(e)) return !1;
10                var a = "";
11                if (o) switch (o.constructor) {
12                    case Number:
13                        a = o === 1 / 0 ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + o;
14                        break;
15                    case String:
16                        a = "; expires=" + o;
17                        break;
18                    case Date:
19                        a = "; expires=" + o.toUTCString()
20                }
21                return i.cookie = encodeURIComponent(e) + "=" + encodeURIComponent(t) + a + (s ? "; domain=" + s : "") + (n ? "; path=" + n : "") + (r ? "; secure" : ""), !0
22            },
23            has: function(e) { return new RegExp("(?:^|;\\s*)" + encodeURIComponent(e).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=").test(i.cookie) },
24            remove: function(e, t, o) { return !(!e || !this.has(e)) && (i.cookie = encodeURIComponent(e) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (o ? "; domain=" + o : "") + (t ? "; path=" + t : ""), !0) }
25        },
26        s = {
27            merge: function() {
28                var e, t = {},
29                    i = 0,
30                    o = arguments.length;
31                if (0 === o) return t;
32                for (; i < o; i++)
33                    for (e in arguments[i]) Object.prototype.hasOwnProperty.call(arguments[i], e) && (t[e] = arguments[i][e]);
34                return t
35            },
36            str2bool: function(e) {
37                switch ((e = "" + e).toLowerCase()) {
38                    case "false":
39                    case "no":
40                    case "0":
41                    case "":
42                        return !1;
43                    default:
44                        return !0
45                }
46            },
47            fade_in: function(e) { e.style.opacity < 1 && (e.style.opacity = (parseFloat(e.style.opacity) + .05).toFixed(2), t.setTimeout(function() { s.fade_in(e) }, 50)) },
48            get_data_attribs: function(e) {
49                var t = {};
50                if (Object.prototype.hasOwnProperty.call(e, "dataset")) t = e.dataset;
51                else {
52                    var i, o = e.attributes;
53                    for (i in o)
54                        if (Object.prototype.hasOwnProperty.call(o, i)) { var n = o[i]; if (/^data-/.test(n.name)) t[s.camelize(n.name.substr(5))] = n.value }
55                }
56                return t
57            },
58            normalize_keys: function(e) {
59                var t = {};
60                for (var i in e)
61                    if (Object.prototype.hasOwnProperty.call(e, i)) {
62                        var o = s.camelize(i);
63                        t[o] = e[o] ? e[o] : e[i]
64                    }
65                return t
66            },
67            camelize: function(e) {
68                for (var t = "-", i = e.indexOf(t); - 1 != i;) {
69                    var o = i === e.length - 1,
70                        n = o ? "" : e[i + 1],
71                        s = n.toUpperCase(),
72                        r = o ? t : t + n;
73                    i = (e = e.replace(r, s)).indexOf(t)
74                }
75                return e
76            },
77            find_script_by_id: function(e) {
78                for (var t = i.getElementsByTagName("script"), o = 0, n = t.length; o < n; o++)
79                    if (e === t[o].id) return t[o];
80                return null
81            }
82        },
83        r = s.find_script_by_id("cookieinfo"),
84        a = e.cookieinfo = function(e) { this.init(e) };
85    a.prototype = {
86        cookiejar: n,
87        init: function(t) {
88            this.inserted = !1, this.closed = !1, this.test_mode = !1;
89            if (this.default_options = { cookie: "we-love-cookies", closeText: "&#10006;", cookiePath: "/", debug: !1, expires: 1 / 0, zindex: 1e20, mask: !1, maskOpacity: .5, maskBackgroun
89d: "#999", height: "auto", minHeight: "21px", bg: "#eee", fg: "#333", link: "#31A8F0", divlink: "#000", divlinkbg: "#F1D600", position: "bottom", message: "We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.", linkmsg: "More info", scriptmsg: "cookie script", moreinfo: "http://wikipedia.org/wiki/HTTP_cookie", scriptinfo: "#", tracking: "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", effect: null, fontSize: "14px", fontFamily: "verdana, arial, sans-serif", instance: o, textAlign: "center", acceptOnScroll: !1 }, this.options = this.default_options, this.script_el = r, this.script_el) {
90                var i = s.get_data_attribs(this.script_el);
91                this.options = s.merge(this.options, i)
92            }
93            t && (t = s.normalize_keys(t), this.options = s.merge(this.options, t)), o = this.options.instance, this.options.zindex = parseInt(this.options.zindex, 10), this.options.mask = s.str2bool(this.options.mask), "string" == typeof this.options.expires && "function" == typeof e[this.options.expires] && (this.options.expires = e[this.options.expires]), "function" == typeof this.options.expires && (this.options.expires = this.options.expires()), this.script_el && this.run()
94        },
95        log: function() { "undefined" != typeof console && console.log.apply(console, arguments) },
96        run: function() {
97            if (!this.agreed()) {
98                var e = this;
99                ! function(e, t) {
100                    var i = !1,
101                        o = !0,
102                        n = e.document,
103                        s = n.documentElement,
104                        r = n.addEventListener ? "addEventListener" : "attachEvent",
105                        a = n.addEventListener ? "removeEventListener" : "detachEvent",
106                        c = n.addEventListener ? "" : "on",
107                        l = function(o) { "readystatechange" == o.type && "complete" != n.readyState || (("load" == o.type ? e : n)[a](c + o.type, l, !1), !i && (i = !0) && t.call(e, o.type || o)) },
108                        p = function() {
109                            try { s.doScroll("left") } catch (e) { return void setTimeout(p, 50) }
110                            l("poll")
111                        };
112                    if ("complete" == n.readyState) t.call(e, "lazy");
113                    else {
114                        if (n.createEventObject && s.doScroll) {
115                            try { o = !e.frameElement } catch (e) {}
116                            o && p()
117                        }
118                        n[r](c + "DOMContentLoaded", l, !1), n[r](c + "readystatechange", l, !1), e[r](c + "load", l, !1)
119                    }
120                }(t, function() { e.insert() })
121            }
122        },
123        build_viewport_mask: function() {
124            var e = null;
125            if (!0 === this.options.mask) {
126                var t = this.options.maskOpacity,
127                    o = '<div id="cookieinfo-mask" style="position:fixed;top:0;left:0;width:100%;height:100%;background:' + this.options.maskBackground + ";zoom:1;filter:alpha(opacity=" + 100 * t + ");opacity:" + t + ";z-index:" + this.options.zindex + ';"></div>',
128                    n = i.createElement("div");
129                n.innerHTML = o, e = n.firstChild
130            }
131            return e
132        },
133        agree: function() { return this.cookiejar.set(this.options.cookie, 1, this.options.expires, this.options.cookiePath), !0 },
134        agreed: function() { return this.cookiejar.has(this.options.cookie) },
135        close: function() { return this.inserted && (this.closed || (this.element && this.element.parentNode.removeChild(this.element), this.element_mask && this.element_mask.parentNode.removeChild(this.element_mask), this.closed = !0)), this.closed },
136        agree_and_close: function() { return this.agree(), this.close() },
137        cleanup: function() { return this.close(), this.unload() },
138        unload: function() { return this.script_el && this.script_el.parentNode.removeChild(this.script_el), e[o] = void 0, !0 },
139        insert: function() {
140            this.element_mask = this.build_viewport_mask();
141            var e = this.options.zindex;
142            this.element_mask && (e += 1);
143            var t = i.createElement("div");
144            t.className = "cookieinfo", t.style.position = "fixed", t.style.left = 0, t.style.right = 0, t.style.height = this.options.height, t.style.minHeight = this.options.minHeight, t.style.zIndex = e, t.style.background = this.options.bg, t.style.color = this.options.fg, t.style.lineHeight = t.style.minHeight, t.style.padding = "8px 18px", t.style.fontFamily = this.options.fontFamily, t.style.fontSize = this.options.fontSize, t.style.textAlign = this.options.textAlign, "top" === this.options.position ? t.style.top = 0 : t.style.bottom = 0, t.innerHTML = '<div class="cookieinfo-close" style="float:right;display:block;padding:5px 8px 5px 8px;min-width:100px;margin-left:5px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;">' + this.options.closeText + '</div><span style="display:block;padding:5px 0 5px 0;">' + this.options.message + " <a>" + this.options.linkmsg + "</a><img> <a>" + this.options.scriptmsg + "</a></span>", this.element = t;
145            var o = t.getElementsByTagName("a")[0];
146            o.href = this.options.moreinfo, o.style.textDecoration = "none", o.style.color = this.options.link;
147            var n = t.getElementsByTagName("a")[1];
148            n.href = this.options.scriptinfo, n.style.textDecoration = "none", n.style.display = "none", n.style.color = this.options.link;
149            var r = t.getElementsByTagName("div")[0];
150            r.style.cursor = "pointer", r.style.color = this.options.divlink, r.style.background = this.options.divlinkbg, r.style.textAlign = "center";
151            var a = t.getElementsByTagName("img")[0];
152
153            function c(e, t, i) {
154                var o = e.addEventListener ? "addEventListener" : "attachEvent",
155                    n = e.addEventListener ? "" : "on";
156                e[o](n + t, i, !1)
157            }
158            a.src = this.options.tracking, a.style.display = "none";
159            var l = this;
160            c(r, "click", function() { l.agree_and_close() }), this.element_mask && (c(this.element_mask, "click", function() { l.agree_and_close() }), i.body.appendChild(this.element_mask)), this.options.acceptOnScroll && c(window, "scroll", function() { l.agree_and_close() }), i.body.appendChild(this.element), this.inserted = !0, "fade" === this.options.effect ? (this.element.style.opacity = 0, s.fade_in(this.element)) : this.element.style.opacity = 1
161        }
162    }, r && (e[o] || (e[o] = new a))
163}(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.