Cookie Law / GDPR Info - Version 2.1.2

Version Description

  • Fix - Accept/Reject button is not working as expected with some themes.
Download this release

Release Info

Developer webtoffee
Plugin Icon Cookie Law / GDPR Info
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.1.2

admin/views/admin-settings-upgrade-pro.php CHANGED
@@ -124,11 +124,6 @@ if ( ! defined( 'WPINC' ) ) {
124
  <td><span class="wt-cli-badge wt-cli-error"></span></td>
125
  <td><span class="wt-cli-badge wt-cli-success"></span></td>
126
  </tr>
127
- <tr>
128
- <td><?php echo esc_html( __( 'Option to show ‘Do Not Sell My Personal Information’ link only to visitors from California', 'cookie-law-info' ) ); ?></td>
129
- <td><span class="wt-cli-badge wt-cli-error"></span></td>
130
- <td><span class="wt-cli-badge wt-cli-success"></span></td>
131
- </tr>
132
  <tr>
133
  <td><?php echo esc_html( __( 'Disable ‘Powered by CookieYes’ branding', 'cookie-law-info' ) ); ?>
134
  <br />
124
  <td><span class="wt-cli-badge wt-cli-error"></span></td>
125
  <td><span class="wt-cli-badge wt-cli-success"></span></td>
126
  </tr>
 
 
 
 
 
127
  <tr>
128
  <td><?php echo esc_html( __( 'Disable ‘Powered by CookieYes’ branding', 'cookie-law-info' ) ); ?>
129
  <br />
cookie-law-info.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
- * Version: 2.1.1
20
  * Author: WebToffee
21
  * Author URI: https://www.webtoffee.com/
22
  * License: GPLv3
@@ -70,7 +70,7 @@ define( 'CLI_ACTIVATION_ID', 'wtgdprcookieconsent' );
70
  * Currently plugin version.
71
  * Rename this for your plugin and update it as you release new versions.
72
  */
73
- define( 'CLI_VERSION', '2.1.1' );
74
 
75
  function wt_cookie_law_info_update_message( $data, $response ) {
76
  if ( isset( $data['upgrade_notice'] ) ) {
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
+ * Version: 2.1.2
20
  * Author: WebToffee
21
  * Author URI: https://www.webtoffee.com/
22
  * License: GPLv3
70
  * Currently plugin version.
71
  * Rename this for your plugin and update it as you release new versions.
72
  */
73
+ define( 'CLI_VERSION', '2.1.2' );
74
 
75
  function wt_cookie_law_info_update_message( $data, $response ) {
76
  if ( isset( $data['upgrade_notice'] ) ) {
includes/class-cookie-law-info.php CHANGED
@@ -74,7 +74,7 @@ class Cookie_Law_Info {
74
  if ( defined( 'CLI_VERSION' ) ) {
75
  $this->version = CLI_VERSION;
76
  } else {
77
- $this->version = '2.1.1';
78
  }
79
  $this->plugin_name = 'cookie-law-info';
80
 
74
  if ( defined( 'CLI_VERSION' ) ) {
75
  $this->version = CLI_VERSION;
76
  } else {
77
+ $this->version = '2.1.2';
78
  }
79
  $this->plugin_name = 'cookie-law-info';
80
 
public/js/cookie-law-info-public.js CHANGED
@@ -1,93 +1,91 @@
1
- CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
2
- CLI_PREFERNCE_COOKIE = (typeof CLI_PREFERNCE_COOKIE !== 'undefined' ? CLI_PREFERNCE_COOKIE : 'CookieLawInfoConsent');
3
  CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
4
- CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false);
5
- var CLI_Cookie = {
6
  set: function (name, value, days) {
7
  var secure = "";
8
- if ( true === Boolean( Cli_Data.secure_cookies ) ) {
9
  secure = ";secure";
10
  }
11
  if (days) {
12
  var date = new Date();
13
- date.setTime( date.getTime() + (days * 24 * 60 * 60 * 1000) );
14
  var expires = "; expires=" + date.toGMTString();
15
  } else {
16
  var expires = "";
17
  }
18
  document.cookie = name + "=" + value + secure + expires + "; path=/";
19
  if (days < 1) {
20
- host_name = window.location.hostname;
21
  document.cookie = name + "=" + value + expires + "; path=/; domain=." + host_name + ";";
22
- if (host_name.indexOf( "www" ) != 1) {
23
- var host_name_withoutwww = host_name.replace( 'www','' );
24
- document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name_withoutwww + ";";
25
  }
26
- host_name = host_name.substring( host_name.lastIndexOf( ".", host_name.lastIndexOf( "." ) - 1 ) );
27
  document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name + ";";
28
  }
29
  },
30
  read: function (name) {
31
  var nameEQ = name + "=";
32
- var ca = document.cookie.split( ';' );
33
  for (var i = 0; i < ca.length; i++) {
34
  var c = ca[i];
35
- while (c.charAt( 0 ) == ' ') {
36
- c = c.substring( 1, c.length );
37
  }
38
- if (c.indexOf( nameEQ ) === 0) {
39
- return c.substring( nameEQ.length, c.length );
40
  }
41
  }
42
  return null;
43
  },
44
  erase: function (name) {
45
- this.set( name, "", -10 );
46
  },
47
  exists: function (name) {
48
- return (this.read( name ) !== null);
49
  },
50
- getallcookies:function()
51
- {
52
- var pairs = document.cookie.split( ";" );
53
  var cookieslist = {};
54
  for (var i = 0; i < pairs.length; i++) {
55
- var pair = pairs[i].split( "=" );
56
- cookieslist[(pair[0] + '').trim()] = unescape( pair[1] );
57
  }
58
  return cookieslist;
59
  }
60
  }
61
- var CLI =
62
  {
63
- bar_config:{},
64
- showagain_config:{},
65
- allowedCategories:[],
66
  js_blocking_enabled: false,
67
- set:function(args)
68
- {
69
  if (typeof JSON.parse !== "function") {
70
- console.log( "CookieLawInfo requires JSON.parse but your browser doesn't support it" );
71
  return;
72
  }
73
  if (typeof args.settings !== 'object') {
74
- this.settings = JSON.parse( args.settings );
75
  } else {
76
  this.settings = args.settings;
77
  }
78
- this.js_blocking_enabled = Boolean( Cli_Data.js_blocking );
79
- this.settings = args.settings;
80
- this.bar_elm = jQuery( this.settings.notify_div_id );
81
- this.showagain_elm = jQuery( this.settings.showagain_div_id );
82
- this.settingsModal = jQuery( '#cliSettingsPopup' );
83
 
84
  /* buttons */
85
- this.main_button = jQuery( '.cli-plugin-main-button' );
86
- this.main_link = jQuery( '.cli-plugin-main-link' );
87
- this.reject_link = jQuery( '.cookie_action_close_header_reject' );
88
- this.delete_link = jQuery( ".cookielawinfo-cookie-delete" );
89
- this.settings_button = jQuery( '.cli_settings_button' );
90
- this.accept_all_button = jQuery( '.wt-cli-accept-all-btn' );
91
  if (this.settings.cookie_bar_as == 'popup') {
92
  CLI_COOKIEBAR_AS_POPUP = true;
93
  }
@@ -100,63 +98,49 @@ var CLI =
100
  this.configButtons();
101
  this.reviewConsent();
102
  var cli_hidebar_on_readmore = this.hideBarInReadMoreLink();
103
- if ( Boolean( this.settings.scroll_close ) === true && cli_hidebar_on_readmore === false) {
104
- window.addEventListener( "scroll",CLI.closeOnScroll, false );
105
  }
106
 
107
  },
108
- hideBarInReadMoreLink:function()
109
- {
110
- if ( Boolean( CLI.settings.button_2_hidebar ) === true && this.main_link.length > 0 && this.main_link.hasClass( 'cli-minimize-bar' )) {
111
  this.hideHeader();
112
- cliBlocker.cookieBar( false );
113
- this.showagain_elm.slideDown( this.settings.animate_speed_show );
114
  return true;
115
  }
116
  return false;
117
  },
118
- attachEvents:function()
119
- {
120
- jQuery( document ).on(
121
  'click',
122
  '.wt-cli-privacy-btn',
123
- function(e){
124
  e.preventDefault();
125
  CLI.accept_close();
126
  CLI.settingsPopUpClose();
127
  }
128
  );
129
 
130
- jQuery( '.cli_action_button' ).on(
131
  "click",
132
- function(e) {
133
  e.preventDefault();
134
- var elm = jQuery( this );
135
- var button_action = elm.attr( 'data-cli_action' );
136
- var open_link = elm[0].hasAttribute( "href" ) && elm.attr( "href" ) != '#' ? true : false;
137
- var new_window = false;
138
- if (button_action == 'accept') {
139
- CLI.accept_close();
140
- new_window = Boolean( CLI.settings.button_1_new_win ) ? true : false;
141
-
142
- } else if ( button_action == 'accept_all') {
143
- CLI.enableAllCookies();
144
- CLI.accept_close();
145
- new_window = CLI.settings.button_7_new_win ? true : false;
146
- } else if (button_action == 'reject') {
147
- CLI.disableAllCookies();
148
- CLI.reject_close();
149
- new_window = Boolean( CLI.settings.button_3_new_win ) ? true : false;
150
- }
151
- if (open_link) {
152
- if (new_window) {
153
- window.open( elm.attr( "href" ),'_blank' );
154
- } else {
155
- window.location.href = elm.attr( "href" );
156
- }
157
- }
158
- }
159
- );
160
  this.settingsPopUp();
161
  this.settingsTabbedAccordion();
162
  this.toggleUserPreferenceCheckBox();
@@ -164,42 +148,65 @@ var CLI =
164
  this.cookieLawInfoRunCallBacks();
165
 
166
  },
167
- toggleUserPreferenceCheckBox:function()
168
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
- jQuery( '.cli-user-preference-checkbox' ).each(
171
- function(){
172
 
173
- categoryCookie = 'cookielawinfo-' + jQuery( this ).attr( 'data-id' );
174
- categoryCookieValue = CLI_Cookie.read( categoryCookie );
175
- if ( categoryCookieValue == null ) {
176
- if (jQuery( this ).is( ':checked' )) {
177
- CLI_Cookie.set( categoryCookie,'yes',CLI_ACCEPT_COOKIE_EXPIRE );
178
  } else {
179
- CLI_Cookie.set( categoryCookie,'no',CLI_ACCEPT_COOKIE_EXPIRE );
180
  }
181
  } else {
182
  if (categoryCookieValue == "yes") {
183
- jQuery( this ).prop( "checked",true );
184
  } else {
185
- jQuery( this ).prop( "checked",false );
186
  }
187
 
188
  }
189
 
190
  }
191
  );
192
- jQuery( '.cli-user-preference-checkbox' ).on(
193
  "click",
194
- function(e) {
195
- var dataID = jQuery( this ).attr( 'data-id' );
196
- var currentToggleElm = jQuery( '.cli-user-preference-checkbox[data-id=' + dataID + ']' );
197
- if (jQuery( this ).is( ':checked' )) {
198
- CLI_Cookie.set( 'cookielawinfo-' + dataID,'yes',CLI_ACCEPT_COOKIE_EXPIRE );
199
- currentToggleElm.prop( 'checked',true );
200
  } else {
201
- CLI_Cookie.set( 'cookielawinfo-' + dataID,'no',CLI_ACCEPT_COOKIE_EXPIRE );
202
- currentToggleElm.prop( 'checked',false );
203
  }
204
  CLI.checkCategories();
205
  CLI.generateConsent();
@@ -207,133 +214,128 @@ var CLI =
207
  );
208
 
209
  },
210
- settingsPopUp:function()
211
- {
212
- jQuery( document ).on(
213
  'click',
214
  '.cli_settings_button',
215
- function(e){
216
  e.preventDefault();
217
- CLI.settingsModal.addClass( "cli-show" ).css( {'opacity':0} ).animate( {'opacity':1} );
218
- CLI.settingsModal.removeClass( 'cli-blowup cli-out' ).addClass( "cli-blowup" );
219
- jQuery( 'body' ).addClass( "cli-modal-open" );
220
- jQuery( ".cli-settings-overlay" ).addClass( "cli-show" );
221
- jQuery( "#cookie-law-info-bar" ).css( {'opacity':.1} );
222
- if ( ! jQuery( '.cli-settings-mobile' ).is( ':visible' )) {
223
- CLI.settingsModal.find( '.cli-nav-link:eq(0)' ).trigger( "click" );
224
  }
225
  }
226
  );
227
- jQuery( '#cliModalClose' ).on(
228
  "click",
229
- function(e) {
230
  CLI.settingsPopUpClose();
231
  }
232
  );
233
  CLI.settingsModal.on(
234
  "click",
235
- function(e) {
236
- if ( ! (document.getElementsByClassName( 'cli-modal-dialog' )[0].contains( e.target ))) {
237
  CLI.settingsPopUpClose();
238
  }
239
  }
240
  );
241
- jQuery( '.cli_enable_all_btn' ).on(
242
  "click",
243
- function(e) {
244
- var cli_toggle_btn = jQuery( this );
245
- var enable_text = cli_toggle_btn.attr( 'data-enable-text' );
246
- var disable_text = cli_toggle_btn.attr( 'data-disable-text' );
247
- if (cli_toggle_btn.hasClass( 'cli-enabled' )) {
248
  CLI.disableAllCookies();
249
- cli_toggle_btn.html( enable_text );
250
  } else {
251
  CLI.enableAllCookies();
252
- cli_toggle_btn.html( disable_text );
253
 
254
  }
255
- jQuery( this ).toggleClass( 'cli-enabled' );
256
  }
257
  );
258
 
259
  this.privacyReadmore();
260
  },
261
- settingsTabbedAccordion:function()
262
- {
263
- jQuery( ".cli-tab-header" ).on(
264
  "click",
265
- function(e) {
266
- if ( ! (jQuery( e.target ).hasClass( 'cli-slider' ) || jQuery( e.target ).hasClass( 'cli-user-preference-checkbox' ))) {
267
- if (jQuery( this ).hasClass( "cli-tab-active" )) {
268
- jQuery( this ).removeClass( "cli-tab-active" );
269
- jQuery( this )
270
- .siblings( ".cli-tab-content" )
271
- .slideUp( 200 );
272
 
273
  } else {
274
- jQuery( ".cli-tab-header" ).removeClass( "cli-tab-active" );
275
- jQuery( this ).addClass( "cli-tab-active" );
276
- jQuery( ".cli-tab-content" ).slideUp( 200 );
277
- jQuery( this )
278
- .siblings( ".cli-tab-content" )
279
- .slideDown( 200 );
280
  }
281
  }
282
  }
283
  );
284
  },
285
- settingsPopUpClose:function()
286
- {
287
- this.settingsModal.removeClass( 'cli-show' );
288
- this.settingsModal.addClass( 'cli-out' );
289
- jQuery( 'body' ).removeClass( "cli-modal-open" );
290
- jQuery( ".cli-settings-overlay" ).removeClass( "cli-show" );
291
- jQuery( "#cookie-law-info-bar" ).css( {'opacity':1} );
292
  },
293
- privacyReadmore:function()
294
- {
295
- var el = jQuery( '.cli-privacy-content .cli-privacy-content-text' );
296
- if ( el.length > 0 ) {
297
- var clone = el.clone(),
298
- originalHtml = clone.html(),
299
- originalHeight = el.outerHeight(),
300
- Trunc = {
301
- addReadmore:function(textBlock)
302
- {
303
- if (textBlock.html().length > 250) {
304
- jQuery( '.cli-privacy-readmore' ).show();
305
- } else {
306
- jQuery( '.cli-privacy-readmore' ).hide();
307
- }
308
- },
309
- truncateText : function( textBlock ) {
310
- var strippedText = jQuery( '<div />' ).html( textBlock.html() );
311
- strippedText.find( 'table' ).remove();
312
- textBlock.html( strippedText.html() );
313
- currentText = textBlock.text();
314
- if (currentText.trim().length > 250) {
315
- var newStr = currentText.substring( 0, 250 );
316
- textBlock.empty().html( newStr ).append( '...' );
 
 
317
  }
318
- },
319
- replaceText: function ( textBlock, original ){
320
- return textBlock.html( original );
321
- }
322
 
323
- };
324
- Trunc.addReadmore( el );
325
- Trunc.truncateText( el );
326
- jQuery( 'a.cli-privacy-readmore' ).on(
327
  "click",
328
- function(e) {
329
  e.preventDefault();
330
- if (jQuery( '.cli-privacy-overview' ).hasClass( 'cli-collapsed' )) {
331
- Trunc.truncateText( el );
332
- jQuery( '.cli-privacy-overview' ).removeClass( 'cli-collapsed' );
333
- el.css( 'height', '100%' );
334
  } else {
335
- jQuery( '.cli-privacy-overview' ).addClass( 'cli-collapsed' );
336
- Trunc.replaceText( el, originalHtml );
337
  }
338
 
339
  }
@@ -341,14 +343,13 @@ var CLI =
341
  }
342
 
343
  },
344
- attachDelete:function()
345
- {
346
  this.delete_link.on(
347
  "click",
348
- function(e) {
349
- CLI_Cookie.erase( CLI_ACCEPT_COOKIE_NAME );
350
  for (var k in Cli_Data.nn_cookie_ids) {
351
- CLI_Cookie.erase( Cli_Data.nn_cookie_ids[k] );
352
  }
353
  CLI.generateConsent();
354
  return false;
@@ -356,139 +357,136 @@ var CLI =
356
  );
357
 
358
  },
359
- configButtons:function()
360
- {
361
  /*[cookie_button] */
362
- this.main_button.css( 'color',this.settings.button_1_link_colour );
363
- if ( Boolean( this.settings.button_1_as_button ) ) {
364
- this.main_button.css( 'background-color',this.settings.button_1_button_colour );
365
 
366
  this.main_button.on(
367
  'mouseenter',
368
- function(){
369
- jQuery( this ).css( 'background-color',CLI.settings.button_1_button_hover );
370
  }
371
  )
372
- .on(
373
- 'mouseleave',
374
- function(){
375
- jQuery( this ).css( 'background-color',CLI.settings.button_1_button_colour );
376
- }
377
- );
378
  }
379
 
380
  /* [cookie_link] */
381
- this.main_link.css( 'color',this.settings.button_2_link_colour );
382
- if ( Boolean( this.settings.button_2_as_button ) ) {
383
- this.main_link.css( 'background-color',this.settings.button_2_button_colour );
384
 
385
  this.main_link.on(
386
  'mouseenter',
387
- function(){
388
- jQuery( this ).css( 'background-color',CLI.settings.button_2_button_hover );
389
  }
390
  )
391
- .on(
392
- 'mouseleave',
393
- function(){
394
- jQuery( this ).css( 'background-color',CLI.settings.button_2_button_colour );
395
- }
396
- );
397
 
398
  }
399
  /* [cookie_reject] */
400
- this.reject_link.css( 'color',this.settings.button_3_link_colour );
401
- if ( Boolean( this.settings.button_3_as_button ) ) {
402
 
403
- this.reject_link.css( 'background-color',this.settings.button_3_button_colour );
404
  this.reject_link.on(
405
  'mouseenter',
406
- function(){
407
- jQuery( this ).css( 'background-color',CLI.settings.button_3_button_hover );
408
  }
409
  )
410
- .on(
411
- 'mouseleave',
412
- function(){
413
- jQuery( this ).css( 'background-color',CLI.settings.button_3_button_colour );
414
- }
415
- );
416
  }
417
  /* [cookie_settings] */
418
- this.settings_button.css( 'color',this.settings.button_4_link_colour );
419
- if ( Boolean( this.settings.button_4_as_button ) ) {
420
- this.settings_button.css( 'background-color',this.settings.button_4_button_colour );
421
  this.settings_button.on(
422
  'mouseenter',
423
- function(){
424
- jQuery( this ).css( 'background-color',CLI.settings.button_4_button_hover );
425
  }
426
  )
427
- .on(
428
- 'mouseleave',
429
- function(){
430
- jQuery( this ).css( 'background-color',CLI.settings.button_4_button_colour );
431
- }
432
- );
433
  }
434
  /* [cookie_accept_all] */
435
- this.accept_all_button.css( 'color',this.settings.button_7_link_colour );
436
  if (this.settings.button_7_as_button) {
437
- this.accept_all_button.css( 'background-color',this.settings.button_7_button_colour );
438
  this.accept_all_button.on(
439
  'mouseenter',
440
- function(){
441
- jQuery( this ).css( 'background-color',CLI.settings.button_7_button_hover );
442
  }
443
  )
444
- .on(
445
- 'mouseleave',
446
- function(){
447
- jQuery( this ).css( 'background-color',CLI.settings.button_7_button_colour );
448
- }
449
- );
450
  }
451
  },
452
- toggleBar:function()
453
- {
454
  if (CLI_COOKIEBAR_AS_POPUP) {
455
- this.barAsPopUp( 1 );
456
  }
457
  if (CLI.settings.cookie_bar_as == 'widget') {
458
- this.barAsWidget( 1 );
459
  }
460
- if ( ! CLI_Cookie.exists( CLI_ACCEPT_COOKIE_NAME )) {
461
  this.displayHeader();
462
  } else {
463
  this.hideHeader();
464
  }
465
- if ( Boolean( this.settings.show_once_yn )) {
466
  setTimeout(
467
- function(){
468
  CLI.close_header();
469
  },
470
  CLI.settings.show_once
471
  );
472
  }
473
- if ( CLI.js_blocking_enabled === false ) {
474
- if ( Boolean( Cli_Data.ccpaEnabled ) === true ) {
475
- if ( Cli_Data.ccpaType === 'ccpa' && Boolean( Cli_Data.ccpaBarEnabled ) === false ) {
476
- cliBlocker.cookieBar( false );
477
  }
478
  } else {
479
- jQuery( '.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element' ).remove();
480
  }
481
  }
482
 
483
  this.showagain_elm.on(
484
  "click",
485
- function(e) {
486
  e.preventDefault();
487
  CLI.showagain_elm.slideUp(
488
  CLI.settings.animate_speed_hide,
489
- function()
490
- {
491
- CLI.bar_elm.slideDown( CLI.settings.animate_speed_show );
492
  if (CLI_COOKIEBAR_AS_POPUP) {
493
  CLI.showPopupOverlay();
494
  }
@@ -497,32 +495,31 @@ var CLI =
497
  }
498
  );
499
  },
500
- configShowAgain:function()
501
- {
502
  this.showagain_config = {
503
  'background-color': this.settings.background,
504
- 'color':this.l1hs( this.settings.text ),
505
  'position': 'fixed',
506
  'font-family': this.settings.font_family
507
  };
508
- if (Boolean( this.settings.border_on ) ) {
509
- var border_to_hide = 'border-' + this.settings.notify_position_vertical;
510
- this.showagain_config['border'] = '1px solid ' + this.l1hs( this.settings.border );
511
  this.showagain_config[border_to_hide] = 'none';
512
  }
513
- var cli_win = jQuery( window );
514
- var cli_winw = cli_win.width();
515
  var showagain_x_pos = this.settings.showagain_x_position;
516
  if (cli_winw < 300) {
517
- showagain_x_pos = 10;
518
  this.showagain_config.width = cli_winw - 20;
519
  } else {
520
  this.showagain_config.width = 'auto';
521
  }
522
  var cli_defw = cli_winw > 400 ? 500 : cli_winw - 20;
523
  if (CLI_COOKIEBAR_AS_POPUP) { /* cookie bar as popup */
524
- var sa_pos = this.settings.popup_showagain_position;
525
- var sa_pos_arr = sa_pos.split( '-' );
526
  if (sa_pos_arr[1] == 'left') {
527
  this.showagain_config.left = showagain_x_pos;
528
  } else if (sa_pos_arr[1] == 'right') {
@@ -547,8 +544,8 @@ var CLI =
547
  if (this.settings.notify_position_vertical == "top") {
548
  this.showagain_config.top = '0';
549
  } else if (this.settings.notify_position_vertical == "bottom") {
550
- this.bar_config['position'] = 'fixed';
551
- this.bar_config['bottom'] = '0';
552
  this.showagain_config.bottom = '0';
553
  }
554
  if (this.settings.notify_position_horizontal == "left") {
@@ -557,94 +554,89 @@ var CLI =
557
  this.showagain_config.right = showagain_x_pos;
558
  }
559
  }
560
- this.showagain_elm.css( this.showagain_config );
561
  },
562
- configBar:function()
563
- {
564
  this.bar_config = {
565
- 'background-color':this.settings.background,
566
- 'color':this.settings.text,
567
- 'font-family':this.settings.font_family
568
  };
569
  if (this.settings.notify_position_vertical == "top") {
570
  this.bar_config['top'] = '0';
571
- if ( Boolean( this.settings.header_fix ) === true) {
572
  this.bar_config['position'] = 'fixed';
573
  }
574
  } else {
575
  this.bar_config['bottom'] = '0';
576
  }
577
  this.configShowAgain();
578
- this.bar_elm.css( this.bar_config ).hide();
579
  },
580
- l1hs:function(str)
581
- {
582
- if (str.charAt( 0 ) == "#") {
583
- str = str.substring( 1, str.length );
584
  } else {
585
  return "#" + str;
586
  }
587
- return this.l1hs( str );
588
  },
589
- close_header:function()
590
- {
591
- CLI_Cookie.set( CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE );
592
  this.hideHeader();
593
  },
594
- accept_close:function()
595
- {
596
  this.hidePopupOverlay();
597
  this.generateConsent();
598
  this.cookieLawInfoRunCallBacks();
599
 
600
- CLI_Cookie.set( CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE );
601
- if ( Boolean( this.settings.notify_animate_hide ) ) {
602
- if ( CLI.js_blocking_enabled === true ) {
603
- this.bar_elm.slideUp( this.settings.animate_speed_hide, cliBlocker.runScripts );
604
  } else {
605
- this.bar_elm.slideUp( this.settings.animate_speed_hide );
606
  }
607
 
608
  } else {
609
- if ( CLI.js_blocking_enabled === true ) {
610
- this.bar_elm.hide( 0, cliBlocker.runScripts );
611
 
612
  } else {
613
  this.bar_elm.hide();
614
  }
615
  }
616
- if ( Boolean( this.settings.showagain_tab ) ) {
617
- this.showagain_elm.slideDown( this.settings.animate_speed_show );
618
  }
619
- if ( Boolean( this.settings.accept_close_reload ) === true ) {
620
  this.reload_current_page();
621
  }
622
  return false;
623
  },
624
- reject_close:function()
625
- {
626
  this.hidePopupOverlay();
627
  this.generateConsent();
628
  this.cookieLawInfoRunCallBacks();
629
  for (var k in Cli_Data.nn_cookie_ids) {
630
- CLI_Cookie.erase( Cli_Data.nn_cookie_ids[k] );
631
  }
632
- CLI_Cookie.set( CLI_ACCEPT_COOKIE_NAME,'no',CLI_ACCEPT_COOKIE_EXPIRE );
633
 
634
- if ( Boolean( this.settings.notify_animate_hide ) ) {
635
- if ( CLI.js_blocking_enabled === true ) {
636
 
637
- this.bar_elm.slideUp( this.settings.animate_speed_hide, cliBlocker.runScripts );
638
 
639
  } else {
640
 
641
- this.bar_elm.slideUp( this.settings.animate_speed_hide );
642
  }
643
 
644
  } else {
645
- if ( CLI.js_blocking_enabled === true ) {
646
 
647
- this.bar_elm.hide( cliBlocker.runScripts );
648
 
649
  } else {
650
 
@@ -653,33 +645,30 @@ var CLI =
653
  }
654
 
655
  }
656
- if ( Boolean( this.settings.showagain_tab ) ) {
657
- this.showagain_elm.slideDown( this.settings.animate_speed_show );
658
  }
659
- if ( Boolean( this.settings.reject_close_reload ) === true ) {
660
  this.reload_current_page();
661
  }
662
  return false;
663
  },
664
- reload_current_page:function()
665
- {
666
 
667
- window.location.reload( true );
668
  },
669
- closeOnScroll:function()
670
- {
671
- if (window.pageYOffset > 100 && ! CLI_Cookie.read( CLI_ACCEPT_COOKIE_NAME )) {
672
  CLI.accept_close();
673
- if ( Boolean( CLI.settings.scroll_close_reload ) === true) {
674
  window.location.reload();
675
  }
676
- window.removeEventListener( "scroll",CLI.closeOnScroll,false );
677
  }
678
  },
679
- displayHeader:function()
680
- {
681
- if ( Boolean( this.settings.notify_animate_show ) ) {
682
- this.bar_elm.slideDown( this.settings.animate_speed_show );
683
  } else {
684
  this.bar_elm.show();
685
  }
@@ -688,61 +677,57 @@ var CLI =
688
  this.showPopupOverlay();
689
  }
690
  },
691
- hideHeader:function()
692
- {
693
- if ( Boolean( this.settings.showagain_tab ) ) {
694
- if ( Boolean( this.settings.notify_animate_show ) ) {
695
- this.showagain_elm.slideDown( this.settings.animate_speed_show );
696
  } else {
697
  this.showagain_elm.show();
698
  }
699
  } else {
700
  this.showagain_elm.hide();
701
  }
702
- this.bar_elm.slideUp( this.settings.animate_speed_show );
703
  this.hidePopupOverlay();
704
  },
705
- hidePopupOverlay:function()
706
- {
707
- jQuery( 'body' ).removeClass( "cli-barmodal-open" );
708
- jQuery( ".cli-popupbar-overlay" ).removeClass( "cli-show" );
709
  },
710
- showPopupOverlay:function()
711
- {
712
- if ( this.bar_elm.length ) {
713
- if ( Boolean( this.settings.popup_overlay ) ) {
714
- jQuery( 'body' ).addClass( "cli-barmodal-open" );
715
- jQuery( ".cli-popupbar-overlay" ).addClass( "cli-show" );
716
  }
717
  }
718
 
719
  },
720
- barAsWidget:function(a)
721
- {
722
  var cli_elm = this.bar_elm;
723
- cli_elm.attr( 'data-cli-type','widget' );
724
- var cli_win = jQuery( window );
725
  var cli_winh = cli_win.height() - 40;
726
  var cli_winw = cli_win.width();
727
  var cli_defw = cli_winw > 400 ? 300 : cli_winw - 30;
728
  cli_elm.css(
729
  {
730
- 'width':cli_defw,'height':'auto','max-height':cli_winh,'overflow':'auto','position':'fixed','box-sizing':'border-box'
731
  }
732
  );
733
- if ( this.checkifStyleAttributeExist() === false ) {
734
- cli_elm.css( {'padding':'25px 15px'} );
735
  }
736
  if (this.settings.widget_position == 'left') {
737
  cli_elm.css(
738
  {
739
- 'left':'15px','right':'auto','bottom':'15px','top':'auto'
740
  }
741
  );
742
  } else {
743
  cli_elm.css(
744
  {
745
- 'left':'auto','right':'15px','bottom':'15px','top':'auto'
746
  }
747
  );
748
  }
@@ -750,34 +735,33 @@ var CLI =
750
  this.setResize();
751
  }
752
  },
753
- barAsPopUp:function(a)
754
- {
755
  if (typeof cookie_law_info_bar_as_popup === 'function') {
756
  return false;
757
  }
758
  var cli_elm = this.bar_elm;
759
- cli_elm.attr( 'data-cli-type','popup' );
760
- var cli_win = jQuery( window );
761
  var cli_winh = cli_win.height() - 40;
762
  var cli_winw = cli_win.width();
763
  var cli_defw = cli_winw > 700 ? 500 : cli_winw - 20;
764
 
765
  cli_elm.css(
766
  {
767
- 'width':cli_defw,'height':'auto','max-height':cli_winh,'bottom':'','top':'50%','left':'50%','margin-left':(cli_defw / 2) * -1,'margin-top':'-100px','overflow':'auto'
768
  }
769
- ).addClass( 'cli-bar-popup cli-modal-content' );
770
- if ( this.checkifStyleAttributeExist() === false ) {
771
- cli_elm.css( {'padding':'25px 15px'} );
772
  }
773
  cli_h = cli_elm.height();
774
- li_h = cli_h < 200 ? 200 : cli_h;
775
- cli_elm.css( {'top':'50%','margin-top':((cli_h / 2) + 30) * -1} );
776
  setTimeout(
777
- function(){
778
  cli_elm.css(
779
  {
780
- 'bottom':''
781
  }
782
  );
783
  },
@@ -787,15 +771,13 @@ var CLI =
787
  this.setResize();
788
  }
789
  },
790
- setResize:function()
791
- {
792
  var resizeTmr = null;
793
- jQuery( window ).resize(
794
- function() {
795
- clearTimeout( resizeTmr );
796
  resizeTmr = setTimeout(
797
- function()
798
- {
799
  if (CLI_COOKIEBAR_AS_POPUP) {
800
  CLI.barAsPopUp();
801
  }
@@ -809,96 +791,90 @@ var CLI =
809
  }
810
  );
811
  },
812
- enableAllCookies:function()
813
- {
814
 
815
- jQuery( '.cli-user-preference-checkbox' ).each(
816
- function(){
817
- var cli_chkbox_elm = jQuery( this );
818
- var cli_chkbox_data_id = cli_chkbox_elm.attr( 'data-id' );
819
  if (cli_chkbox_data_id != 'checkbox-necessary') {
820
- cli_chkbox_elm.prop( 'checked',true );
821
- CLI_Cookie.set( 'cookielawinfo-' + cli_chkbox_data_id,'yes',CLI_ACCEPT_COOKIE_EXPIRE );
822
  }
823
  }
824
  );
825
  },
826
- disableAllCookies:function()
827
- {
828
- jQuery( '.cli-user-preference-checkbox' ).each(
829
- function(){
830
 
831
- var cli_chkbox_elm = jQuery( this );
832
- var cli_chkbox_data_id = cli_chkbox_elm.attr( 'data-id' );
833
- cliCategorySlug = cli_chkbox_data_id.replace( 'checkbox-','' );
834
- if (Cli_Data.strictlyEnabled.indexOf( cliCategorySlug ) === -1) {
835
- cli_chkbox_elm.prop( 'checked',false );
836
- CLI_Cookie.set( 'cookielawinfo-' + cli_chkbox_data_id,'no',CLI_ACCEPT_COOKIE_EXPIRE );
837
  }
838
  }
839
  );
840
  },
841
- hideCookieBarOnClose: function() {
842
- jQuery( document ).on(
843
  'click',
844
  '.cli_cookie_close_button',
845
- function(e){
846
  e.preventDefault();
847
- var elm = jQuery( this );
848
- var button_action = elm.attr( 'data-cli_action' );
849
- if ( Cli_Data.ccpaType === 'ccpa' ) {
850
  CLI.enableAllCookies();
851
  }
852
  CLI.accept_close();
853
  }
854
  );
855
  },
856
- checkCategories:function()
857
- {
858
  var cliAllowedCategories = [];
859
- var cli_categories = {};
860
- jQuery( '.cli-user-preference-checkbox' ).each(
861
- function()
862
- { var status = false;
863
- cli_chkbox_elm = jQuery( this );
864
- cli_chkbox_data_id = cli_chkbox_elm.attr( 'data-id' );
865
- cli_chkbox_data_id = cli_chkbox_data_id.replace( 'checkbox-','' );
866
- cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace( '-','_' )
867
- if (jQuery( cli_chkbox_elm ).is( ':checked' )) {
868
  status = true;
869
- cliAllowedCategories.push( cli_chkbox_data_id );
870
  }
871
 
872
- cli_categories[cli_chkbox_data_id_trimmed] = status;
873
  }
874
  );
875
  CLI.allowedCategories = cliAllowedCategories;
876
  },
877
- cookieLawInfoRunCallBacks:function()
878
- {
879
  this.checkCategories();
880
- if (CLI_Cookie.read( CLI_ACCEPT_COOKIE_NAME ) == 'yes') {
881
  if ("function" == typeof CookieLawInfo_Accept_Callback) {
882
  CookieLawInfo_Accept_Callback();
883
  }
884
  }
885
  },
886
- generateConsent:function()
887
- {
888
- var preferenceCookie = CLI_Cookie.read( CLI_PREFERNCE_COOKIE );
889
- cliConsent = {};
890
  if (preferenceCookie !== null) {
891
- cliConsent = window.atob( preferenceCookie );
892
- cliConsent = JSON.parse( cliConsent );
893
  }
894
  cliConsent.ver = Cli_Data.consentVersion;
895
- categories = [];
896
- jQuery( '.cli-user-preference-checkbox' ).each(
897
- function(){
898
- categoryVal = '';
899
- cli_chkbox_data_id = jQuery( this ).attr( 'data-id' );
900
- cli_chkbox_data_id = cli_chkbox_data_id.replace( 'checkbox-','' );
901
- if (jQuery( this ).is( ':checked' )) {
902
  categoryVal = true;
903
  } else {
904
  categoryVal = false;
@@ -906,138 +882,132 @@ var CLI =
906
  cliConsent[cli_chkbox_data_id] = categoryVal;
907
  }
908
  );
909
- cliConsent = JSON.stringify( cliConsent );
910
- cliConsent = window.btoa( cliConsent );
911
- CLI_Cookie.set( CLI_PREFERNCE_COOKIE,cliConsent,CLI_ACCEPT_COOKIE_EXPIRE );
912
  },
913
- addStyleAttribute:function()
914
- {
915
- var bar = this.bar_elm;
916
  var styleClass = '';
917
- if (jQuery( bar ).find( '.cli-bar-container' ).length > 0) {
918
- styleClass = jQuery( '.cli-bar-container' ).attr( 'class' );
919
- styleClass = styleClass.replace( 'cli-bar-container','' );
920
  styleClass = styleClass.trim();
921
- jQuery( bar ).attr( 'data-cli-style',styleClass );
922
  }
923
  },
924
- getParameterByName: function( name, url ) {
925
- if ( ! url) {
926
  url = window.location.href;
927
  }
928
- name = name.replace( /[\[\]]/g, '\\$&' );
929
- var regex = new RegExp( '[?&]' + name + '(=([^&#]*)|&|#|$)' ),
930
- results = regex.exec( url );
931
- if ( ! results) {
932
  return null;
933
  }
934
- if ( ! results[2]) {
935
  return '';
936
  }
937
- return decodeURIComponent( results[2].replace( /\+/g, ' ' ) );
938
  },
939
- CookieLawInfo_Callback: function( enableBar, enableBlocking ) {
940
- enableBar = typeof enableBar !== 'undefined' ? enableBar : true;
941
  enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true;
942
- if ( CLI.js_blocking_enabled === true && Boolean( Cli_Data.custom_integration ) === true ) {
943
- cliBlocker.cookieBar( enableBar );
944
- cliBlocker.runScripts( enableBlocking );
945
  }
946
  },
947
- checkifStyleAttributeExist: function()
948
- {
949
  var exist = false;
950
- var attr = this.bar_elm.attr( 'data-cli-style' );
951
  if (typeof attr !== typeof undefined && attr !== false) {
952
  exist = true;
953
  }
954
  return exist;
955
  },
956
- reviewConsent : function()
957
- {
958
- jQuery( document ).on(
959
  'click',
960
  '.cli_manage_current_consent,.wt-cli-manage-consent-link',
961
- function(){
962
  CLI.displayHeader();
963
  }
964
  );
965
  },
966
- mayBeSetPreferenceCookie: function() {
967
- if ( CLI.getParameterByName( 'cli_bypass' ) === "1" ) {
968
  CLI.generateConsent();
969
  }
970
  }
971
  }
972
- var cliBlocker =
973
  {
974
  blockingStatus: true,
975
  scriptsLoaded: false,
976
- ccpaEnabled : false,
977
- ccpaRegionBased : false,
978
- ccpaApplicable : false,
979
  ccpaBarEnabled: false,
980
- cliShowBar: true ,
981
- isBypassEnabled: CLI.getParameterByName( 'cli_bypass' ),
982
- checkPluginStatus: function(callbackA , callbackB )
983
- {
984
- this.ccpaEnabled = Boolean( Cli_Data.ccpaEnabled );
985
- this.ccpaRegionBased = Boolean( Cli_Data.ccpaRegionBased );
986
- this.ccpaBarEnabled = Boolean( Cli_Data.ccpaBarEnabled );
987
 
988
- if ( Boolean( Cli_Data.custom_integration ) === true ) {
989
- callbackA( false );
990
  } else {
991
- if ( this.ccpaEnabled === true ) {
992
  this.ccpaApplicable = true;
993
- if ( Cli_Data.ccpaType === 'ccpa') {
994
- if ( this.ccpaBarEnabled !== true ) {
995
- this.cliShowBar = false;
996
  this.blockingStatus = false;
997
  }
998
  }
999
  } else {
1000
- jQuery( '.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element' ).remove();
1001
  }
1002
- if ( cliBlocker.isBypassEnabled === "1") {
1003
  cliBlocker.blockingStatus = false;
1004
  }
1005
- callbackA( this.cliShowBar );
1006
- callbackB( this.blockingStatus );
1007
  }
1008
 
1009
  },
1010
- cookieBar: function( showbar )
1011
- {
1012
- showbar = typeof showbar !== 'undefined' ? showbar : true;
1013
  cliBlocker.cliShowBar = showbar;
1014
  if (cliBlocker.cliShowBar === false) {
1015
  CLI.bar_elm.hide();
1016
  CLI.showagain_elm.hide();
1017
- CLI.settingsModal.removeClass( 'cli-blowup cli-out' );
1018
  CLI.hidePopupOverlay();
1019
- jQuery( ".cli-settings-overlay" ).removeClass( "cli-show" );
1020
  } else {
1021
- if ( ! CLI_Cookie.exists( CLI_ACCEPT_COOKIE_NAME )) {
1022
  CLI.displayHeader();
1023
  } else {
1024
  CLI.hideHeader();
1025
  }
1026
  }
1027
  },
1028
- removeCookieByCategory : function()
1029
- {
1030
 
1031
  if (cliBlocker.blockingStatus === true) {
1032
- if (CLI_Cookie.read( CLI_ACCEPT_COOKIE_NAME ) !== null) {
1033
  var non_necessary_cookies = Cli_Data.non_necessary_cookies;
1034
  for (var key in non_necessary_cookies) {
1035
  currentCategory = key;
1036
- if (CLI.allowedCategories.indexOf( currentCategory ) === -1) {
1037
  var nonNecessaryCookies = non_necessary_cookies[currentCategory];
1038
  for (var i = 0; i < nonNecessaryCookies.length; i++) {
1039
- if (CLI_Cookie.read( nonNecessaryCookies[i] ) !== null) {
1040
- CLI_Cookie.erase( nonNecessaryCookies[i] );
1041
  }
1042
 
1043
  }
@@ -1046,16 +1016,14 @@ var cliBlocker =
1046
  }
1047
  }
1048
  },
1049
- runScripts:function( blocking )
1050
- {
1051
- blocking = typeof blocking !== 'undefined' ? blocking : true;
1052
  cliBlocker.blockingStatus = blocking;
1053
- srcReplaceableElms = ['iframe','IFRAME','EMBED','embed','OBJECT','object','IMG','img'];
1054
- var genericFuncs =
1055
  {
1056
 
1057
- renderByElement: function( callback )
1058
- {
1059
  cliScriptFuncs.renderScripts();
1060
  callback();
1061
  cliBlocker.scriptsLoaded = true;
@@ -1065,17 +1033,16 @@ var cliBlocker =
1065
  var cliScriptFuncs =
1066
  {
1067
  // trigger DOMContentLoaded
1068
- scriptsDone:function()
1069
- {
1070
  if (typeof Cli_Data.triggerDomRefresh !== 'undefined') {
1071
- if ( Boolean( Cli_Data.triggerDomRefresh ) === true ) {
1072
- var DOMContentLoadedEvent = document.createEvent( 'Event' )
1073
- DOMContentLoadedEvent.initEvent( 'DOMContentLoaded', true, true )
1074
- window.document.dispatchEvent( DOMContentLoadedEvent );
1075
  }
1076
  }
1077
  },
1078
- seq :function(arr, callback, index) {
1079
  // first call, without an index
1080
  if (typeof index === 'undefined') {
1081
  index = 0
@@ -1087,20 +1054,20 @@ var cliBlocker =
1087
  if (index === arr.length) {
1088
  callback()
1089
  } else {
1090
- cliScriptFuncs.seq( arr, callback, index )
1091
  }
1092
  }
1093
  )
1094
  },
1095
  /* script runner */
1096
- insertScript:function($script,callback) {
1097
- var s = '';
1098
- var scriptType = $script.getAttribute( 'data-cli-script-type' );
1099
- var elementPosition = $script.getAttribute( 'data-cli-element-position' );
1100
- var isBlock = $script.getAttribute( 'data-cli-block' );
1101
- var s = document.createElement( 'script' );
1102
- var ccpaOptedOut = cliBlocker.ccpaOptedOut();
1103
- s.type = 'text/plain';
1104
  if ($script.async) {
1105
  s.async = $script.async;
1106
  }
@@ -1108,26 +1075,26 @@ var cliBlocker =
1108
  s.defer = $script.defer;
1109
  }
1110
  if ($script.src) {
1111
- s.onload = callback
1112
  s.onerror = callback
1113
- s.src = $script.src
1114
  } else {
1115
  s.textContent = $script.innerText
1116
  }
1117
- var attrs = jQuery( $script ).prop( "attributes" );
1118
  for (var ii = 0; ii < attrs.length; ++ii) {
1119
  if (attrs[ii].nodeName !== 'id') {
1120
- s.setAttribute( attrs[ii].nodeName,attrs[ii].value );
1121
  }
1122
  }
1123
  if (cliBlocker.blockingStatus === true) {
1124
 
1125
- if (( CLI_Cookie.read( CLI_ACCEPT_COOKIE_NAME ) == 'yes' && CLI.allowedCategories.indexOf( scriptType ) !== -1 ) ) {
1126
- s.setAttribute( 'data-cli-consent','accepted' );
1127
  s.type = 'text/javascript';
1128
  }
1129
- if ( cliBlocker.ccpaApplicable === true ) {
1130
- if ( ccpaOptedOut === true || CLI_Cookie.read( CLI_ACCEPT_COOKIE_NAME ) == null ) {
1131
  s.type = 'text/plain';
1132
  }
1133
  }
@@ -1137,23 +1104,22 @@ var cliBlocker =
1137
 
1138
  if ($script.type != s.type) {
1139
  if (elementPosition === 'head') {
1140
- document.head.appendChild( s );
1141
  } else {
1142
- document.body.appendChild( s );
1143
  }
1144
- if ( ! $script.src) {
1145
  callback()
1146
  }
1147
- $script.parentNode.removeChild( $script );
1148
 
1149
  } else {
1150
 
1151
  callback();
1152
  }
1153
  },
1154
- renderScripts:function()
1155
- {
1156
- var $scripts = document.querySelectorAll( 'script[data-cli-class="cli-blocker-script"]' );
1157
  if ($scripts.length > 0) {
1158
  var runList = []
1159
  var typeAttr
@@ -1162,43 +1128,43 @@ var cliBlocker =
1162
  function ($script) {
1163
  // only run script tags without the type attribute
1164
  // or with a javascript mime attribute value
1165
- typeAttr = $script.getAttribute( 'type' )
1166
  runList.push(
1167
  function (callback) {
1168
- cliScriptFuncs.insertScript( $script, callback )
1169
  }
1170
  )
1171
  }
1172
  )
1173
- cliScriptFuncs.seq( runList, cliScriptFuncs.scriptsDone );
1174
  }
1175
  }
1176
  };
1177
- genericFuncs.renderByElement( cliBlocker.removeCookieByCategory );
1178
  },
1179
- ccpaOptedOut : function () {
1180
- var ccpaOptedOut = false;
1181
- var preferenceCookie = CLI_Cookie.read( CLI_PREFERNCE_COOKIE );
1182
- if ( preferenceCookie !== null ) {
1183
- cliConsent = window.atob( preferenceCookie );
1184
- cliConsent = JSON.parse( cliConsent );
1185
- if ( typeof cliConsent.ccpaOptout !== 'undefined') {
1186
  ccpaOptedOut = cliConsent.ccpaOptout;
1187
  }
1188
  }
1189
  return ccpaOptedOut;
1190
  }
1191
  }
1192
- jQuery( document ).ready(
1193
- function() {
1194
  if (typeof cli_cookiebar_settings != 'undefined') {
1195
  CLI.set(
1196
  {
1197
- settings:cli_cookiebar_settings
1198
  }
1199
  );
1200
- if ( CLI.js_blocking_enabled === true ) {
1201
- cliBlocker.checkPluginStatus( cliBlocker.cookieBar,cliBlocker.runScripts );
1202
  }
1203
  }
1204
  }
1
+ CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
2
+ CLI_PREFERNCE_COOKIE = (typeof CLI_PREFERNCE_COOKIE !== 'undefined' ? CLI_PREFERNCE_COOKIE : 'CookieLawInfoConsent');
3
  CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
4
+ CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false);
5
+ var CLI_Cookie = {
6
  set: function (name, value, days) {
7
  var secure = "";
8
+ if (true === Boolean(Cli_Data.secure_cookies)) {
9
  secure = ";secure";
10
  }
11
  if (days) {
12
  var date = new Date();
13
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
14
  var expires = "; expires=" + date.toGMTString();
15
  } else {
16
  var expires = "";
17
  }
18
  document.cookie = name + "=" + value + secure + expires + "; path=/";
19
  if (days < 1) {
20
+ host_name = window.location.hostname;
21
  document.cookie = name + "=" + value + expires + "; path=/; domain=." + host_name + ";";
22
+ if (host_name.indexOf("www") != 1) {
23
+ var host_name_withoutwww = host_name.replace('www', '');
24
+ document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name_withoutwww + ";";
25
  }
26
+ host_name = host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".") - 1));
27
  document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name + ";";
28
  }
29
  },
30
  read: function (name) {
31
  var nameEQ = name + "=";
32
+ var ca = document.cookie.split(';');
33
  for (var i = 0; i < ca.length; i++) {
34
  var c = ca[i];
35
+ while (c.charAt(0) == ' ') {
36
+ c = c.substring(1, c.length);
37
  }
38
+ if (c.indexOf(nameEQ) === 0) {
39
+ return c.substring(nameEQ.length, c.length);
40
  }
41
  }
42
  return null;
43
  },
44
  erase: function (name) {
45
+ this.set(name, "", -10);
46
  },
47
  exists: function (name) {
48
+ return (this.read(name) !== null);
49
  },
50
+ getallcookies: function () {
51
+ var pairs = document.cookie.split(";");
 
52
  var cookieslist = {};
53
  for (var i = 0; i < pairs.length; i++) {
54
+ var pair = pairs[i].split("=");
55
+ cookieslist[(pair[0] + '').trim()] = unescape(pair[1]);
56
  }
57
  return cookieslist;
58
  }
59
  }
60
+ var CLI =
61
  {
62
+ bar_config: {},
63
+ showagain_config: {},
64
+ allowedCategories: [],
65
  js_blocking_enabled: false,
66
+ set: function (args) {
 
67
  if (typeof JSON.parse !== "function") {
68
+ console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it");
69
  return;
70
  }
71
  if (typeof args.settings !== 'object') {
72
+ this.settings = JSON.parse(args.settings);
73
  } else {
74
  this.settings = args.settings;
75
  }
76
+ this.js_blocking_enabled = Boolean(Cli_Data.js_blocking);
77
+ this.settings = args.settings;
78
+ this.bar_elm = jQuery(this.settings.notify_div_id);
79
+ this.showagain_elm = jQuery(this.settings.showagain_div_id);
80
+ this.settingsModal = jQuery('#cliSettingsPopup');
81
 
82
  /* buttons */
83
+ this.main_button = jQuery('.cli-plugin-main-button');
84
+ this.main_link = jQuery('.cli-plugin-main-link');
85
+ this.reject_link = jQuery('.cookie_action_close_header_reject');
86
+ this.delete_link = jQuery(".cookielawinfo-cookie-delete");
87
+ this.settings_button = jQuery('.cli_settings_button');
88
+ this.accept_all_button = jQuery('.wt-cli-accept-all-btn');
89
  if (this.settings.cookie_bar_as == 'popup') {
90
  CLI_COOKIEBAR_AS_POPUP = true;
91
  }
98
  this.configButtons();
99
  this.reviewConsent();
100
  var cli_hidebar_on_readmore = this.hideBarInReadMoreLink();
101
+ if (Boolean(this.settings.scroll_close) === true && cli_hidebar_on_readmore === false) {
102
+ window.addEventListener("scroll", CLI.closeOnScroll, false);
103
  }
104
 
105
  },
106
+ hideBarInReadMoreLink: function () {
107
+ if (Boolean(CLI.settings.button_2_hidebar) === true && this.main_link.length > 0 && this.main_link.hasClass('cli-minimize-bar')) {
 
108
  this.hideHeader();
109
+ cliBlocker.cookieBar(false);
110
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
111
  return true;
112
  }
113
  return false;
114
  },
115
+ attachEvents: function () {
116
+ jQuery(document).on(
 
117
  'click',
118
  '.wt-cli-privacy-btn',
119
+ function (e) {
120
  e.preventDefault();
121
  CLI.accept_close();
122
  CLI.settingsPopUpClose();
123
  }
124
  );
125
 
126
+ jQuery('.wt-cli-accept-btn').on(
127
  "click",
128
+ function (e) {
129
  e.preventDefault();
130
+ CLI.acceptRejectCookies(jQuery(this));
131
+ });
132
+ jQuery('.wt-cli-accept-all-btn').on(
133
+ "click",
134
+ function (e) {
135
+ e.preventDefault();
136
+ CLI.acceptRejectCookies(jQuery(this), 'accept');
137
+ });
138
+ jQuery('.wt-cli-reject-btn').on(
139
+ "click",
140
+ function (e) {
141
+ e.preventDefault();
142
+ CLI.acceptRejectCookies(jQuery(this), 'reject');
143
+ });
 
 
 
 
 
 
 
 
 
 
 
 
144
  this.settingsPopUp();
145
  this.settingsTabbedAccordion();
146
  this.toggleUserPreferenceCheckBox();
148
  this.cookieLawInfoRunCallBacks();
149
 
150
  },
151
+ acceptRejectCookies(element, action = 'custom') {
152
+ var open_link = element[0].hasAttribute("href") && element.attr("href") != '#' ? true : false;
153
+ var new_window = false;
154
+ if (action == 'accept') {
155
+ this.enableAllCookies();
156
+ this.accept_close();
157
+ new_window = CLI.settings.button_7_new_win ? true : false;
158
+
159
+ } else if (action == 'reject') {
160
+ this.disableAllCookies();
161
+ this.reject_close();
162
+ new_window = Boolean(this.settings.button_3_new_win) ? true : false;
163
+ } else {
164
+ this.accept_close();
165
+ new_window = Boolean(this.settings.button_1_new_win) ? true : false;
166
+ }
167
+ if (open_link) {
168
+ if (new_window) {
169
+ window.open(element.attr("href"), '_blank');
170
+ } else {
171
+ window.location.href = element.attr("href");
172
+ }
173
+ }
174
+ },
175
+ toggleUserPreferenceCheckBox: function () {
176
 
177
+ jQuery('.cli-user-preference-checkbox').each(
178
+ function () {
179
 
180
+ categoryCookie = 'cookielawinfo-' + jQuery(this).attr('data-id');
181
+ categoryCookieValue = CLI_Cookie.read(categoryCookie);
182
+ if (categoryCookieValue == null) {
183
+ if (jQuery(this).is(':checked')) {
184
+ CLI_Cookie.set(categoryCookie, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
185
  } else {
186
+ CLI_Cookie.set(categoryCookie, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
187
  }
188
  } else {
189
  if (categoryCookieValue == "yes") {
190
+ jQuery(this).prop("checked", true);
191
  } else {
192
+ jQuery(this).prop("checked", false);
193
  }
194
 
195
  }
196
 
197
  }
198
  );
199
+ jQuery('.cli-user-preference-checkbox').on(
200
  "click",
201
+ function (e) {
202
+ var dataID = jQuery(this).attr('data-id');
203
+ var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id=' + dataID + ']');
204
+ if (jQuery(this).is(':checked')) {
205
+ CLI_Cookie.set('cookielawinfo-' + dataID, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
206
+ currentToggleElm.prop('checked', true);
207
  } else {
208
+ CLI_Cookie.set('cookielawinfo-' + dataID, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
209
+ currentToggleElm.prop('checked', false);
210
  }
211
  CLI.checkCategories();
212
  CLI.generateConsent();
214
  );
215
 
216
  },
217
+ settingsPopUp: function () {
218
+ jQuery(document).on(
 
219
  'click',
220
  '.cli_settings_button',
221
+ function (e) {
222
  e.preventDefault();
223
+ CLI.settingsModal.addClass("cli-show").css({ 'opacity': 0 }).animate({ 'opacity': 1 });
224
+ CLI.settingsModal.removeClass('cli-blowup cli-out').addClass("cli-blowup");
225
+ jQuery('body').addClass("cli-modal-open");
226
+ jQuery(".cli-settings-overlay").addClass("cli-show");
227
+ jQuery("#cookie-law-info-bar").css({ 'opacity': .1 });
228
+ if (!jQuery('.cli-settings-mobile').is(':visible')) {
229
+ CLI.settingsModal.find('.cli-nav-link:eq(0)').trigger("click");
230
  }
231
  }
232
  );
233
+ jQuery('#cliModalClose').on(
234
  "click",
235
+ function (e) {
236
  CLI.settingsPopUpClose();
237
  }
238
  );
239
  CLI.settingsModal.on(
240
  "click",
241
+ function (e) {
242
+ if (!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) {
243
  CLI.settingsPopUpClose();
244
  }
245
  }
246
  );
247
+ jQuery('.cli_enable_all_btn').on(
248
  "click",
249
+ function (e) {
250
+ var cli_toggle_btn = jQuery(this);
251
+ var enable_text = cli_toggle_btn.attr('data-enable-text');
252
+ var disable_text = cli_toggle_btn.attr('data-disable-text');
253
+ if (cli_toggle_btn.hasClass('cli-enabled')) {
254
  CLI.disableAllCookies();
255
+ cli_toggle_btn.html(enable_text);
256
  } else {
257
  CLI.enableAllCookies();
258
+ cli_toggle_btn.html(disable_text);
259
 
260
  }
261
+ jQuery(this).toggleClass('cli-enabled');
262
  }
263
  );
264
 
265
  this.privacyReadmore();
266
  },
267
+ settingsTabbedAccordion: function () {
268
+ jQuery(".cli-tab-header").on(
 
269
  "click",
270
+ function (e) {
271
+ if (!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) {
272
+ if (jQuery(this).hasClass("cli-tab-active")) {
273
+ jQuery(this).removeClass("cli-tab-active");
274
+ jQuery(this)
275
+ .siblings(".cli-tab-content")
276
+ .slideUp(200);
277
 
278
  } else {
279
+ jQuery(".cli-tab-header").removeClass("cli-tab-active");
280
+ jQuery(this).addClass("cli-tab-active");
281
+ jQuery(".cli-tab-content").slideUp(200);
282
+ jQuery(this)
283
+ .siblings(".cli-tab-content")
284
+ .slideDown(200);
285
  }
286
  }
287
  }
288
  );
289
  },
290
+ settingsPopUpClose: function () {
291
+ this.settingsModal.removeClass('cli-show');
292
+ this.settingsModal.addClass('cli-out');
293
+ jQuery('body').removeClass("cli-modal-open");
294
+ jQuery(".cli-settings-overlay").removeClass("cli-show");
295
+ jQuery("#cookie-law-info-bar").css({ 'opacity': 1 });
 
296
  },
297
+ privacyReadmore: function () {
298
+ var el = jQuery('.cli-privacy-content .cli-privacy-content-text');
299
+ if (el.length > 0) {
300
+ var clone = el.clone(),
301
+ originalHtml = clone.html(),
302
+ originalHeight = el.outerHeight(),
303
+ Trunc = {
304
+ addReadmore: function (textBlock) {
305
+ if (textBlock.html().length > 250) {
306
+ jQuery('.cli-privacy-readmore').show();
307
+ } else {
308
+ jQuery('.cli-privacy-readmore').hide();
309
+ }
310
+ },
311
+ truncateText: function (textBlock) {
312
+ var strippedText = jQuery('<div />').html(textBlock.html());
313
+ strippedText.find('table').remove();
314
+ textBlock.html(strippedText.html());
315
+ currentText = textBlock.text();
316
+ if (currentText.trim().length > 250) {
317
+ var newStr = currentText.substring(0, 250);
318
+ textBlock.empty().html(newStr).append('...');
319
+ }
320
+ },
321
+ replaceText: function (textBlock, original) {
322
+ return textBlock.html(original);
323
  }
 
 
 
 
324
 
325
+ };
326
+ Trunc.addReadmore(el);
327
+ Trunc.truncateText(el);
328
+ jQuery('a.cli-privacy-readmore').on(
329
  "click",
330
+ function (e) {
331
  e.preventDefault();
332
+ if (jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) {
333
+ Trunc.truncateText(el);
334
+ jQuery('.cli-privacy-overview').removeClass('cli-collapsed');
335
+ el.css('height', '100%');
336
  } else {
337
+ jQuery('.cli-privacy-overview').addClass('cli-collapsed');
338
+ Trunc.replaceText(el, originalHtml);
339
  }
340
 
341
  }
343
  }
344
 
345
  },
346
+ attachDelete: function () {
 
347
  this.delete_link.on(
348
  "click",
349
+ function (e) {
350
+ CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
351
  for (var k in Cli_Data.nn_cookie_ids) {
352
+ CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
353
  }
354
  CLI.generateConsent();
355
  return false;
357
  );
358
 
359
  },
360
+ configButtons: function () {
 
361
  /*[cookie_button] */
362
+ this.main_button.css('color', this.settings.button_1_link_colour);
363
+ if (Boolean(this.settings.button_1_as_button)) {
364
+ this.main_button.css('background-color', this.settings.button_1_button_colour);
365
 
366
  this.main_button.on(
367
  'mouseenter',
368
+ function () {
369
+ jQuery(this).css('background-color', CLI.settings.button_1_button_hover);
370
  }
371
  )
372
+ .on(
373
+ 'mouseleave',
374
+ function () {
375
+ jQuery(this).css('background-color', CLI.settings.button_1_button_colour);
376
+ }
377
+ );
378
  }
379
 
380
  /* [cookie_link] */
381
+ this.main_link.css('color', this.settings.button_2_link_colour);
382
+ if (Boolean(this.settings.button_2_as_button)) {
383
+ this.main_link.css('background-color', this.settings.button_2_button_colour);
384
 
385
  this.main_link.on(
386
  'mouseenter',
387
+ function () {
388
+ jQuery(this).css('background-color', CLI.settings.button_2_button_hover);
389
  }
390
  )
391
+ .on(
392
+ 'mouseleave',
393
+ function () {
394
+ jQuery(this).css('background-color', CLI.settings.button_2_button_colour);
395
+ }
396
+ );
397
 
398
  }
399
  /* [cookie_reject] */
400
+ this.reject_link.css('color', this.settings.button_3_link_colour);
401
+ if (Boolean(this.settings.button_3_as_button)) {
402
 
403
+ this.reject_link.css('background-color', this.settings.button_3_button_colour);
404
  this.reject_link.on(
405
  'mouseenter',
406
+ function () {
407
+ jQuery(this).css('background-color', CLI.settings.button_3_button_hover);
408
  }
409
  )
410
+ .on(
411
+ 'mouseleave',
412
+ function () {
413
+ jQuery(this).css('background-color', CLI.settings.button_3_button_colour);
414
+ }
415
+ );
416
  }
417
  /* [cookie_settings] */
418
+ this.settings_button.css('color', this.settings.button_4_link_colour);
419
+ if (Boolean(this.settings.button_4_as_button)) {
420
+ this.settings_button.css('background-color', this.settings.button_4_button_colour);
421
  this.settings_button.on(
422
  'mouseenter',
423
+ function () {
424
+ jQuery(this).css('background-color', CLI.settings.button_4_button_hover);
425
  }
426
  )
427
+ .on(
428
+ 'mouseleave',
429
+ function () {
430
+ jQuery(this).css('background-color', CLI.settings.button_4_button_colour);
431
+ }
432
+ );
433
  }
434
  /* [cookie_accept_all] */
435
+ this.accept_all_button.css('color', this.settings.button_7_link_colour);
436
  if (this.settings.button_7_as_button) {
437
+ this.accept_all_button.css('background-color', this.settings.button_7_button_colour);
438
  this.accept_all_button.on(
439
  'mouseenter',
440
+ function () {
441
+ jQuery(this).css('background-color', CLI.settings.button_7_button_hover);
442
  }
443
  )
444
+ .on(
445
+ 'mouseleave',
446
+ function () {
447
+ jQuery(this).css('background-color', CLI.settings.button_7_button_colour);
448
+ }
449
+ );
450
  }
451
  },
452
+ toggleBar: function () {
 
453
  if (CLI_COOKIEBAR_AS_POPUP) {
454
+ this.barAsPopUp(1);
455
  }
456
  if (CLI.settings.cookie_bar_as == 'widget') {
457
+ this.barAsWidget(1);
458
  }
459
+ if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
460
  this.displayHeader();
461
  } else {
462
  this.hideHeader();
463
  }
464
+ if (Boolean(this.settings.show_once_yn)) {
465
  setTimeout(
466
+ function () {
467
  CLI.close_header();
468
  },
469
  CLI.settings.show_once
470
  );
471
  }
472
+ if (CLI.js_blocking_enabled === false) {
473
+ if (Boolean(Cli_Data.ccpaEnabled) === true) {
474
+ if (Cli_Data.ccpaType === 'ccpa' && Boolean(Cli_Data.ccpaBarEnabled) === false) {
475
+ cliBlocker.cookieBar(false);
476
  }
477
  } else {
478
+ jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
479
  }
480
  }
481
 
482
  this.showagain_elm.on(
483
  "click",
484
+ function (e) {
485
  e.preventDefault();
486
  CLI.showagain_elm.slideUp(
487
  CLI.settings.animate_speed_hide,
488
+ function () {
489
+ CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
 
490
  if (CLI_COOKIEBAR_AS_POPUP) {
491
  CLI.showPopupOverlay();
492
  }
495
  }
496
  );
497
  },
498
+ configShowAgain: function () {
 
499
  this.showagain_config = {
500
  'background-color': this.settings.background,
501
+ 'color': this.l1hs(this.settings.text),
502
  'position': 'fixed',
503
  'font-family': this.settings.font_family
504
  };
505
+ if (Boolean(this.settings.border_on)) {
506
+ var border_to_hide = 'border-' + this.settings.notify_position_vertical;
507
+ this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
508
  this.showagain_config[border_to_hide] = 'none';
509
  }
510
+ var cli_win = jQuery(window);
511
+ var cli_winw = cli_win.width();
512
  var showagain_x_pos = this.settings.showagain_x_position;
513
  if (cli_winw < 300) {
514
+ showagain_x_pos = 10;
515
  this.showagain_config.width = cli_winw - 20;
516
  } else {
517
  this.showagain_config.width = 'auto';
518
  }
519
  var cli_defw = cli_winw > 400 ? 500 : cli_winw - 20;
520
  if (CLI_COOKIEBAR_AS_POPUP) { /* cookie bar as popup */
521
+ var sa_pos = this.settings.popup_showagain_position;
522
+ var sa_pos_arr = sa_pos.split('-');
523
  if (sa_pos_arr[1] == 'left') {
524
  this.showagain_config.left = showagain_x_pos;
525
  } else if (sa_pos_arr[1] == 'right') {
544
  if (this.settings.notify_position_vertical == "top") {
545
  this.showagain_config.top = '0';
546
  } else if (this.settings.notify_position_vertical == "bottom") {
547
+ this.bar_config['position'] = 'fixed';
548
+ this.bar_config['bottom'] = '0';
549
  this.showagain_config.bottom = '0';
550
  }
551
  if (this.settings.notify_position_horizontal == "left") {
554
  this.showagain_config.right = showagain_x_pos;
555
  }
556
  }
557
+ this.showagain_elm.css(this.showagain_config);
558
  },
559
+ configBar: function () {
 
560
  this.bar_config = {
561
+ 'background-color': this.settings.background,
562
+ 'color': this.settings.text,
563
+ 'font-family': this.settings.font_family
564
  };
565
  if (this.settings.notify_position_vertical == "top") {
566
  this.bar_config['top'] = '0';
567
+ if (Boolean(this.settings.header_fix) === true) {
568
  this.bar_config['position'] = 'fixed';
569
  }
570
  } else {
571
  this.bar_config['bottom'] = '0';
572
  }
573
  this.configShowAgain();
574
+ this.bar_elm.css(this.bar_config).hide();
575
  },
576
+ l1hs: function (str) {
577
+ if (str.charAt(0) == "#") {
578
+ str = str.substring(1, str.length);
 
579
  } else {
580
  return "#" + str;
581
  }
582
+ return this.l1hs(str);
583
  },
584
+ close_header: function () {
585
+ CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
 
586
  this.hideHeader();
587
  },
588
+ accept_close: function () {
 
589
  this.hidePopupOverlay();
590
  this.generateConsent();
591
  this.cookieLawInfoRunCallBacks();
592
 
593
+ CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
594
+ if (Boolean(this.settings.notify_animate_hide)) {
595
+ if (CLI.js_blocking_enabled === true) {
596
+ this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
597
  } else {
598
+ this.bar_elm.slideUp(this.settings.animate_speed_hide);
599
  }
600
 
601
  } else {
602
+ if (CLI.js_blocking_enabled === true) {
603
+ this.bar_elm.hide(0, cliBlocker.runScripts);
604
 
605
  } else {
606
  this.bar_elm.hide();
607
  }
608
  }
609
+ if (Boolean(this.settings.showagain_tab)) {
610
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
611
  }
612
+ if (Boolean(this.settings.accept_close_reload) === true) {
613
  this.reload_current_page();
614
  }
615
  return false;
616
  },
617
+ reject_close: function () {
 
618
  this.hidePopupOverlay();
619
  this.generateConsent();
620
  this.cookieLawInfoRunCallBacks();
621
  for (var k in Cli_Data.nn_cookie_ids) {
622
+ CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
623
  }
624
+ CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
625
 
626
+ if (Boolean(this.settings.notify_animate_hide)) {
627
+ if (CLI.js_blocking_enabled === true) {
628
 
629
+ this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
630
 
631
  } else {
632
 
633
+ this.bar_elm.slideUp(this.settings.animate_speed_hide);
634
  }
635
 
636
  } else {
637
+ if (CLI.js_blocking_enabled === true) {
638
 
639
+ this.bar_elm.hide(cliBlocker.runScripts);
640
 
641
  } else {
642
 
645
  }
646
 
647
  }
648
+ if (Boolean(this.settings.showagain_tab)) {
649
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
650
  }
651
+ if (Boolean(this.settings.reject_close_reload) === true) {
652
  this.reload_current_page();
653
  }
654
  return false;
655
  },
656
+ reload_current_page: function () {
 
657
 
658
+ window.location.reload(true);
659
  },
660
+ closeOnScroll: function () {
661
+ if (window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
 
662
  CLI.accept_close();
663
+ if (Boolean(CLI.settings.scroll_close_reload) === true) {
664
  window.location.reload();
665
  }
666
+ window.removeEventListener("scroll", CLI.closeOnScroll, false);
667
  }
668
  },
669
+ displayHeader: function () {
670
+ if (Boolean(this.settings.notify_animate_show)) {
671
+ this.bar_elm.slideDown(this.settings.animate_speed_show);
 
672
  } else {
673
  this.bar_elm.show();
674
  }
677
  this.showPopupOverlay();
678
  }
679
  },
680
+ hideHeader: function () {
681
+ if (Boolean(this.settings.showagain_tab)) {
682
+ if (Boolean(this.settings.notify_animate_show)) {
683
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
 
684
  } else {
685
  this.showagain_elm.show();
686
  }
687
  } else {
688
  this.showagain_elm.hide();
689
  }
690
+ this.bar_elm.slideUp(this.settings.animate_speed_show);
691
  this.hidePopupOverlay();
692
  },
693
+ hidePopupOverlay: function () {
694
+ jQuery('body').removeClass("cli-barmodal-open");
695
+ jQuery(".cli-popupbar-overlay").removeClass("cli-show");
 
696
  },
697
+ showPopupOverlay: function () {
698
+ if (this.bar_elm.length) {
699
+ if (Boolean(this.settings.popup_overlay)) {
700
+ jQuery('body').addClass("cli-barmodal-open");
701
+ jQuery(".cli-popupbar-overlay").addClass("cli-show");
 
702
  }
703
  }
704
 
705
  },
706
+ barAsWidget: function (a) {
 
707
  var cli_elm = this.bar_elm;
708
+ cli_elm.attr('data-cli-type', 'widget');
709
+ var cli_win = jQuery(window);
710
  var cli_winh = cli_win.height() - 40;
711
  var cli_winw = cli_win.width();
712
  var cli_defw = cli_winw > 400 ? 300 : cli_winw - 30;
713
  cli_elm.css(
714
  {
715
+ 'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'overflow': 'auto', 'position': 'fixed', 'box-sizing': 'border-box'
716
  }
717
  );
718
+ if (this.checkifStyleAttributeExist() === false) {
719
+ cli_elm.css({ 'padding': '25px 15px' });
720
  }
721
  if (this.settings.widget_position == 'left') {
722
  cli_elm.css(
723
  {
724
+ 'left': '15px', 'right': 'auto', 'bottom': '15px', 'top': 'auto'
725
  }
726
  );
727
  } else {
728
  cli_elm.css(
729
  {
730
+ 'left': 'auto', 'right': '15px', 'bottom': '15px', 'top': 'auto'
731
  }
732
  );
733
  }
735
  this.setResize();
736
  }
737
  },
738
+ barAsPopUp: function (a) {
 
739
  if (typeof cookie_law_info_bar_as_popup === 'function') {
740
  return false;
741
  }
742
  var cli_elm = this.bar_elm;
743
+ cli_elm.attr('data-cli-type', 'popup');
744
+ var cli_win = jQuery(window);
745
  var cli_winh = cli_win.height() - 40;
746
  var cli_winw = cli_win.width();
747
  var cli_defw = cli_winw > 700 ? 500 : cli_winw - 20;
748
 
749
  cli_elm.css(
750
  {
751
+ 'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'bottom': '', 'top': '50%', 'left': '50%', 'margin-left': (cli_defw / 2) * -1, 'margin-top': '-100px', 'overflow': 'auto'
752
  }
753
+ ).addClass('cli-bar-popup cli-modal-content');
754
+ if (this.checkifStyleAttributeExist() === false) {
755
+ cli_elm.css({ 'padding': '25px 15px' });
756
  }
757
  cli_h = cli_elm.height();
758
+ li_h = cli_h < 200 ? 200 : cli_h;
759
+ cli_elm.css({ 'top': '50%', 'margin-top': ((cli_h / 2) + 30) * -1 });
760
  setTimeout(
761
+ function () {
762
  cli_elm.css(
763
  {
764
+ 'bottom': ''
765
  }
766
  );
767
  },
771
  this.setResize();
772
  }
773
  },
774
+ setResize: function () {
 
775
  var resizeTmr = null;
776
+ jQuery(window).resize(
777
+ function () {
778
+ clearTimeout(resizeTmr);
779
  resizeTmr = setTimeout(
780
+ function () {
 
781
  if (CLI_COOKIEBAR_AS_POPUP) {
782
  CLI.barAsPopUp();
783
  }
791
  }
792
  );
793
  },
794
+ enableAllCookies: function () {
 
795
 
796
+ jQuery('.cli-user-preference-checkbox').each(
797
+ function () {
798
+ var cli_chkbox_elm = jQuery(this);
799
+ var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
800
  if (cli_chkbox_data_id != 'checkbox-necessary') {
801
+ cli_chkbox_elm.prop('checked', true);
802
+ CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
803
  }
804
  }
805
  );
806
  },
807
+ disableAllCookies: function () {
808
+ jQuery('.cli-user-preference-checkbox').each(
809
+ function () {
 
810
 
811
+ var cli_chkbox_elm = jQuery(this);
812
+ var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
813
+ cliCategorySlug = cli_chkbox_data_id.replace('checkbox-', '');
814
+ if (Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) {
815
+ cli_chkbox_elm.prop('checked', false);
816
+ CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
817
  }
818
  }
819
  );
820
  },
821
+ hideCookieBarOnClose: function () {
822
+ jQuery(document).on(
823
  'click',
824
  '.cli_cookie_close_button',
825
+ function (e) {
826
  e.preventDefault();
827
+ var elm = jQuery(this);
828
+ if (Cli_Data.ccpaType === 'ccpa') {
 
829
  CLI.enableAllCookies();
830
  }
831
  CLI.accept_close();
832
  }
833
  );
834
  },
835
+ checkCategories: function () {
 
836
  var cliAllowedCategories = [];
837
+ var cli_categories = {};
838
+ jQuery('.cli-user-preference-checkbox').each(
839
+ function () {
840
+ var status = false;
841
+ cli_chkbox_elm = jQuery(this);
842
+ cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
843
+ cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
844
+ cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace('-', '_')
845
+ if (jQuery(cli_chkbox_elm).is(':checked')) {
846
  status = true;
847
+ cliAllowedCategories.push(cli_chkbox_data_id);
848
  }
849
 
850
+ cli_categories[cli_chkbox_data_id_trimmed] = status;
851
  }
852
  );
853
  CLI.allowedCategories = cliAllowedCategories;
854
  },
855
+ cookieLawInfoRunCallBacks: function () {
 
856
  this.checkCategories();
857
+ if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes') {
858
  if ("function" == typeof CookieLawInfo_Accept_Callback) {
859
  CookieLawInfo_Accept_Callback();
860
  }
861
  }
862
  },
863
+ generateConsent: function () {
864
+ var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
865
+ cliConsent = {};
 
866
  if (preferenceCookie !== null) {
867
+ cliConsent = window.atob(preferenceCookie);
868
+ cliConsent = JSON.parse(cliConsent);
869
  }
870
  cliConsent.ver = Cli_Data.consentVersion;
871
+ categories = [];
872
+ jQuery('.cli-user-preference-checkbox').each(
873
+ function () {
874
+ categoryVal = '';
875
+ cli_chkbox_data_id = jQuery(this).attr('data-id');
876
+ cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
877
+ if (jQuery(this).is(':checked')) {
878
  categoryVal = true;
879
  } else {
880
  categoryVal = false;
882
  cliConsent[cli_chkbox_data_id] = categoryVal;
883
  }
884
  );
885
+ cliConsent = JSON.stringify(cliConsent);
886
+ cliConsent = window.btoa(cliConsent);
887
+ CLI_Cookie.set(CLI_PREFERNCE_COOKIE, cliConsent, CLI_ACCEPT_COOKIE_EXPIRE);
888
  },
889
+ addStyleAttribute: function () {
890
+ var bar = this.bar_elm;
 
891
  var styleClass = '';
892
+ if (jQuery(bar).find('.cli-bar-container').length > 0) {
893
+ styleClass = jQuery('.cli-bar-container').attr('class');
894
+ styleClass = styleClass.replace('cli-bar-container', '');
895
  styleClass = styleClass.trim();
896
+ jQuery(bar).attr('data-cli-style', styleClass);
897
  }
898
  },
899
+ getParameterByName: function (name, url) {
900
+ if (!url) {
901
  url = window.location.href;
902
  }
903
+ name = name.replace(/[\[\]]/g, '\\$&');
904
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
905
+ results = regex.exec(url);
906
+ if (!results) {
907
  return null;
908
  }
909
+ if (!results[2]) {
910
  return '';
911
  }
912
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
913
  },
914
+ CookieLawInfo_Callback: function (enableBar, enableBlocking) {
915
+ enableBar = typeof enableBar !== 'undefined' ? enableBar : true;
916
  enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true;
917
+ if (CLI.js_blocking_enabled === true && Boolean(Cli_Data.custom_integration) === true) {
918
+ cliBlocker.cookieBar(enableBar);
919
+ cliBlocker.runScripts(enableBlocking);
920
  }
921
  },
922
+ checkifStyleAttributeExist: function () {
 
923
  var exist = false;
924
+ var attr = this.bar_elm.attr('data-cli-style');
925
  if (typeof attr !== typeof undefined && attr !== false) {
926
  exist = true;
927
  }
928
  return exist;
929
  },
930
+ reviewConsent: function () {
931
+ jQuery(document).on(
 
932
  'click',
933
  '.cli_manage_current_consent,.wt-cli-manage-consent-link',
934
+ function () {
935
  CLI.displayHeader();
936
  }
937
  );
938
  },
939
+ mayBeSetPreferenceCookie: function () {
940
+ if (CLI.getParameterByName('cli_bypass') === "1") {
941
  CLI.generateConsent();
942
  }
943
  }
944
  }
945
+ var cliBlocker =
946
  {
947
  blockingStatus: true,
948
  scriptsLoaded: false,
949
+ ccpaEnabled: false,
950
+ ccpaRegionBased: false,
951
+ ccpaApplicable: false,
952
  ccpaBarEnabled: false,
953
+ cliShowBar: true,
954
+ isBypassEnabled: CLI.getParameterByName('cli_bypass'),
955
+ checkPluginStatus: function (callbackA, callbackB) {
956
+ this.ccpaEnabled = Boolean(Cli_Data.ccpaEnabled);
957
+ this.ccpaRegionBased = Boolean(Cli_Data.ccpaRegionBased);
958
+ this.ccpaBarEnabled = Boolean(Cli_Data.ccpaBarEnabled);
 
959
 
960
+ if (Boolean(Cli_Data.custom_integration) === true) {
961
+ callbackA(false);
962
  } else {
963
+ if (this.ccpaEnabled === true) {
964
  this.ccpaApplicable = true;
965
+ if (Cli_Data.ccpaType === 'ccpa') {
966
+ if (this.ccpaBarEnabled !== true) {
967
+ this.cliShowBar = false;
968
  this.blockingStatus = false;
969
  }
970
  }
971
  } else {
972
+ jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
973
  }
974
+ if (cliBlocker.isBypassEnabled === "1") {
975
  cliBlocker.blockingStatus = false;
976
  }
977
+ callbackA(this.cliShowBar);
978
+ callbackB(this.blockingStatus);
979
  }
980
 
981
  },
982
+ cookieBar: function (showbar) {
983
+ showbar = typeof showbar !== 'undefined' ? showbar : true;
 
984
  cliBlocker.cliShowBar = showbar;
985
  if (cliBlocker.cliShowBar === false) {
986
  CLI.bar_elm.hide();
987
  CLI.showagain_elm.hide();
988
+ CLI.settingsModal.removeClass('cli-blowup cli-out');
989
  CLI.hidePopupOverlay();
990
+ jQuery(".cli-settings-overlay").removeClass("cli-show");
991
  } else {
992
+ if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
993
  CLI.displayHeader();
994
  } else {
995
  CLI.hideHeader();
996
  }
997
  }
998
  },
999
+ removeCookieByCategory: function () {
 
1000
 
1001
  if (cliBlocker.blockingStatus === true) {
1002
+ if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) {
1003
  var non_necessary_cookies = Cli_Data.non_necessary_cookies;
1004
  for (var key in non_necessary_cookies) {
1005
  currentCategory = key;
1006
+ if (CLI.allowedCategories.indexOf(currentCategory) === -1) {
1007
  var nonNecessaryCookies = non_necessary_cookies[currentCategory];
1008
  for (var i = 0; i < nonNecessaryCookies.length; i++) {
1009
+ if (CLI_Cookie.read(nonNecessaryCookies[i]) !== null) {
1010
+ CLI_Cookie.erase(nonNecessaryCookies[i]);
1011
  }
1012
 
1013
  }
1016
  }
1017
  }
1018
  },
1019
+ runScripts: function (blocking) {
1020
+ blocking = typeof blocking !== 'undefined' ? blocking : true;
 
1021
  cliBlocker.blockingStatus = blocking;
1022
+ srcReplaceableElms = ['iframe', 'IFRAME', 'EMBED', 'embed', 'OBJECT', 'object', 'IMG', 'img'];
1023
+ var genericFuncs =
1024
  {
1025
 
1026
+ renderByElement: function (callback) {
 
1027
  cliScriptFuncs.renderScripts();
1028
  callback();
1029
  cliBlocker.scriptsLoaded = true;
1033
  var cliScriptFuncs =
1034
  {
1035
  // trigger DOMContentLoaded
1036
+ scriptsDone: function () {
 
1037
  if (typeof Cli_Data.triggerDomRefresh !== 'undefined') {
1038
+ if (Boolean(Cli_Data.triggerDomRefresh) === true) {
1039
+ var DOMContentLoadedEvent = document.createEvent('Event')
1040
+ DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true)
1041
+ window.document.dispatchEvent(DOMContentLoadedEvent);
1042
  }
1043
  }
1044
  },
1045
+ seq: function (arr, callback, index) {
1046
  // first call, without an index
1047
  if (typeof index === 'undefined') {
1048
  index = 0
1054
  if (index === arr.length) {
1055
  callback()
1056
  } else {
1057
+ cliScriptFuncs.seq(arr, callback, index)
1058
  }
1059
  }
1060
  )
1061
  },
1062
  /* script runner */
1063
+ insertScript: function ($script, callback) {
1064
+ var s = '';
1065
+ var scriptType = $script.getAttribute('data-cli-script-type');
1066
+ var elementPosition = $script.getAttribute('data-cli-element-position');
1067
+ var isBlock = $script.getAttribute('data-cli-block');
1068
+ var s = document.createElement('script');
1069
+ var ccpaOptedOut = cliBlocker.ccpaOptedOut();
1070
+ s.type = 'text/plain';
1071
  if ($script.async) {
1072
  s.async = $script.async;
1073
  }
1075
  s.defer = $script.defer;
1076
  }
1077
  if ($script.src) {
1078
+ s.onload = callback
1079
  s.onerror = callback
1080
+ s.src = $script.src
1081
  } else {
1082
  s.textContent = $script.innerText
1083
  }
1084
+ var attrs = jQuery($script).prop("attributes");
1085
  for (var ii = 0; ii < attrs.length; ++ii) {
1086
  if (attrs[ii].nodeName !== 'id') {
1087
+ s.setAttribute(attrs[ii].nodeName, attrs[ii].value);
1088
  }
1089
  }
1090
  if (cliBlocker.blockingStatus === true) {
1091
 
1092
+ if ((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI.allowedCategories.indexOf(scriptType) !== -1)) {
1093
+ s.setAttribute('data-cli-consent', 'accepted');
1094
  s.type = 'text/javascript';
1095
  }
1096
+ if (cliBlocker.ccpaApplicable === true) {
1097
+ if (ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null) {
1098
  s.type = 'text/plain';
1099
  }
1100
  }
1104
 
1105
  if ($script.type != s.type) {
1106
  if (elementPosition === 'head') {
1107
+ document.head.appendChild(s);
1108
  } else {
1109
+ document.body.appendChild(s);
1110
  }
1111
+ if (!$script.src) {
1112
  callback()
1113
  }
1114
+ $script.parentNode.removeChild($script);
1115
 
1116
  } else {
1117
 
1118
  callback();
1119
  }
1120
  },
1121
+ renderScripts: function () {
1122
+ var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]');
 
1123
  if ($scripts.length > 0) {
1124
  var runList = []
1125
  var typeAttr
1128
  function ($script) {
1129
  // only run script tags without the type attribute
1130
  // or with a javascript mime attribute value
1131
+ typeAttr = $script.getAttribute('type')
1132
  runList.push(
1133
  function (callback) {
1134
+ cliScriptFuncs.insertScript($script, callback)
1135
  }
1136
  )
1137
  }
1138
  )
1139
+ cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone);
1140
  }
1141
  }
1142
  };
1143
+ genericFuncs.renderByElement(cliBlocker.removeCookieByCategory);
1144
  },
1145
+ ccpaOptedOut: function () {
1146
+ var ccpaOptedOut = false;
1147
+ var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
1148
+ if (preferenceCookie !== null) {
1149
+ cliConsent = window.atob(preferenceCookie);
1150
+ cliConsent = JSON.parse(cliConsent);
1151
+ if (typeof cliConsent.ccpaOptout !== 'undefined') {
1152
  ccpaOptedOut = cliConsent.ccpaOptout;
1153
  }
1154
  }
1155
  return ccpaOptedOut;
1156
  }
1157
  }
1158
+ jQuery(document).ready(
1159
+ function () {
1160
  if (typeof cli_cookiebar_settings != 'undefined') {
1161
  CLI.set(
1162
  {
1163
+ settings: cli_cookiebar_settings
1164
  }
1165
  );
1166
+ if (CLI.js_blocking_enabled === true) {
1167
+ cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts);
1168
  }
1169
  }
1170
  }
public/modules/shortcode/shortcode.php CHANGED
@@ -326,9 +326,9 @@ class Cookie_Law_Info_Shortcode {
326
 
327
  $classr = '';
328
  if ( $settings['button_3_as_button'] ) {
329
- $classr = ' class="' . esc_attr( $settings['button_3_button_size'] ) . ' cli-plugin-button cli-plugin-main-button cookie_action_close_header_reject cli_action_button"';
330
  } else {
331
- $classr = ' class="cookie_action_close_header_reject cli_action_button" ';
332
  }
333
  $url_reject = ( $settings['button_3_action'] == 'CONSTANT_OPEN_URL' && $settings['button_3_url'] != '#' ) ? 'href="' . esc_url( $settings['button_3_url'] ) . '"' : "role='button' tabindex='0'";
334
  $link_tag = '';
@@ -391,9 +391,9 @@ class Cookie_Law_Info_Shortcode {
391
  $settings = wp_parse_args( Cookie_Law_Info::get_settings(), $defaults );
392
  $class = '';
393
  if ( $settings['button_1_as_button'] ) {
394
- $class = ' class="' . esc_attr( $settings['button_1_button_size'] ) . ' cli-plugin-button cli-plugin-main-button cookie_action_close_header cli_action_button"';
395
  } else {
396
- $class = ' class="cli-plugin-main-button cookie_action_close_header cli_action_button" ';
397
  }
398
 
399
  // If is action not URL then don't use URL!
@@ -563,4 +563,4 @@ class Cookie_Law_Info_Shortcode {
563
  }
564
 
565
  }
566
- new Cookie_Law_Info_Shortcode( $this );
326
 
327
  $classr = '';
328
  if ( $settings['button_3_as_button'] ) {
329
+ $classr = ' class="' . esc_attr( $settings['button_3_button_size'] ) . ' cli-plugin-button cli-plugin-main-button cookie_action_close_header_reject cli_action_button wt-cli-reject-btn"';
330
  } else {
331
+ $classr = ' class="cookie_action_close_header_reject cli_action_button wt-cli-reject-btn" ';
332
  }
333
  $url_reject = ( $settings['button_3_action'] == 'CONSTANT_OPEN_URL' && $settings['button_3_url'] != '#' ) ? 'href="' . esc_url( $settings['button_3_url'] ) . '"' : "role='button' tabindex='0'";
334
  $link_tag = '';
391
  $settings = wp_parse_args( Cookie_Law_Info::get_settings(), $defaults );
392
  $class = '';
393
  if ( $settings['button_1_as_button'] ) {
394
+ $class = ' class="' . esc_attr( $settings['button_1_button_size'] ) . ' cli-plugin-button cli-plugin-main-button cookie_action_close_header cli_action_button wt-cli-accept-btn"';
395
  } else {
396
+ $class = ' class="cli-plugin-main-button cookie_action_close_header cli_action_button wt-cli-accept-btn" ';
397
  }
398
 
399
  // If is action not URL then don't use URL!
563
  }
564
 
565
  }
566
+ new Cookie_Law_Info_Shortcode( $this );
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: webtoffee, cookieyesdev
3
  Donate link: https://www.webtoffee.com/plugins/
4
  Tags: GDPR, CCPA, cookie notice, DSGVO, RGPD, LGPD, PIPEDA, POPIA, cookies , cookie law, cookie consent, Opt-in, cookie policy, privacy, compliance
5
  Requires at least: 4.4.0
6
- Tested up to: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 2.1.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -191,6 +191,10 @@ For every update of the plugin, you will be notified of the installed plugins pa
191
 
192
  == Changelog ==
193
 
 
 
 
 
194
  = 2.1.1 =
195
 
196
  * Fix - Compatibility issue with PHP 7.3.0 and below.
@@ -555,6 +559,6 @@ For every update of the plugin, you will be notified of the installed plugins pa
555
 
556
  == Upgrade Notice ==
557
 
558
- = 2.1.1 =
559
 
560
- * Fix - Compatibility issue with PHP 7.3.0 and below.
3
  Donate link: https://www.webtoffee.com/plugins/
4
  Tags: GDPR, CCPA, cookie notice, DSGVO, RGPD, LGPD, PIPEDA, POPIA, cookies , cookie law, cookie consent, Opt-in, cookie policy, privacy, compliance
5
  Requires at least: 4.4.0
6
+ Tested up to: 6.0
7
  Requires PHP: 5.6
8
+ Stable tag: 2.1.2
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
191
 
192
  == Changelog ==
193
 
194
+ = 2.1.2 =
195
+
196
+ * Fix - Accept/Reject button is not working as expected with some themes.
197
+
198
  = 2.1.1 =
199
 
200
  * Fix - Compatibility issue with PHP 7.3.0 and below.
559
 
560
  == Upgrade Notice ==
561
 
562
+ = 2.1.2 =
563
 
564
+ * Fix - Accept/Reject button is not working as expected with some themes.