PageSourceSearch

https://judu.lt/wp-content/themes/judu_2026/assets/js/lib/restricts.js

js judu.lt collected 2026-10-01 11:24:27 UTC 2,423 bytes, 92 lines download raw bytes

1/**
2 * Created by Daisoras on 2020-07-08.
3 * @link http://www.b-mod.com
4 *
5 */
6const getCookie = function (cname) {
7    let name = cname + "=";
8    let decodedCookie = decodeURIComponent(document.cookie);
9    let ca = decodedCookie.split(';');
10    for (let i = 0; i < ca.length; i++) {
11        let c = ca[i];
12        while (c.charAt(0) === ' ') {
13            c = c.substring(1);
14        }
15        if (c.indexOf(name) === 0) {
16            return c.substring(name.length, c.length);
17        }
18    }
19    return "";
20};
21
22const setCookie = function (cname, cvalue, exdays) {
23    let d, expires;
24    d = new Date;
25    d.setTime(d.getTime() + exdays * 1000 * 24 * 365 * 10);
26    expires = 'expires=' + d.toUTCString();
27    document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/';
28};
29
30window.dataLayer = window.dataLayer || [];
31
32function gtag() {
33    dataLayer.push(arguments);
34}
35
36// !function (f, b, e, v, n, t, s) {
37//     if (f.fbq) return;
38//     n = f.fbq = function () {
39//         n.callMethod ?
40//             n.callMethod.apply(n, arguments) : n.queue.push(arguments)
41//     };
42//     if (!f._fbq) f._fbq = n;
43//     n.push = n;
44//     n.loaded = !0;
45//     n.version = '2.0';
46//     n.queue = [];
47//     t = b.createElement(e);
48//     t.async = !0;
49//     t.src = v;
50//     s = b.getElementsByTagName(e)[0];
51//     s.parentNode.insertBefore(t, s)
52// }(window, document, 'script',
53//     'https://connect.facebook.net/en_US/fbevents.js');
54// gtag('js', new Date());
55// gtag('config', 'G-F3DR49S22P');
56//     gtag('js', new Date());
57
58if (getCookie('cookie_func') === 'false') {
59    // finction cookie
60}
61
62if (getCookie('cookie_3rd_stat') === 'false' &&  getCookie('cookie_3rd_adv') === 'false') {
63    // google
64    gtag('set', 'allow_google_signals', false);
65}
66
67if (getCookie('cookie_3rd_stat') === 'true') {
68    gtag('consent', 'update', {
69        'analytics_storage': 'granted'
70    });
71}
72
73if (getCookie('cookie_3rd_adv') === 'false') {
74    // google
75    gtag('set', 'allow_ad_personalization_signals', false);
76
77    // facebook
78    // fbq('consent', 'revoke');
79}
80if(getCookie('cookie_3rd_adv') === 'true'){
81   // fbq('consent', 'grant');
82    gtag('set', 'allow_ad_personalization_signals', true);
83    gtag('consent', 'update', {
84        'ad_user_data': 'granted',
85        'ad_personalization': 'granted',
86        'ad_storage': 'granted',
87    });
88}
89
90// facebook
91// fbq('init', 'fbId');
92// fbq('track', 'PageView');

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.