PageSourceSearch

https://migrantcapital.ru/bitrix/components/vabank/cookieconsent/templates/.default/script.js

js migrantcapital.ru collected 2026-10-08 07:04:08 UTC 1,242 bytes, 28 lines download raw bytes

1/* vabank.cookieconsent — баннер согласия, запоминание выбора в localStorage. */
2(function () {
3    'use strict';
4    var KEY = 'vcc_consent';
5    function init(el) {
6        if (el._vcc) return;
7        el._vcc = true;
8        var accepted = false;
9        try { accepted = localStorage.getItem(KEY) === '1'; } catch (e) {}
10        if (accepted) { el.parentNode && el.parentNode.removeChild(el); return; }
11        el.hidden = false;
12        var btn = el.querySelector('.vcc-btn');
13        if (btn) btn.addEventListener('click', function () {
14            try { localStorage.setItem(KEY, '1'); } catch (e) {}
15            el.style.transition = 'opacity .2s,transform .2s';
16            el.style.opacity = '0';
17            el.style.transform = 'translateY(12px)';
18            setTimeout(function () { el.parentNode && el.parentNode.removeChild(el); }, 200);
19        });
20    }
21    function boot(scope) {
22        Array.prototype.forEach.call((scope || document).querySelectorAll('.vcc'), init);
23    }
24    if (document.readyState === 'loading') {
25        document.addEventListener('DOMContentLoaded', function () { boot(document); });
26    } else { boot(document); }
27    window.vabankCookieConsentInit = boot;
28})();

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.