-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcookie_consent.js
41 lines (37 loc) · 1.29 KB
/
cookie_consent.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
if (typeof CookieConsent == 'undefined') {
CookieConsent = {};
}
const CONFIG_CHECK = {
cookieTitle: Match.Optional(String),
acceptButtonText: Match.Optional(String),
cookieMessage: Match.Optional(String),
cookieMessageImply: Match.Optional(String),
position: Match.Optional(String),
showLink: Match.Optional(Boolean),
linkText: Match.Optional(String),
linkRouteName: Match.Optional(String),
html: Match.Optional(Boolean),
expirationInDays: Match.Optional(Number),
className: Match.Optional(String)
};
var _defaults = {
cookieTitle: "We use Cookies",
cookieMessage: "We are using cookies to give you the best experience on our site. Cookies are files stored in your browser and are used by most websites to help personalise your web experience.",
cookieMessageImply: "By continuing to use our website without changing the settings, you are agreeing to our use of cookies.",
showLink: true,
position: 'bottom',
linkText: "Read more",
linkRouteName: "/cookiePolicy",
acceptButtonText: "Accept and Continue",
html: false,
expirationInDays: 7,
forceShow: false
};
CookieConsent.getConfig = (paramName) => {
return _defaults[paramName];
};
CookieConsent.init = (config) => {
check(config, Object);
// Update the current configuration
_.extend(_defaults, config);
};