PageSourceSearch

https://www.xsexdoll.ai/wp-content/plugins/flexible-cookies/assets/js/cookie_blocker.js?ver=1.2.7

js xsexdoll.ai collected 2026-10-05 13:24:17 UTC 4,100 bytes, 97 lines download raw bytes

1const block_until_accepted = dataObject.block_until_accepted;
2const allowed_cookies = dataObject.allowed_cookies;
3const days_to_expire = 30;
4const expire_time = days_to_expire * 24 * 60 * 60;
5const cookie_path = '/';
6const plugin_cookies = dataObject.plugin_cookies;
7const accept_after_time = dataObject.accept_after_time;
8const accept_on_scroll = dataObject.accept_on_scroll;
9const time_to_accept = dataObject.accept_after;
10const patterns = dataObject.necessary_patterns;
11
12jQuery(window).scroll(function () {
13    if (accept_on_scroll  && flexibleCookiesFunctions.getCookieValue(plugin_cookies['bar']) === false) {
14        flexibleCookiesBlocker.acceptAllCookies();
15    }
16});
17
18jQuery(function () {
19    if (accept_after_time && flexibleCookiesFunctions.getCookieValue(plugin_cookies['bar']) === false) {
20        setTimeout(flexibleCookiesBlocker.acceptAllCookies, time_to_accept * 1000);
21    }
22})
23
24class FlexibleCookiesBlocker {
25
26    blockCookies() {
27        let cookies_array = flexibleCookiesFunctions.getCookiesArray();
28        cookies_array.forEach(function (cookie) {
29            if (!Object.values(allowed_cookies).includes(cookie.name) && !flexibleCookiesBlocker.containsNecessaryPattern(cookie.name)) {
30                flexibleCookiesBlocker.blockCookie(cookie.name);
31            }
32        });
33    }
34
35    blockCookie(cookie_name) {
36        flexibleCookiesFunctions.setCookie(cookie_name, '', {'expires':'Thu, 01 Jan 1970 00:00:00 UTC', 'path':'/', 'domain':'' });
37    }
38
39    acceptAllCookies() {
40        let categories = flexibleCookiesFunctions.getAllCategories();
41        flexibleCookiesUI.hideCookieBar();
42		flexibleCookiesUI.checkAllCategoryCheckboxes();
43        flexibleCookiesBlocker.savePreferences(categories.join(','));
44        flexibleCookiesFunctions.setCookie(plugin_cookies['accepted_all_cookies'], expire_time, {'max-age':expire_time, 'path':cookie_path });
45		if( typeof flexibleCookiesGTMConsentUpdater !== 'undefined' && flexibleCookiesGTMConsentUpdater !== null ){
46			flexibleCookiesGTMConsentUpdater.grantAll();
47		}
48    }
49
50    denyAllCookies() {
51        flexibleCookiesUI.hideCookieBar();
52        flexibleCookiesBlocker.savePreferences();
53		flexibleCookiesUI.uncheckAllCategoryCheckboxes();
54		if( typeof flexibleCookiesGTMConsentUpdater !== 'undefined' && flexibleCookiesGTMConsentUpdater !== null ){
55			let allowed_categories = flexibleCookiesFunctions.getAcceptedCategories();
56			flexibleCookiesGTMConsentUpdater.grantAcceptedCategories( allowed_categories );
57		}
58    }
59
60    acceptSelectedCookies() {
61		let allowed_categories = flexibleCookiesFunctions.getAcceptedCategories();
62        flexibleCookiesBlocker.savePreferences(allowed_categories.join(','));
63        flexibleCookiesBlocker.blockCookie(plugin_cookies['accepted_all_cookies']);
64        flexibleCookiesUI.hideCookiesSettingsWindow();
65        flexibleCookiesUI.hideCookieBar();
66		if( typeof flexibleCookiesGTMConsentUpdater !== 'undefined' && flexibleCookiesGTMConsentUpdater !== null ){
67			flexibleCookiesGTMConsentUpdater.grantAcceptedCategories( allowed_categories );
68		}
69    }
70
71    savePreferences(categories = '') {
72        flexibleCookiesFunctions.setCookie(plugin_cookies['bar'], expire_time, {'max-age':expire_time, 'path':cookie_path });
73        flexibleCookiesFunctions.setCookie(plugin_cookies['accepted_categories'], categories, {'max-age':expire_time, 'path':cookie_path });
74    }
75
76    containsNecessaryPattern(cookie_name) {
77        for (let i = 0; i < patterns.length; i++) {
78
79            if (cookie_name.includes(patterns[i])) {
80                return true;
81            }
82        }
83
84        return false;
85    }
86}
87
88jQuery(function () {
89    if (flexibleCookiesFunctions.getCookieValue(plugin_cookies['bar']) === false && block_until_accepted) {
90        flexibleCookiesBlocker.blockCookies();
91    }
92    else if (flexibleCookiesFunctions.getCookieValue(plugin_cookies['bar']) !== false && flexibleCookiesFunctions.getCookieValue(plugin_cookies['accepted_all_cookies']) === false) {
93        flexibleCookiesBlocker.blockCookies();
94    }
95
96});
97const flexibleCookiesBlocker = new FlexibleCookiesBlocker();

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.