Ad Inserter – WordPress Ads Management with AdSense Header Integration - Version 2.6.23

Version Description

  • Reduced layout shift when using lists and client-side dynamic blocks
  • Few minor bug fixes, cosmetic changes and code improvements
Download this release

Release Info

Developer spacetime
Plugin Icon 128x128 Ad Inserter – WordPress Ads Management with AdSense Header Integration
Version 2.6.23
Comparing to
See all releases

Code changes from version 2.6.22 to 2.6.23

ad-inserter.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
- Version: 2.6.22
6
  Description: Ad management with many advanced advertising features to insert ads at optimal positions
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
@@ -17,6 +17,10 @@ Requires PHP: 5.6
17
 
18
  Change Log
19
 
 
 
 
 
20
  Ad Inserter 2.6.22 - 2021-02-17
21
  - Various security fixes
22
  - Updated AdSense API authorization process
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
+ Version: 2.6.23
6
  Description: Ad management with many advanced advertising features to insert ads at optimal positions
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
17
 
18
  Change Log
19
 
20
+ Ad Inserter 2.6.23 - 2021-03-17
21
+ - Reduced layout shift when using lists and client-side dynamic blocks
22
+ - Few minor bug fixes, cosmetic changes and code improvements
23
+
24
  Ad Inserter 2.6.22 - 2021-02-17
25
  - Various security fixes
26
  - Updated AdSense API authorization process
class.php CHANGED
@@ -2838,7 +2838,9 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
2838
 
2839
  $style_attribute = '';
2840
  if (isset ($viewport_parameters [$viewport_code_index]['css'])) {
 
2841
  $style_attribute = " style='" . $viewport_parameters [$viewport_code_index]['css'] . "'";
 
2842
  }
2843
 
2844
  $processed_code .= "<div class='{$viewport_classes} {$code_id}'{$style_attribute} data-insertion='after' data-selector='.{$code_id}' data-insertion-no-dbg data-code='$ai_code'></div>\n";
@@ -2996,7 +2998,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
2996
  }
2997
 
2998
  $global_visitor_limit_clicks_per_time_period_code = '';
2999
- if ($global_visitor_limit_clicks_per_time_period != '' && $global_visitor_limit_clicks_time_period != '') {
3000
  $global_visitor_limit_clicks_per_time_period_code = " data-ai-global-limit-clicks-per-time='{$global_visitor_limit_clicks_per_time_period}' data-ai-global-limit-clicks-time='{$global_visitor_limit_clicks_time_period}'";
3001
  }
3002
 
@@ -3866,7 +3868,11 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3866
  $this->client_side_list_detection = true;
3867
 
