File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ function setupSettings(hub) {
100
100
return currentSettings ;
101
101
}
102
102
103
+ function hasCookieConsented ( options ) {
104
+ return jsCookie . get ( options . policies . cookies . key ) === options . policies . cookies . hash ;
105
+ }
106
+
103
107
function setupButtons ( options ) {
104
108
var alertSystem = new Alert ( ) ;
105
109
@@ -117,9 +121,7 @@ function setupButtons(options) {
117
121
}
118
122
} ) ;
119
123
}
120
- var hasCookieConsented = function ( ) {
121
- return jsCookie . get ( options . policies . cookies . key ) === options . policies . cookies . hash ;
122
- } ;
124
+
123
125
if ( options . policies . cookies . enabled ) {
124
126
var getCookieTitle = function ( ) {
125
127
return 'Cookies & related technologies policy<br><p>Current consent status: <span style="color:' +
@@ -225,7 +227,7 @@ function initPolicies(options) {
225
227
if ( options . policies . cookies . enabled && storedCookieConsent !== '' &&
226
228
options . policies . cookies . hash !== storedCookieConsent ) {
227
229
simpleCooks . show ( ) ;
228
- } else if ( options . policies . cookies . enabled ) {
230
+ } else if ( options . policies . cookies . enabled && hasCookieConsented ( options ) ) {
229
231
analytics . initialise ( ) ;
230
232
}
231
233
}
You can’t perform that action at this time.
0 commit comments