PageSourceSearch

https://securelist.ru/wp-content/plugins/kaspersky-cookies-notification/scripts/alert.js?ver=1790865803

js securelist.ru collected 2026-10-02 04:35:58 UTC 4,170 bytes, 90 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function(event) { 
2  
3  function getCookie(name) {
4    var matches = document.cookie.match(new RegExp(
5      "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
6    ));
7    return matches ? decodeURIComponent(matches[1]) : undefined;
8  }
9  
10  var gdprAgreed = getCookie('cookie_accepted');
11  
12  function setCookie(name, value, options) {
13    options = options || {};
14
15    var expires = options.expires;
16
17    if (typeof expires == "number" && expires) {
18      var d = new Date();
19      d.setDate(d.getDate() + expires);
20      expires = options.expires = d;
21    }
22    
23    if (expires && expires.toUTCString) {
24      options.expires = expires.toUTCString();
25    }
26
27    value = encodeURIComponent(value);
28
29    var updatedCookie = name + "=" + value;
30
31    for (var propName in options) {
32      updatedCookie += "; " + propName;
33      var propValue = options[propName];
34      if (propValue !== true) {
35        updatedCookie += "=" + propValue;
36      }
37    }
38    document.cookie = updatedCookie;
39  }
40  
41  if (navigator.cookieEnabled) { 
42    
43    if (!gdprAgreed) {
44      var gdprPopup = '<div class="gdprPopup"><div class="gdprPopupContainer"><div class="gdprMessage">'+gdprStrings['text']+'</div><p class="gdprButton">'+gdprStrings['button']+'</div></div></div>';
45      document.querySelector('body').insertAdjacentHTML('beforeEnd', gdprPopup)
46      
47      document.querySelector('.gdprButton').onclick = function(){
48        event.preventDefault();
49        setCookie('cookie_accepted', true, {'expires':30,'path':'/'});
50        document.querySelector('.gdprPopup').parentNode.removeChild(document.querySelector('.gdprPopup'));
51      }
52
53      document.querySelector('*').setAttribute('style', 'box-sizing : border-box;');
54      document.querySelector('.gdprPopup').setAttribute('style', 'border : 1px solid black; background : rgba(0,0,0,.8); color : white; font-family : MuseoSans,Arial,Helvetica,sans-serif; font-size : 16px; position : fixed; left : 0; bottom : 0; width : 100%; z-index : 9999; font-size : .8em; padding-bottom : .5em; padding-top : 1em;');
55      document.querySelector('.gdprPopupContainer').setAttribute('style', 'width : 90%; max-width : 1030px; margin-left : auto; margin-right : auto;');
56      if (document.querySelector('.gdprPopupContainer a')) {
57        document.querySelector('.gdprPopupContainer a').setAttribute('style', 'color : white; text-decoration: underline;');
58      }
59      document.querySelector('.gdprMessage').setAttribute('style', 'width : 80%; float : left; margin-bottom : .5em; padding-bottom : .5em;');
60      document.querySelector('.gdprButton').setAttribute('style', 'position : relative; cursor : pointer; float : right; margin-right : -15px; width : auto; text-decoration : none; background-color : #006D5C; text-decoration : none; padding : 1.083em 1.5em; min-width : 12em; color : #FFF; font-size : .75em; border-radius : 1px; text-transform : uppercase; right : 0; top : 4px; margin-bottom : 10px;   text-align:center;transition : all .15s ease-in;box-sizing: border-box;');
61      
62      document.querySelector('.gdprButton').onmouseover = function(){
63        this.style.background = '#005446'
64      };
65
66      document.querySelector('.gdprButton').onmouseout = function(){
67        this.style.background = '#006D5C'
68      };
69
70      window.onresize = function() {
71        var w = window.innerWidth;
72        if(w < 655) {
73          if(document.querySelector('.gdprMessage') !== null){
74            document.querySelector('.gdprMessage').style.width = '100%';  
75            document.querySelector('.gdprButton').style.marginRight = '0'; 
76            document.querySelector('.gdprButton').style.width = '100%';
77          }
78        }
79        else {
80          if(document.querySelector('.gdprMessage') !== null){
81            document.querySelector('.gdprMessage').style.width = '80%';
82            document.querySelector('.gdprMessage').style.cssFloat = 'left';  
83            document.querySelector('.gdprButton').style.marginRight ='-15px';
84            document.querySelector('.gdprButton').style.width = 'auto';
85          }
86        }
87      };
88    }
89  }
90});

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.