Skip to content

Commit 52bb5bf

Browse files
committed
add
1 parent 002a854 commit 52bb5bf

8 files changed

Lines changed: 258 additions & 225 deletions

File tree

dist/main.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ var pref = {};
7474
pref["essential"] = "Essential cookies are necessary for the website to function properly.";
7575
pref["performance"] = "Performance cookies are used to analyze how visitors use a website.";
7676
pref["functionality"] = "Functionality cookies enable a website to remember information and provide enhanced features.";
77-
pref["advertising"] = "Advertising cookies are used to deliver advertisements relevant to the user's interests.";
78-
pref["third-party"] = "Third-party cookies are placed by domains other than the one the user is visiting.";
79-
pref["analytical"] = "Analytical cookies help website owners understand how visitors interact with the website.";
77+
pref["ads"] = "Advertising cookies are used to deliver advertisements relevant to the user's interests.";
78+
pref["thirdparty"] = "Third-party cookies are placed by domains other than the one the user is visiting.";
79+
pref["analytics"] = "Analytical cookies help website owners understand how visitors interact with the website.";
8080
pref["session"] = "Session cookies are temporary cookies that are erased when the user closes the browser.";
81-
pref["persistant"] = "Persistent cookies are stored on a user's device between browser sessions.";
81+
pref["persistent"] = "Persistent cookies are stored on a user's device between browser sessions.";
8282
pref["other"] = "All other cookies if any not listed in the above categories come under other cookies.";
8383
for (var key in pref) {
8484
if (pref.hasOwnProperty(key)) {
@@ -127,9 +127,9 @@ function wm_setConsent(consent) {
127127
essential: value,
128128
performance: value,
129129
functionality: value,
130-
advertising: value,
131-
thirdParty: value,
132-
analytical: value,
130+
ads: value,
131+
thirdparty: value,
132+
analytics: value,
133133
session: value,
134134
persistent: value,
135135
other: value
@@ -198,13 +198,12 @@ document.getElementById("wm_save-preferences").addEventListener("click", functio
198198
wm_setCookie("cookie_consent", preference, 365);
199199
wm_manageCookies();
200200
document.getElementById("wm_cookie-consent").style.display = "none";
201+
wm_loadAllowedScripts();
201202
});
202203
document.getElementById("wm_close-preferences").addEventListener("click", function() {
203204
document.getElementById("wm_cookie-preferences-modal").style.display = "none";
204205
wm_manageCookies();
205-
});
206-
document.getElementById("wm_cookie-manage").addEventListener("click", function() {
207-
document.getElementById("wm_cookie-consent").style.display = "block";
206+
wm_loadAllowedScripts();
208207
});
209208
function wm_start_cookies() {
210209
var cookies = document.cookie.split(";").reduce((cookiesObj, cookie2) => {
@@ -237,6 +236,7 @@ function wm_start_cookies() {
237236
});
238237
}
239238
}
239+
wm_loadAllowedScripts();
240240
}
241241
wm_start_cookies();
242242
function wm_manageCookies() {
@@ -266,6 +266,7 @@ function wm_manageCookies() {
266266
wm_start_cookies();
267267
wm_block_init();
268268
wm_unblock_init();
269+
wm_loadAllowedScripts();
269270
}
270271
wm_manageCookies();
271272
function wm_block_init() {
@@ -284,6 +285,7 @@ function wm_block_init() {
284285
localStorage.setItem("wm_cookie_blocked", JSON.stringify(blockCookies));
285286
wm_manageCookies();
286287
}
288+
wm_loadAllowedScripts();
287289
});
288290
});
289291
}
@@ -303,6 +305,7 @@ function wm_unblock_init() {
303305
wm_manageCookies();
304306
}
305307
}
308+
wm_loadAllowedScripts();
306309
});
307310
});
308311
}

dist/main.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)