PageSourceSearch

https://mvif.ru/assets/js/cookie-banner.js

js mvif.ru collected 2026-09-28 06:37:28 UTC 2,540 bytes, 69 lines download raw bytes

1(function() {
2    // Создаем и добавляем стили для баннера
3    const style = document.createElement('style');
4    style.innerHTML = `
5        body {
6            font-family: Arial, sans-serif;
7        }
8        .cookie-banner-0611 {
9            position: fixed;
10            bottom: 0;
11            left: 0;
12            width: 100%;
13            background-color: #333;
14            color: white;
15            text-align: center;
16            padding: 8px 0;
17            z-index: 9999;
18        }
19        .cookie-banner-0611 a {
20            color: #086fb4;
21            text-decoration: none;
22        }
23        .cookie-banner-0611 a:hover {
24            color: #ff0000;
25        }
26        .cookie-banner-0611 button {
27            background-color: #086fb4;
28            border: none;
29            color: white;
30            font-size: 14px;
31            cursor: pointer;
32        }
33
34        .cookie-banner-0611 button:hover {
35            background-color: #ff0000;
36        }
37    `;
38    document.head.appendChild(style);
39
40    // Создаем HTML-структуру баннера
41    const banner = document.createElement('div');
42    banner.classList.add('cookie-banner-0611');
43    banner.innerHTML = `
44        На нашем сайте мы используем cookie для сбора информации технического характера, в том числе ваш IP-адрес. 
45        Продолжая использовать сайт, вы даете согласие на использование файлов cookie. </br>
46        <!--<a href="/" target="_blank">Политика конфиденциальности.</a>
47        <a href="/" target="_blank">Соглашение.</a>-->
48        <button id="close-cookie-banner-0611">Закрыть окно</button>
49    `;
50    document.body.appendChild(banner);
51
52    // Функция для проверки согласия
53    function checkCookieConsent() {
54        if (localStorage.getItem('cookie-consent') === 'true') {
55            banner.style.display = 'none';
56        } else {
57            banner.style.display = 'block';
58        }
59    }
60
61    // Закрытие баннера
62    document.getElementById('close-cookie-banner-0611').addEventListener('click', function() {
63        localStorage.setItem('cookie-consent', 'true');
64        banner.style.display = 'none';
65    });
66
67    // Проверяем, был ли дан consent
68    checkCookieConsent();
69})();

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.