PageSourceSearch

https://metall-door.ru/bitrix/templates/bo/js/priv.js

js metall-door.ru collected 2026-10-08 23:28:15 UTC 1,870 bytes, 54 lines download raw bytes

1function getCookie(name) {
2  var matches = document.cookie.match(new RegExp(
3    "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
4  ));
5  return matches ? decodeURIComponent(matches[1]) : undefined;
6}
7function setCookie(name, value, options) {
8  options = options || {};
9
10  var expires = options.expires;
11
12  if (typeof expires == "number" && expires) {
13    var d = new Date();
14    d.setTime(d.getTime() + expires * 1000);
15    expires = options.expires = d;
16  }
17  if (expires && expires.toUTCString) {
18    options.expires = expires.toUTCString();
19  }
20
21  value = encodeURIComponent(value);
22
23  var updatedCookie = name + "=" + value;
24
25  for (var propName in options) {
26    updatedCookie += "; " + propName;
27    var propValue = options[propName];
28    if (propValue !== true) {
29      updatedCookie += "=" + propValue;
30    }
31  }
32
33  document.cookie = updatedCookie;
34}
35
36
37$(document).ready(function(){
38    var url = new URL(window.location);
39    src = getCookie("hide_top_message");
40    if(!src){
41		$('body').prepend(`<div class="header-message">
42      <div class="header-message__inner container">
43        Для быстрой и удобной работы наш сайт использует cookies. Продолжая пользоваться сайтом, вы подтверждаете, 
44		что согласны на <a href="/agreement/" target="_blank">обработку данных</a> и ознакомились с <a href="/include/licenses_detail.php" target="_blank">политикой конфиденциальности</a>.
45		</div>
46      <button type="button" class="header-message__close">Принять</button>
47    </div>`);
48        $('.header-message__close').click(function(){
49			$('.header-message').css('display', 'none');
50			setCookie('hide_top_message', '1', {'expires':30*24*60*60, 'path': '/'});
51		})
52    }
53
54});

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.