3868
  if ($ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
3869
- $this->wrapping_div_classes []= 'ai-list-block';
 
 
 
 
3870
 
3871
 
3872
  if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_BLOCKS) != 0 && !$this->hide_debug_labels) {
@@ -4076,7 +4082,11 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
4076
  $this->client_side_list_detection = true;
4077
 
4078
  if ($ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
4079
- $this->wrapping_div_classes []= 'ai-list-block-ip';
 
 
 
 
4080
 
4081
  switch ($dynamic_blocks) {
4082
  case AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW:
2838
 
2839
  $style_attribute = '';
2840
  if (isset ($viewport_parameters [$viewport_code_index]['css'])) {
2841
+ // Style is removed in ai-insert.js !!!
2842
  $style_attribute = " style='" . $viewport_parameters [$viewport_code_index]['css'] . "'";
2843
+ // $style_attribute = " data-css='" . $viewport_parameters [$viewport_code_index]['css'] . "'";
2844
  }
2845
 
2846
  $processed_code .= "<div class='{$viewport_classes} {$code_id}'{$style_attribute} data-insertion='after' data-selector='.{$code_id}' data-insertion-no-dbg data-code='$ai_code'></div>\n";
2998
  }
2999
 
3000
  $global_visitor_limit_clicks_per_time_period_code = '';
3001
+ if ($trigger_click_fraud_protection && $global_visitor_limit_clicks_per_time_period != '' && $global_visitor_limit_clicks_time_period != '') {
3002
  $global_visitor_limit_clicks_per_time_period_code = " data-ai-global-limit-clicks-per-time='{$global_visitor_limit_clicks_per_time_period}' data-ai-global-limit-clicks-time='{$global_visitor_limit_clicks_time_period}'";
3003
  }
3004
 
3868
  $this->client_side_list_detection = true;
3869
 
3870
  if ($ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
3871
+
3872
+ // Hide block only when no block height is defined
3873
+ if (trim ($this->get_block_height ()) == '') {
3874
+ $this->wrapping_div_classes []= 'ai-list-block';
3875
+ }
3876
 
3877
 
3878
  if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_BLOCKS) != 0 && !$this->hide_debug_labels) {
4082
  $this->client_side_list_detection = true;
4083
 
4084
  if ($ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
4085
+
4086
+ // Hide block only when no block height is defined
4087
+ if (trim ($this->get_block_height ()) == '') {
4088
+ $this->wrapping_div_classes []= 'ai-list-block-ip';
4089
+ }
4090
 
4091
  switch ($dynamic_blocks) {
4092
  case AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW:
constants.php CHANGED
@@ -31,7 +31,7 @@ if (!defined( 'AD_INSERTER_NAME'))
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
- define ('AD_INSERTER_VERSION', '2.6.22');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
+ define ('AD_INSERTER_VERSION', '2.6.23');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
css/ai-settings.css CHANGED
@@ -1,5 +1,5 @@
1
  #ai-data {
2
- font-family: "2.6.22"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #ai-data {
2
+ font-family: "2.6.23"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
includes/js/ai-lists.js CHANGED
@@ -52,9 +52,15 @@ jQuery (function ($) {
52
  }
53
 
54
  function ai_install_tcf_callback_useractioncomplete () {
 
 
 
55
  if ((jQuery('#ai-iab-tcf-bar').length || jQuery('.ai-list-manual').length) && typeof __tcfapi == 'function' && typeof ai_load_blocks == 'function' && typeof ai_iab_tcf_callback_installed == 'undefined') {
56
 
57
  function ai_iab_tcf_callback (tcData, success) {
 
 
 
58
  if (success) {
59
  if (tcData.eventStatus === 'useractioncomplete') {
60
  ai_tcData = tcData;
@@ -77,7 +83,7 @@ jQuery (function ($) {
77
 
78
  function ai_structured_data_item (indexes, data, value) {
79
 
80
- var ai_debug = typeof ai_debugging !== 'undefined'; // 1
81
  // var ai_debug = false;
82
 
83
  if (ai_debug) console.log ('');
@@ -152,7 +158,7 @@ jQuery (function ($) {
152
 
153
  function call__tcfapi () {
154
 
155
- var ai_debug = typeof ai_debugging !== 'undefined'; // 2
156
  // var ai_debug = false;
157
 
158
  if (typeof __tcfapi == 'function') {
@@ -167,14 +173,14 @@ jQuery (function ($) {
167
 
168
  if (tcData.eventStatus == 'tcloaded' || tcData.eventStatus == 'useractioncomplete') {
169
  ai_tcData = tcData;
170
-
171
  if (!tcData.gdprApplies) {
172
  jQuery('#ai-iab-tcf-status').text ('GDPR DOES NOT APPLY');
173
  } else {
174
  $('#ai-iab-tcf-status').text ('DATA LOADED');
175
  }
176
- $('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
177
-
178
  setTimeout (function () {ai_process_lists ();}, 10);
179
 
180
  if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi getTCData success", ai_tcData);
@@ -202,7 +208,7 @@ jQuery (function ($) {
202
 
203
  function check_and_call__tcfapi (show_error) {
204
 
205
- var ai_debug = typeof ai_debugging !== 'undefined'; // 3
206
  // var ai_debug = false;
207
 
208
  if (typeof __tcfapi == 'function') {
@@ -241,7 +247,7 @@ jQuery (function ($) {
241
  ai_list_blocks = ai_list_blocks.filter ('.ai-list-data');
242
  }
243
 
244
- var ai_debug = typeof ai_debugging !== 'undefined'; // 4
245
  // var ai_debug = false;
246
 
247
  if (!ai_list_blocks.length) return;
@@ -433,6 +439,7 @@ jQuery (function ($) {
433
  cookie_array [cookie_data [0]] = cookie_object;
434
  });
435
 
 
436
  if (ai_debug) console.log ("AI LISTS COOKIE ARRAY", cookie_array);
437
 
438
  var list_passed = false;
@@ -455,62 +462,62 @@ jQuery (function ($) {
455
 
456
  if (ai_debug) console.log ("");
457
  if (ai_debug) console.log ("AI LISTS item check", list_parameter_org);
458
-
459
- var cookie_name = list_parameter;
460
- var cookie_value = '!@!';
461
  // General check
462
- var structured_data = list_parameter.indexOf ('[') != - 1;
463
- var euconsent_v2_check = (list_parameter.indexOf ('tcf-v2') == 0 || list_parameter.indexOf ('euconsent-v2') == 0) && list_parameter.indexOf ('[') != - 1;
464
-
465
- if (list_parameter.indexOf ('=') != - 1) {
466
- var list_parameter_data = list_parameter.split ("=");
467
- cookie_name = list_parameter_data [0];
468
- cookie_value = list_parameter_data [1];
469
  // Check again only cookie name (no value)
470
  structured_data = cookie_name.indexOf ('[') != - 1;
471
  euconsent_v2_check = (cookie_name.indexOf ('tcf-v2') == 0 || cookie_name.indexOf ('euconsent-v2') == 0) && cookie_name.indexOf ('[') != - 1;
472
- }
473
-
474
- if (euconsent_v2_check) {
475
- // IAB Europe Transparency and Consent Framework (TCF v2)
476
- if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2");
477
-
478
- $('#ai-iab-tcf-bar').show ();
479
-
480
- if (typeof ai_tcData == 'object') {
481
- if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: ai_tcData set");
482
-
483
- $('#ai-iab-tcf-bar').addClass ('status-ok');
484
-
485
- var indexes = cookie_name.replace (/]| /gi, '').split ('[');
486
- // Remove cookie name (tcf-v2)
487
- indexes.shift ();
488
-
489
- if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: tcData", ai_tcData);
490
-
491
- var structured_data_found = ai_structured_data_item (indexes, ai_tcData, cookie_value);
492
-
493
- if (ai_debug) console.log ("AI LISTS COOKIE", cookie_value == '!@!' ? cookie_name : cookie_name + '=' + cookie_value, structured_data_found);
494
-
495
- if (structured_data_found) {
496
- list_passed = result;
497
- } else list_passed = !result;
498
- } else {
499
- // Mark this list as unprocessed - will be processed later when __tcfapi callback function is called
500
- block_div.addClass ('ai-list-data');
501
- url_parameters_no_ai_tcData_yet = true;
502
-
503
- if (typeof __tcfapi == 'function') {
504
- // Already available
505
- check_and_call__tcfapi (false)
506
- } else {
507
- if (typeof ai_tcData_retrying == 'undefined') {
508
  ai_tcData_retrying = true;
509
-
510
- if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi not found 1, waiting...");
511
-
512
- setTimeout (function() {
513
- if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: checking again for __tcfapi");
514
 
515
  if (typeof __tcfapi == 'function') {
516
  check_and_call__tcfapi (false);
@@ -530,47 +537,47 @@ jQuery (function ($) {
530
 
531
  }, 1000);
532
  }
533
- }, 600);
534
- } else {
535
- if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi still waiting...");
536
- }
537
- }
538
- }
539
- } else
540
-
541
- if (structured_data) {
542
- var structured_data_found = ai_structured_data (cookie_array, cookie_name, cookie_value);
543
-
544
- if (ai_debug) console.log ("AI LISTS COOKIE", cookie_value == '!@!' ? cookie_name : cookie_name + '=' + cookie_value, 'found: ', structured_data_found);
545
-
546
- if (structured_data_found) {
547
- list_passed = result;
548
- } else list_passed = !result;
549
- } else {
550
- var cookie_found = false;
551
- if (cookie_value == '!@!') {
552
- // Check only cookie presence
553
- cookies.every (function (cookie) {
554
- var cookie_data = cookie.split ("=");
555
-
556
- if (cookie_data [0] == list_parameter) {
557
- cookie_found = true;
558
- return false; // exit from cookies.every
559
- }
560
-
561
- return true; // Next loop iteration
562
- });
563
- } else {
564
- // Check cookie with value
565
- cookie_found = cookies.indexOf (list_parameter) != - 1;
566
- }
567
-
568
- if (ai_debug) console.log ("AI LISTS COOKIE", list_parameter, 'found: ', cookie_found);
569
-
570
- if (cookie_found) {
571
- list_passed = result;
572
- } else list_passed = !result;
573
- }
574
 
575
  if (!list_passed) {
576
  if (ai_debug) console.log ("AI LISTS item failed", list_parameter_org);
@@ -804,6 +811,9 @@ jQuery (function ($) {
804
  }
805
 
806
  $(document).ready(function($) {
 
 
 
807
  setTimeout (function() {
808
  ai_process_lists ();
809
 
@@ -818,7 +828,9 @@ jQuery (function ($) {
818
  jQuery(document).on ("cmplz_event_marketing", ai_cmplzEnableScripts);
819
 
820
  function ai_cmplzEnableScripts (consentData) {
821
- if (consentData.consentLevel === 'all'){
 
 
822
  ai_load_blocks ();
823
  }
824
  }
@@ -826,16 +838,34 @@ jQuery (function ($) {
826
  }, 50);
827
 
828
  jQuery("#ai-iab-tcf-bar").click (function () {
829
- AiCookies.remove ('euconsent-v2', {path: "/", domain: '.' + window.location.hostname});
 
830
 
831
  // Clickio GDPR Cookie Consent
832
- AiCookies.remove ('__lxG__consent__v2', {path: "/", domain: '.' + window.location.hostname});
833
- AiCookies.remove ('__lxG__consent__v2_daisybit', {path: "/", domain: '.' + window.location.hostname});
834
- AiCookies.remove ('__lxG__consent__v2_gdaisybit', {path: "/", domain: '.' + window.location.hostname});
835
-
836
- AiCookies.remove ('cmplz_marketing', {path: "/", domain: '.' + window.location.hostname});
837
- AiCookies.remove ('cmplz_stats', {path: "/", domain: '.' + window.location.hostname});
838
- AiCookies.remove ('complianz_consent_status', {path: "/", domain: '.' + window.location.hostname});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
839
 
840
  jQuery('#ai-iab-tcf-status').text ('COOKIE DELETED');
841
  });
52
  }
53
 
54
  function ai_install_tcf_callback_useractioncomplete () {
55
+ var ai_debug = typeof ai_debugging !== 'undefined'; // 1
56
+ // var ai_debug = false;
57
+
58
  if ((jQuery('#ai-iab-tcf-bar').length || jQuery('.ai-list-manual').length) && typeof __tcfapi == 'function' && typeof ai_load_blocks == 'function' && typeof ai_iab_tcf_callback_installed == 'undefined') {
59
 
60
  function ai_iab_tcf_callback (tcData, success) {
61
+
62
+ if (ai_debug) console.log ("AI LISTS ai_iab_tcf_callback", success, tcData);
63
+
64
  if (success) {
65
  if (tcData.eventStatus === 'useractioncomplete') {
66
  ai_tcData = tcData;
83
 
84
  function ai_structured_data_item (indexes, data, value) {
85
 
86
+ var ai_debug = typeof ai_debugging !== 'undefined'; // 2
87
  // var ai_debug = false;
88
 
89
  if (ai_debug) console.log ('');
158
 
159
  function call__tcfapi () {
160
 
161
+ var ai_debug = typeof ai_debugging !== 'undefined'; // 3
162
  // var ai_debug = false;
163
 
164
  if (typeof __tcfapi == 'function') {
173
 
174
  if (tcData.eventStatus == 'tcloaded' || tcData.eventStatus == 'useractioncomplete') {
175
  ai_tcData = tcData;
176
+
177
  if (!tcData.gdprApplies) {
178
  jQuery('#ai-iab-tcf-status').text ('GDPR DOES NOT APPLY');
179
  } else {
180
  $('#ai-iab-tcf-status').text ('DATA LOADED');
181
  }
182
+ $('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
183
+
184
  setTimeout (function () {ai_process_lists ();}, 10);
185
 
186
  if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi getTCData success", ai_tcData);
208
 
209
  function check_and_call__tcfapi (show_error) {
210
 
211
+ var ai_debug = typeof ai_debugging !== 'undefined'; // 4
212
  // var ai_debug = false;
213
 
214
  if (typeof __tcfapi == 'function') {
247
  ai_list_blocks = ai_list_blocks.filter ('.ai-list-data');
248
  }
249
 
250
+ var ai_debug = typeof ai_debugging !== 'undefined'; // 5
251
  // var ai_debug = false;
252
 
253
  if (!ai_list_blocks.length) return;
439
  cookie_array [cookie_data [0]] = cookie_object;
440
  });
441
 
442
+
443
  if (ai_debug) console.log ("AI LISTS COOKIE ARRAY", cookie_array);
444
 
445
  var list_passed = false;
462
 
463
  if (ai_debug) console.log ("");
464
  if (ai_debug) console.log ("AI LISTS item check", list_parameter_org);
465
+
466
+ var cookie_name = list_parameter;
467
+ var cookie_value = '!@!';
468
  // General check
469
+ var structured_data = list_parameter.indexOf ('[') != - 1;
470
+ var euconsent_v2_check = (list_parameter.indexOf ('tcf-v2') == 0 || list_parameter.indexOf ('euconsent-v2') == 0) && list_parameter.indexOf ('[') != - 1;
471
+
472
+ if (list_parameter.indexOf ('=') != - 1) {
473
+ var list_parameter_data = list_parameter.split ("=");
474
+ cookie_name = list_parameter_data [0];
475
+ cookie_value = list_parameter_data [1];
476
  // Check again only cookie name (no value)
477
  structured_data = cookie_name.indexOf ('[') != - 1;
478
  euconsent_v2_check = (cookie_name.indexOf ('tcf-v2') == 0 || cookie_name.indexOf ('euconsent-v2') == 0) && cookie_name.indexOf ('[') != - 1;
479
+ }
480
+
481
+ if (euconsent_v2_check) {
482
+ // IAB Europe Transparency and Consent Framework (TCF v2)
483
+ if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2");
484
+
485
+ $('#ai-iab-tcf-bar').show ();
486
+
487
+ if (typeof ai_tcData == 'object') {
488
+ if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: ai_tcData set");
489
+
490
+ $('#ai-iab-tcf-bar').addClass ('status-ok');
491
+
492
+ var indexes = cookie_name.replace (/]| /gi, '').split ('[');
493
+ // Remove cookie name (tcf-v2)
494
+ indexes.shift ();
495
+
496
+ if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: tcData", ai_tcData);
497
+
498
+ var structured_data_found = ai_structured_data_item (indexes, ai_tcData, cookie_value);
499
+
500
+ if (ai_debug) console.log ("AI LISTS COOKIE", cookie_value == '!@!' ? cookie_name : cookie_name + '=' + cookie_value, structured_data_found);
501
+
502
+ if (structured_data_found) {
503
+ list_passed = result;
504
+ } else list_passed = !result;
505
+ } else {
506
+ // Mark this list as unprocessed - will be processed later when __tcfapi callback function is called
507
+ block_div.addClass ('ai-list-data');
508
+ url_parameters_no_ai_tcData_yet = true;
509
+
510
+ if (typeof __tcfapi == 'function') {
511
+ // Already available
512
+ check_and_call__tcfapi (false)
513
+ } else {
514
+ if (typeof ai_tcData_retrying == 'undefined') {
515
  ai_tcData_retrying = true;
516
+
517
+ if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi not found 1, waiting...");
518
+
519
+ setTimeout (function() {
520
+ if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: checking again for __tcfapi");
521
 
522
  if (typeof __tcfapi == 'function') {
523
  check_and_call__tcfapi (false);
537
 
538
  }, 1000);
539
  }
540
+ }, 600);
541
+ } else {
542
+ if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi still waiting...");
543
+ }
544
+ }
545
+ }
546
+ } else
547
+
548
+ if (structured_data) {
549
+ var structured_data_found = ai_structured_data (cookie_array, cookie_name, cookie_value);
550
+
551
+ if (ai_debug) console.log ("AI LISTS COOKIE", cookie_value == '!@!' ? cookie_name : cookie_name + '=' + cookie_value, 'found: ', structured_data_found);
552
+
553
+ if (structured_data_found) {
554
+ list_passed = result;
555
+ } else list_passed = !result;
556
+ } else {
557
+ var cookie_found = false;
558
+ if (cookie_value == '!@!') {
559
+ // Check only cookie presence
560
+ cookies.every (function (cookie) {
561
+ var cookie_data = cookie.split ("=");
562
+
563
+ if (cookie_data [0] == list_parameter) {
564
+ cookie_found = true;
565
+ return false; // exit from cookies.every
566
+ }
567
+
568
+ return true; // Next loop iteration
569
+ });
570
+ } else {
571
+ // Check cookie with value
572
+ cookie_found = cookies.indexOf (list_parameter) != - 1;
573
+ }
574
+
575
+ if (ai_debug) console.log ("AI LISTS COOKIE", list_parameter, 'found: ', cookie_found);
576
+
577
+ if (cookie_found) {
578
+ list_passed = result;
579
+ } else list_passed = !result;
580
+ }
581
 
582
  if (!list_passed) {
583
  if (ai_debug) console.log ("AI LISTS item failed", list_parameter_org);
811
  }
812
 
813
  $(document).ready(function($) {
814
+ var ai_debug = typeof ai_debugging !== 'undefined'; // 6
815
+ // var ai_debug = false;
816
+
817
  setTimeout (function() {
818
  ai_process_lists ();
819
 
828
  jQuery(document).on ("cmplz_event_marketing", ai_cmplzEnableScripts);
829
 
830
  function ai_cmplzEnableScripts (consentData) {
831
+ if (ai_debug) console.log ("AI LISTS ai_cmplzEnableScripts", consentData);
832
+
833
+ if (consentData.type == 'cmplzEnableScripts' || consentData.consentLevel === 'all'){
834
  ai_load_blocks ();
835
  }
836
  }
838
  }, 50);
839
 
840
  jQuery("#ai-iab-tcf-bar").click (function () {
841
+ // AiCookies.remove ('euconsent-v2', {path: "/", domain: '.' + window.location.hostname});
842
+ document.cookie = 'euconsent-v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
843
 
844
  // Clickio GDPR Cookie Consent
845
+ // AiCookies.remove ('__lxG__consent__v2', {path: "/", domain: '.' + window.location.hostname});
846
+ // AiCookies.remove ('__lxG__consent__v2_daisybit', {path: "/", domain: '.' + window.location.hostname});
847
+ // AiCookies.remove ('__lxG__consent__v2_gdaisybit', {path: "/", domain: '.' + window.location.hostname});
848
+ // AiCookies.remove ('__lxG__consent__v2', {path: "/", domain: window.location.hostname});
849
+ // AiCookies.remove ('__lxG__consent__v2_daisybit', {path: "/", domain: window.location.hostname});
850
+ // AiCookies.remove ('__lxG__consent__v2_gdaisybit', {path: "/", domain: window.location.hostname});
851
+
852
+ document.cookie = '__lxG__consent__v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
853
+ document.cookie = '__lxG__consent__v2_daisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
854
+ document.cookie = '__lxG__consent__v2_gdaisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
855
+
856
+ // Complianz GDPR/CCPA
857
+ // AiCookies.remove ('cmplz_marketing', {path: "/", domain: '.' + window.location.hostname});
858
+ // AiCookies.remove ('cmplz_stats', {path: "/", domain: '.' + window.location.hostname});
859
+ // AiCookies.remove ('complianz_consent_status', {path: "/", domain: '.' + window.location.hostname});
860
+ // AiCookies.remove ('cmplz_marketing', {path: "/", domain: window.location.hostname});
861
+ // AiCookies.remove ('cmplz_stats', {path: "/", domain: window.location.hostname});
862
+ // AiCookies.remove ('complianz_consent_status', {path: "/", domain: window.location.hostname});
863
+
864
+ document.cookie = 'complianz_consent_status=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
865
+ document.cookie = 'cmplz_marketing=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
866
+ document.cookie = 'cmplz_stats=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
867
+
868
+ if (ai_debug) console.log ("AI LISTS clear consent cookies", window.location.hostname);
869
 
870
  jQuery('#ai-iab-tcf-status').text ('COOKIE DELETED');
871
  });
includes/js/ai-lists.min.js CHANGED
@@ -1,22 +1,22 @@
1
  var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,k){a.raw=k;return a};$jscomp.arrayIteratorImpl=function(a){var k=0;return function(){return k<a.length?{done:!1,value:a[k++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var k="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return k?k.call(a):$jscomp.arrayIterator(a)};
2
- jQuery(function(a){function k(e){e=e.match(F);return null!=e&&1<e.length&&"string"===typeof e[1]&&0<e[1].length?e[1].toLowerCase():null}function A(e){try{var h=Date.parse(e);isNaN(h)&&(h=null)}catch(K){h=null}if(null==h&&e.includes(" ")){e=e.split(" ");try{h=Date.parse(e[0]);if(e[1].includes(":")){var w=e[1].split(":");h+=1E3*(3600*parseInt(w[0])+60*parseInt(w[1])+parseInt(w[2]))}isNaN(h)&&(h=null)}catch(K){h=null}}return h}function n(){(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&
3
  "function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(e,h){h&&"useractioncomplete"===e.eventStatus&&(ai_tcData=e,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}Array.prototype.includes||(Array.prototype.includes=function(e){return!!~this.indexOf(e)});var F=/:\/\/(.[^/:]+)/i;
4
- ai_process_lists=function(e){function h(d,b,g){if(0==d.length){if("!@!"==g)return!0;b!=g&&("true"==g.toLowerCase()?g=!0:"false"==g.toLowerCase()&&(g=!1));return b==g}if("object"!=typeof b&&"array"!=typeof b)return!1;var f=d[0];d=d.slice(1);if("*"==f)for(b=$jscomp.makeIterator(Object.entries(b)),f=b.next();!f.done;f=b.next()){if(f=$jscomp.makeIterator(f.value),f.next(),f=f.next().value,h(d,f,g))return!0}else if(f in b)return h(d,b[f],g);return!1}function w(d,b,g){if("object"!=typeof d||-1==b.indexOf("["))return!1;
5
  b=b.replace(/]| /gi,"").split("[");return h(b,d,g)}function K(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("DETECTED"),__tcfapi("getTCData",2,function(d,b){b?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==d.eventStatus||"useractioncomplete"==d.eventStatus?(ai_tcData=d,d.gdprApplies?a("#ai-iab-tcf-status").text("DATA LOADED"):jQuery("#ai-iab-tcf-status").text("GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},
6
  10)):"cmpuishown"==d.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("CMP UI SHOWN"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("__tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function H(d){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&n(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,K(),url_parameters_need_tcData=!0)):
7
  d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}e=null==e?a("div.ai-list-data, meta.ai-list-data"):e.filter(".ai-list-data");if(e.length){e.removeClass("ai-list-data");var G=document.cookie.split(";");G.forEach(function(d,b){G[b]=d.trim()});var Q=getAllUrlParams(window.location.search);if(null!=Q.referrer)var r=Q.referrer;else r=document.referrer,""!=r&&(r=k(r));var L=window.navigator.userAgent,M=L.toLowerCase();
8
- if("undefined"!==typeof MobileDetect)var R=new MobileDetect(L);e.each(function(){var d=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),b=!0,g=a(this).attr("referer-list");if("undefined"!=typeof g){g=b64d(g).split(",");var f=a(this).attr("referer-list-type"),l=!1;a.each(g,function(t,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2),-1!=r.indexOf(c))return l=!0,!1}else{if(c=c.substr(1),r.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-
9
- 1)){if(c=c.substr(0,c.length-1),0==r.indexOf(c))return l=!0,!1}else if("#"==c){if(""==r)return l=!0,!1}else if(c==r)return l=!0,!1});switch(f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}}if(b&&(g=a(this).attr("client-list"),"undefined"!=typeof g&&"undefined"!==typeof R))switch(g=b64d(g).split(","),f=a(this).attr("client-list-type"),l=!1,a.each(g,function(t,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2).toLowerCase(),-1!=M.indexOf(c))return l=!0,
10
- !1}else{if(c=c.substr(1).toLowerCase(),M.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-1)){if(c=c.substr(0,c.length-1).toLowerCase(),0==M.indexOf(c))return l=!0,!1}else if(R.is(c))return l=!0,!1}),f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}var N=g=!1;if(b&&(f=a(this).attr("parameter-list"),"undefined"!=typeof f)){f=b64d(f).split(",");var u=a(this).attr("parameter-list-type"),S=[];G.forEach(function(t){t=t.split("=");try{var c=JSON.parse(decodeURIComponent(t[1]))}catch(T){c=
11
- decodeURIComponent(t[1])}S[t[0]]=c});var x=!1,I=a(this);a.each(f,function(t,c){var T=c.split("&&");a.each(T,function(X,m){var y=!0;m=m.trim();"!!"==m.substring(0,2)&&(y=!1,m=m.substring(2));var p=m,z="!@!",U=-1!=m.indexOf("["),V=(0==m.indexOf("tcf-v2")||0==m.indexOf("euconsent-v2"))&&-1!=m.indexOf("[");-1!=m.indexOf("=")&&(z=m.split("="),p=z[0],z=z[1],U=-1!=p.indexOf("["),V=(0==p.indexOf("tcf-v2")||0==p.indexOf("euconsent-v2"))&&-1!=p.indexOf("["));if(V)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?
12
- (a("#ai-iab-tcf-bar").addClass("status-ok"),p=p.replace(/]| /gi,"").split("["),p.shift(),x=(p=h(p,ai_tcData,z))?y:!y):(I.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?H(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){"function"==typeof __tcfapi?H(!1):setTimeout(function(){"function"==typeof __tcfapi?H(!1):setTimeout(function(){H(!0)},3E3)},1E3)},600)));else if(U)x=(p=w(S,p,z))?y:!y;else{var O=!1;"!@!"==z?G.every(function(W){return W.split("=")[0]==
13
- m?(O=!0,!1):!0}):O=-1!=G.indexOf(m);x=O?y:!y}if(!x)return!1});if(x)return!1});switch(u){case "B":x&&(b=!1);break;case "W":x||(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(I.removeClass("ai-list-data"),I.removeClass("ai-list-manual")):(g=!0,I.addClass("ai-list-data")));if(!g&&!N&&(f=a(this).data("debug-info"),"undefined"!=typeof f&&(f=a("."+f),0!=f.length))){var q=f.parent();q.hasClass("ai-debug-info")&&q.remove()}}q=a(this).prevAll(".ai-debug-bar.ai-debug-lists");f=""==r?"#":r;q.find(".ai-debug-name.ai-list-info").text(f).attr("title",
14
- L);q.find(".ai-debug-name.ai-list-status").text(b?ai_front.visible:ai_front.hidden);f=!1;if(b){u=a(this).attr("scheduling-start");var B=a(this).attr("scheduling-end"),C=a(this).attr("scheduling-days");if("undefined"!=typeof u&&"undefined"!=typeof B&&"undefined"!=typeof C){f=!0;var P=parseInt(a(this).attr("scheduling-fallback")),v=parseInt(a(this).attr("gmt"));u=A(b64d(u))+v;B=A(b64d(B))+v;C=b64d(C).split(",");q=a(this).attr("scheduling-type");var D=(new Date).getTime()+v,J=new Date(D),E=J.getDay();
15
- 0==E?E=6:E--;v=D>=u&&D<B&&C.includes(E.toString());switch(q){case "B":v=!v}v||(b=!1);J=J.toISOString().split(".")[0].replace("T"," ");q=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");q.find(".ai-debug-name.ai-scheduling-info").text(J+" "+E+" current_time:"+D.toString()+" start_date:"+u.toString()+" ="+(D>=u).toString()+" end_date:"+B.toString()+" =:"+(D<B).toString()+" days:"+C.toString()+" =:"+C.includes(E.toString()).toString());q.find(".ai-debug-name.ai-scheduling-status").text(b?ai_front.visible:
16
  ai_front.hidden);b||0==P||(q.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),q.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+P))}}if(g||N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});b?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),"undefined"!=typeof a(this).data("code")&&(b=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(b),a(this).remove()):a(this).append(b),
17
- ai_process_element(this))):f&&!v&&0!=P?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(b=b64d(a(this).data("fallback-code")),a(this).append(b),ai_process_element(this)):(a(this).hide(),d.find(".ai-debug-block").length||d.hide()),b=d.attr("data-ai"),"undefined"!==typeof b&&!1!==b&&(b=a(this).attr("fallback-tracking"),"undefined"!==typeof b&&!1!==b&&d.attr("data-ai",
18
  b))):(a(this).hide(),d.find(".ai-debug-block").length||d.hide(),d.removeAttr("data-ai").removeClass("ai-track"),d.find(".ai-debug-block").length?(d.css({visibility:""}).removeClass("ai-close"),d.hasClass("ai-remove-position")&&d.css({position:""})):d.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");d.removeClass("ai-list-block")})}};a(document).ready(function(e){setTimeout(function(){ai_process_lists();setTimeout(function(){n();if("function"==typeof ai_load_blocks){var h=
19
- function(w){"all"===w.consentLevel&&ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",h);jQuery(document).on("cmplz_event_marketing",h)}},50);jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2_daisybit",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2_gdaisybit",
20
- {path:"/",domain:"."+window.location.hostname});AiCookies.remove("cmplz_marketing",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("cmplz_stats",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("complianz_consent_status",{path:"/",domain:"."+window.location.hostname});jQuery("#ai-iab-tcf-status").text("COOKIE DELETED")})},5)})});
21
  function ai_process_element(a){setTimeout(function(){"function"==typeof ai_process_rotations_in_element&&ai_process_rotations_in_element(a);"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
22
  function getAllUrlParams(a){var k=a?a.split("?")[1]:window.location.search.slice(1);a={};if(k){k=k.split("#")[0];k=k.split("&");for(var A=0;A<k.length;A++){var n=k[A].split("="),F=void 0,e=n[0].replace(/\[\d*\]/,function(h){F=h.slice(1,-1);return""});n="undefined"===typeof n[1]?"":n[1];e=e.toLowerCase();n=n.toLowerCase();a[e]?("string"===typeof a[e]&&(a[e]=[a[e]]),"undefined"===typeof F?a[e].push(n):a[e][F]=n):a[e]=n}}return a};
1
  var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,k){a.raw=k;return a};$jscomp.arrayIteratorImpl=function(a){var k=0;return function(){return k<a.length?{done:!1,value:a[k++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var k="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return k?k.call(a):$jscomp.arrayIterator(a)};
2
+ jQuery(function(a){function k(e){e=e.match(F);return null!=e&&1<e.length&&"string"===typeof e[1]&&0<e[1].length?e[1].toLowerCase():null}function A(e){try{var h=Date.parse(e);isNaN(h)&&(h=null)}catch(K){h=null}if(null==h&&e.includes(" ")){e=e.split(" ");try{h=Date.parse(e[0]);if(e[1].includes(":")){var t=e[1].split(":");h+=1E3*(3600*parseInt(t[0])+60*parseInt(t[1])+parseInt(t[2]))}isNaN(h)&&(h=null)}catch(K){h=null}}return h}function n(){(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&
3
  "function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(e,h){h&&"useractioncomplete"===e.eventStatus&&(ai_tcData=e,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}Array.prototype.includes||(Array.prototype.includes=function(e){return!!~this.indexOf(e)});var F=/:\/\/(.[^/:]+)/i;
4
+ ai_process_lists=function(e){function h(d,b,g){if(0==d.length){if("!@!"==g)return!0;b!=g&&("true"==g.toLowerCase()?g=!0:"false"==g.toLowerCase()&&(g=!1));return b==g}if("object"!=typeof b&&"array"!=typeof b)return!1;var f=d[0];d=d.slice(1);if("*"==f)for(b=$jscomp.makeIterator(Object.entries(b)),f=b.next();!f.done;f=b.next()){if(f=$jscomp.makeIterator(f.value),f.next(),f=f.next().value,h(d,f,g))return!0}else if(f in b)return h(d,b[f],g);return!1}function t(d,b,g){if("object"!=typeof d||-1==b.indexOf("["))return!1;
5
  b=b.replace(/]| /gi,"").split("[");return h(b,d,g)}function K(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("DETECTED"),__tcfapi("getTCData",2,function(d,b){b?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==d.eventStatus||"useractioncomplete"==d.eventStatus?(ai_tcData=d,d.gdprApplies?a("#ai-iab-tcf-status").text("DATA LOADED"):jQuery("#ai-iab-tcf-status").text("GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},
6
  10)):"cmpuishown"==d.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("CMP UI SHOWN"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("__tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function H(d){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&n(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,K(),url_parameters_need_tcData=!0)):
7
  d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}e=null==e?a("div.ai-list-data, meta.ai-list-data"):e.filter(".ai-list-data");if(e.length){e.removeClass("ai-list-data");var G=document.cookie.split(";");G.forEach(function(d,b){G[b]=d.trim()});var Q=getAllUrlParams(window.location.search);if(null!=Q.referrer)var r=Q.referrer;else r=document.referrer,""!=r&&(r=k(r));var L=window.navigator.userAgent,M=L.toLowerCase();
8
+ if("undefined"!==typeof MobileDetect)var R=new MobileDetect(L);e.each(function(){var d=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),b=!0,g=a(this).attr("referer-list");if("undefined"!=typeof g){g=b64d(g).split(",");var f=a(this).attr("referer-list-type"),l=!1;a.each(g,function(u,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2),-1!=r.indexOf(c))return l=!0,!1}else{if(c=c.substr(1),r.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-
9
+ 1)){if(c=c.substr(0,c.length-1),0==r.indexOf(c))return l=!0,!1}else if("#"==c){if(""==r)return l=!0,!1}else if(c==r)return l=!0,!1});switch(f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}}if(b&&(g=a(this).attr("client-list"),"undefined"!=typeof g&&"undefined"!==typeof R))switch(g=b64d(g).split(","),f=a(this).attr("client-list-type"),l=!1,a.each(g,function(u,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2).toLowerCase(),-1!=M.indexOf(c))return l=!0,
10
+ !1}else{if(c=c.substr(1).toLowerCase(),M.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-1)){if(c=c.substr(0,c.length-1).toLowerCase(),0==M.indexOf(c))return l=!0,!1}else if(R.is(c))return l=!0,!1}),f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}var N=g=!1;if(b&&(f=a(this).attr("parameter-list"),"undefined"!=typeof f)){f=b64d(f).split(",");var v=a(this).attr("parameter-list-type"),S=[];G.forEach(function(u){u=u.split("=");try{var c=JSON.parse(decodeURIComponent(u[1]))}catch(T){c=
11
+ decodeURIComponent(u[1])}S[u[0]]=c});var x=!1,I=a(this);a.each(f,function(u,c){var T=c.split("&&");a.each(T,function(X,m){var y=!0;m=m.trim();"!!"==m.substring(0,2)&&(y=!1,m=m.substring(2));var p=m,z="!@!",U=-1!=m.indexOf("["),V=(0==m.indexOf("tcf-v2")||0==m.indexOf("euconsent-v2"))&&-1!=m.indexOf("[");-1!=m.indexOf("=")&&(z=m.split("="),p=z[0],z=z[1],U=-1!=p.indexOf("["),V=(0==p.indexOf("tcf-v2")||0==p.indexOf("euconsent-v2"))&&-1!=p.indexOf("["));if(V)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?
12
+ (a("#ai-iab-tcf-bar").addClass("status-ok"),p=p.replace(/]| /gi,"").split("["),p.shift(),x=(p=h(p,ai_tcData,z))?y:!y):(I.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?H(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){"function"==typeof __tcfapi?H(!1):setTimeout(function(){"function"==typeof __tcfapi?H(!1):setTimeout(function(){H(!0)},3E3)},1E3)},600)));else if(U)x=(p=t(S,p,z))?y:!y;else{var O=!1;"!@!"==z?G.every(function(W){return W.split("=")[0]==
13
+ m?(O=!0,!1):!0}):O=-1!=G.indexOf(m);x=O?y:!y}if(!x)return!1});if(x)return!1});switch(v){case "B":x&&(b=!1);break;case "W":x||(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(I.removeClass("ai-list-data"),I.removeClass("ai-list-manual")):(g=!0,I.addClass("ai-list-data")));if(!g&&!N&&(f=a(this).data("debug-info"),"undefined"!=typeof f&&(f=a("."+f),0!=f.length))){var q=f.parent();q.hasClass("ai-debug-info")&&q.remove()}}q=a(this).prevAll(".ai-debug-bar.ai-debug-lists");f=""==r?"#":r;q.find(".ai-debug-name.ai-list-info").text(f).attr("title",
14
+ L);q.find(".ai-debug-name.ai-list-status").text(b?ai_front.visible:ai_front.hidden);f=!1;if(b){v=a(this).attr("scheduling-start");var B=a(this).attr("scheduling-end"),C=a(this).attr("scheduling-days");if("undefined"!=typeof v&&"undefined"!=typeof B&&"undefined"!=typeof C){f=!0;var P=parseInt(a(this).attr("scheduling-fallback")),w=parseInt(a(this).attr("gmt"));v=A(b64d(v))+w;B=A(b64d(B))+w;C=b64d(C).split(",");q=a(this).attr("scheduling-type");var D=(new Date).getTime()+w,J=new Date(D),E=J.getDay();
15
+ 0==E?E=6:E--;w=D>=v&&D<B&&C.includes(E.toString());switch(q){case "B":w=!w}w||(b=!1);J=J.toISOString().split(".")[0].replace("T"," ");q=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");q.find(".ai-debug-name.ai-scheduling-info").text(J+" "+E+" current_time:"+D.toString()+" start_date:"+v.toString()+" ="+(D>=v).toString()+" end_date:"+B.toString()+" =:"+(D<B).toString()+" days:"+C.toString()+" =:"+C.includes(E.toString()).toString());q.find(".ai-debug-name.ai-scheduling-status").text(b?ai_front.visible:
16
  ai_front.hidden);b||0==P||(q.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),q.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+P))}}if(g||N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});b?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),"undefined"!=typeof a(this).data("code")&&(b=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(b),a(this).remove()):a(this).append(b),
17
+ ai_process_element(this))):f&&!w&&0!=P?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(b=b64d(a(this).data("fallback-code")),a(this).append(b),ai_process_element(this)):(a(this).hide(),d.find(".ai-debug-block").length||d.hide()),b=d.attr("data-ai"),"undefined"!==typeof b&&!1!==b&&(b=a(this).attr("fallback-tracking"),"undefined"!==typeof b&&!1!==b&&d.attr("data-ai",
18
  b))):(a(this).hide(),d.find(".ai-debug-block").length||d.hide(),d.removeAttr("data-ai").removeClass("ai-track"),d.find(".ai-debug-block").length?(d.css({visibility:""}).removeClass("ai-close"),d.hasClass("ai-remove-position")&&d.css({position:""})):d.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");d.removeClass("ai-list-block")})}};a(document).ready(function(e){setTimeout(function(){ai_process_lists();setTimeout(function(){n();if("function"==typeof ai_load_blocks){var h=
19
+ function(t){"cmplzEnableScripts"!=t.type&&"all"!==t.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",h);jQuery(document).on("cmplz_event_marketing",h)}},50);jQuery("#ai-iab-tcf-bar").click(function(){document.cookie="euconsent-v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="__lxG__consent__v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="__lxG__consent__v2_daisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie=
20
+ "__lxG__consent__v2_gdaisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="complianz_consent_status=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="cmplz_marketing=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="cmplz_stats=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";jQuery("#ai-iab-tcf-status").text("COOKIE DELETED")})},5)})});
21
  function ai_process_element(a){setTimeout(function(){"function"==typeof ai_process_rotations_in_element&&ai_process_rotations_in_element(a);"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
22
  function getAllUrlParams(a){var k=a?a.split("?")[1]:window.location.search.slice(1);a={};if(k){k=k.split("#")[0];k=k.split("&");for(var A=0;A<k.length;A++){var n=k[A].split("="),F=void 0,e=n[0].replace(/\[\d*\]/,function(h){F=h.slice(1,-1);return""});n="undefined"===typeof n[1]?"":n[1];e=e.toLowerCase();n=n.toLowerCase();a[e]?("string"===typeof a[e]&&(a[e]=[a[e]]),"undefined"===typeof F?a[e].push(n):a[e][F]=n):a[e]=n}}return a};
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.6.22";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
@@ -2395,7 +2395,7 @@ jQuery(document).ready (function($) {
2395
  ip_address = $("#ai-blocked-ip-addresses").attr ('delete');
2396
  $("#ai-blocked-ip-addresses").removeAttr ('delete');
2397
 
2398
- if (ip_address == null) ip_address == '';
2399
 
2400
  $('#ai-blocked-ip-addresses-list').load (ajaxurl + '?action=ai_ajax_backend&cfp-ip-address-list='+ip_address+'&ai_check=' + ai_nonce, function (response, status, xhr) {
2401
  if (status == "error") {
1
+ var javascript_version = "2.6.23";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
2395
  ip_address = $("#ai-blocked-ip-addresses").attr ('delete');
2396
  $("#ai-blocked-ip-addresses").removeAttr ('delete');
2397
 
2398
+ if (ip_address == null) ip_address = '';
2399
 
2400
  $('#ai-blocked-ip-addresses-list').load (ajaxurl + '?action=ai_ajax_backend&cfp-ip-address-list='+ip_address+'&ai_check=' + ai_nonce, function (response, status, xhr) {
2401
  if (status == "error") {
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection,
6
  Requires at least: 4.6
7
  Tested up to: 5.7
8
  Requires PHP: 5.6
9
- Stable tag: 2.6.22
10
  License: GPLv3
11
 
12
  Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky widgets, AMP ads, DFP, tracking, AdSense header and footer code
@@ -239,7 +239,7 @@ This will allow the support team to:
239
 
240
  * Label inserted blocks - a border will be drawn around the blocks and a bar will be shown above them so the support will be able to see if/where and which blocks are inserted.
241
  * Show possible positions for automatic insertion - in places where WP hooks are called a label is placed so the support will be able to see where your theme calls WP hooks
242
- * Processing log - the log is inserted as HTML comment at the end of the page and shows data and settings used by Ad Inserter and the log of the plugin functions/hooks called during page generation - the support will be able to see the reason why some block was not inserted, how many times `the_content` hook is called, etc.
243
  * Disable block insertions - sometimes the issues are caused by the inserted code - this way the support will be able to quickly disable insertions of Ad Inserter blocks to see the difference
244
 
245
  Pages with debugging info are not cached - the debugging process will not be visible to anybody else. Once the help is not needed anymore you can disable remote debugging.
@@ -352,6 +352,10 @@ If you are not happy to reveal this information and you have opted in, simply di
352
 
353
  == Changelog ==
354
 
 
 
 
 
355
  = 2.6.22 =
356
  - Various security fixes
357
  - Updated AdSense API authorization process
@@ -518,6 +522,10 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
518
 
519
  == Upgrade Notice ==
520
 
 
 
 
 
521
  = 2.6.22 =
522
  Various security fixes;
523
  Updated AdSense API authorization process;
6
  Requires at least: 4.6
7
  Tested up to: 5.7
8
  Requires PHP: 5.6
9
+ Stable tag: 2.6.23
10
  License: GPLv3
11
 
12
  Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky widgets, AMP ads, DFP, tracking, AdSense header and footer code
239
 
240
  * Label inserted blocks - a border will be drawn around the blocks and a bar will be shown above them so the support will be able to see if/where and which blocks are inserted.
241
  * Show possible positions for automatic insertion - in places where WP hooks are called a label is placed so the support will be able to see where your theme calls WP hooks
242
+ * See processing log - the log is inserted as HTML comment at the end of the page and shows data and settings used by Ad Inserter and the log of the plugin functions/hooks called during page generation - the support will be able to see the reason why some block was not inserted, how many times `the_content` hook is called, etc.
243
  * Disable block insertions - sometimes the issues are caused by the inserted code - this way the support will be able to quickly disable insertions of Ad Inserter blocks to see the difference
244
 
245
  Pages with debugging info are not cached - the debugging process will not be visible to anybody else. Once the help is not needed anymore you can disable remote debugging.
352
 
353
  == Changelog ==
354
 
355
+ = 2.6.23 =
356
+ - Reduced layout shift when using lists and client-side dynamic blocks
357
+ - Few minor bug fixes, cosmetic changes and code improvements
358
+
359
  = 2.6.22 =
360
  - Various security fixes
361
  - Updated AdSense API authorization process
522
 
523
  == Upgrade Notice ==
524
 
525
+ = 2.6.23 =
526
+ Reduced layout shift when using lists and client-side dynamic blocks;
527
+ Few minor bug fixes, cosmetic changes and code improvements
528
+
529
  = 2.6.22 =
530
  Various security fixes;
531
  Updated AdSense API authorization process;