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

Version Description

  • Added support to insert [embed] shortcodes
  • 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.14
Comparing to
See all releases

Code changes from version 2.6.13 to 2.6.14

ad-inserter.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
- Version: 2.6.13
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/
@@ -15,6 +15,10 @@ Domain Path: /languages
15
 
16
  Change Log
17
 
 
 
 
 
18
  Ad Inserter 2.6.13 - 2020-08-26
19
  - Few minor bug fixes
20
 
@@ -1370,7 +1374,6 @@ function ai_post_check ($post, $action) {
1370
  return true;
1371
  }
1372
 
1373
-
1374
  function ai_content_marker () {
1375
  if (get_disable_block_insertions ()) return;
1376
 
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
+ Version: 2.6.14
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/
15
 
16
  Change Log
17
 
18
+ Ad Inserter 2.6.14 - 2020-09-07
19
+ - Added support to insert [embed] shortcodes
20
+ - Few minor bug fixes, cosmetic changes and code improvements
21
+
22
  Ad Inserter 2.6.13 - 2020-08-26
23
  - Few minor bug fixes
24
 
1374
  return true;
1375
  }
1376
 
 
1377
  function ai_content_marker () {
1378
  if (get_disable_block_insertions ()) return;
1379
 
class.php CHANGED
@@ -3072,8 +3072,21 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3072
  // $code = $this->replace_ai_tags (do_shortcode ($this->ai_getCode (), true)); // Does not expand shortcodes inside HTML <div id='div-gpt-ad-1234567890-[ADINSERTER counter="block"]'>
3073
  $ai_code = str_replace ('<', '<ad-inserter-dummy-tag>', $this->ai_getCode ());
3074
 
 
 
 
 
 
 
 
3075
  $code = replace_ai_tags (do_shortcode ($ai_code), $this->get_ad_general_tag());
3076
 
 
 
 
 
 
 
3077
  $code = str_replace ('<ad-inserter-dummy-tag>', '<', $code);
3078
 
3079
  unset ($ai_wp_data [AI_CURRENT_BLOCK_NUMBER]);
@@ -3721,7 +3734,8 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3721
  $client_list_type = '';
3722
 
3723
  if (isset ($this->check_url_parameters)) {
3724
- $url_parameters_raw = trim (str_replace (' ', '', $this->check_url_parameters));
 
3725
  $url_parameter_list_type = $this->check_url_parameter_list_type;
3726
  }
3727
 
@@ -3744,7 +3758,8 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3744
 
3745
  $check_again = true;
3746
  } else {
3747
- $url_parameters_raw = trim (str_replace (' ', '', $this->get_url_parameter_list ()));
 
3748
  $url_parameter_list_type = $this->get_url_parameter_list_type ();
3749
 
3750
  $referers_raw = trim (str_replace (' ', '', strtolower ($this->get_ad_domain_list ())));
@@ -3819,13 +3834,19 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3819
  if ($ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
3820
  $this->wrapping_div_classes []= 'ai-list-block';
3821
 
 
 
 
 
 
 
3822
  switch ($dynamic_blocks) {
3823
  case AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW:
3824
  if ($url_parameter_attributes != '' && $this->get_manual_loading () == AI_MANUAL_LOADING_AUTO) {
3825
  $list_class = ' ai-list-manual';
3826
  } else $list_class = '';
3827
 
3828
- $processed_code = "\n<div class='ai-dynamic{$list_class} ai-list-data'{$referer_attributes}{$client_attributes}{$url_parameter_attributes}{$scheduling_attributes}>{$processed_code}</div>\n";
3829
 
3830
  if ($scheduling_type !== null) {
3831
  $processed_code .= "<div class='ai-fallback'>{$fallback_code}</div>\n";
@@ -3843,7 +3864,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3843
  $list_class .= ' ai-list-manual';
3844
  }
3845
 
3846
- $processed_code = "\n<div class='ai-dynamic{$list_class} ai-list-data'{$referer_attributes}{$client_attributes}{$url_parameter_attributes}{$scheduling_attributes}{$code_data}{$fallback_code_data}></div>\n";
3847
 
3848
  if ($ai_wp_data [AI_WP_PAGE_TYPE] == AI_PT_AJAX && !$ai_wp_data [AI_CODE_FOR_IFRAME] && !get_disable_js_code ()) {
3849
  $processed_code .= "<script>if (typeof ai_js_code == 'boolean') {var ai_block_div = jQuery ('.{$block_id}'); ai_process_lists (ai_block_div); ai_block_div.removeClass ('{$block_id}');};</script>\n";
@@ -3881,9 +3902,9 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3881
  $version_name = $this->version_name == '' ? '' : ' - ' . $this->version_name;
3882
  $block_name = $this->number . ' &nbsp; ' . $this->get_ad_name () . '<kbd data-separator=" - " class="ai-option-name">' . $version_name . '</kbd>';
3883
 
3884
- $status = $this->get_manual_loading () == AI_MANUAL_LOADING_AUTO ? 'MANUAL LOADING' : 'WAITING FOR tcData';
3885
  // Debugging label before the hidden block in case manual loading is set to Auto and the block has not been enabled yet
3886
- $this->additional_code_before_block = $debug_manual_loading->bar ($block_name, '', 'NOT LOADED', $status);
3887
  }
3888
  }
3889
 
@@ -4513,7 +4534,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
4513
 
4514
  // Debugging label before the hidden block in case manual loading is set to Auto and the block has not been enabled yet
4515
  if ($this->additional_code_before_block != '') {
4516
- $classes = array ('ai-debug-waiting');
4517
 
4518
  if ($alignment_class) $classes []= $alignment_class;
4519
 
3072
  // $code = $this->replace_ai_tags (do_shortcode ($this->ai_getCode (), true)); // Does not expand shortcodes inside HTML <div id='div-gpt-ad-1234567890-[ADINSERTER counter="block"]'>
3073
  $ai_code = str_replace ('<', '<ad-inserter-dummy-tag>', $this->ai_getCode ());
3074
 
3075
+ $replace_embed = false;
3076
+ if (stripos ($ai_code, 'embed]') !== false) {
3077
+ $replace_embed = true;
3078
+
3079
+ $ai_code = str_ireplace (array ('[embed]', '[/embed]'), array ('[#embed#]', '[#/embed#]'), $ai_code);
3080
+ }
3081
+
3082
  $code = replace_ai_tags (do_shortcode ($ai_code), $this->get_ad_general_tag());
3083
 
3084
+ if ($replace_embed) {
3085
+ $code = str_ireplace (array ('[#embed#]', '[#/embed#]'), array ('[embed]', '[/embed]'), $code);
3086
+
3087
+ $code = $GLOBALS[ 'wp_embed']->run_shortcode ($code);
3088
+ }
3089
+
3090
  $code = str_replace ('<ad-inserter-dummy-tag>', '<', $code);
3091
 
3092
  unset ($ai_wp_data [AI_CURRENT_BLOCK_NUMBER]);
3734
  $client_list_type = '';
3735
 
3736
  if (isset ($this->check_url_parameters)) {
3737
+ // $url_parameters_raw = trim (str_replace (' ', '', $this->check_url_parameters));
3738
+ $url_parameters_raw = trim ($this->check_url_parameters);
3739
  $url_parameter_list_type = $this->check_url_parameter_list_type;
3740
  }
3741
 
3758
 
3759
  $check_again = true;
3760
  } else {
3761
+ // $url_parameters_raw = trim (str_replace (' ', '', $this->get_url_parameter_list ()));
3762
+ $url_parameters_raw = trim ($this->get_url_parameter_list ());
3763
  $url_parameter_list_type = $this->get_url_parameter_list_type ();
3764
 
3765
  $referers_raw = trim (str_replace (' ', '', strtolower ($this->get_ad_domain_list ())));
3834
  if ($ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
3835
  $this->wrapping_div_classes []= 'ai-list-block';
3836
 
3837
+
3838
+ if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_BLOCKS) != 0 && !$this->hide_debug_labels) {
3839
+ $debug_id = 'ai-debug-info-' . $this->number . '-' . rand (1000, 9999) . rand (1000, 9999);
3840
+ $debug_id_data = " data-debug-info='$debug_id'";
3841
+ } else $debug_id_data = '';
3842
+
3843
  switch ($dynamic_blocks) {
3844
  case AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW:
3845
  if ($url_parameter_attributes != '' && $this->get_manual_loading () == AI_MANUAL_LOADING_AUTO) {
3846
  $list_class = ' ai-list-manual';
3847
  } else $list_class = '';
3848
 
3849
+ $processed_code = "\n<div class='ai-dynamic{$list_class} ai-list-data'{$referer_attributes}{$client_attributes}{$url_parameter_attributes}{$scheduling_attributes}{$debug_id_data}>{$processed_code}</div>\n";
3850
 
3851
  if ($scheduling_type !== null) {
3852
  $processed_code .= "<div class='ai-fallback'>{$fallback_code}</div>\n";
3864
  $list_class .= ' ai-list-manual';
3865
  }
3866
 
3867
+ $processed_code = "\n<div class='ai-dynamic{$list_class} ai-list-data'{$referer_attributes}{$client_attributes}{$url_parameter_attributes}{$scheduling_attributes}{$debug_id_data}{$code_data}{$fallback_code_data}></div>\n";
3868
 
3869
  if ($ai_wp_data [AI_WP_PAGE_TYPE] == AI_PT_AJAX && !$ai_wp_data [AI_CODE_FOR_IFRAME] && !get_disable_js_code ()) {
3870
  $processed_code .= "<script>if (typeof ai_js_code == 'boolean') {var ai_block_div = jQuery ('.{$block_id}'); ai_process_lists (ai_block_div); ai_block_div.removeClass ('{$block_id}');};</script>\n";
3902
  $version_name = $this->version_name == '' ? '' : ' - ' . $this->version_name;
3903
  $block_name = $this->number . ' &nbsp; ' . $this->get_ad_name () . '<kbd data-separator=" - " class="ai-option-name">' . $version_name . '</kbd>';
3904
 
3905
+ $status = $this->get_manual_loading () == AI_MANUAL_LOADING_AUTO ? 'MANUAL LOADING' : 'NOT ENABLED';
3906
  // Debugging label before the hidden block in case manual loading is set to Auto and the block has not been enabled yet
3907
+ $this->additional_code_before_block = $debug_manual_loading->bar ($block_name, '', 'NOT LOADED', $status, '', $debug_id);
3908
  }
3909
  }
3910
 
4534
 
4535
  // Debugging label before the hidden block in case manual loading is set to Auto and the block has not been enabled yet
4536
  if ($this->additional_code_before_block != '') {
4537
+ $classes = array ('ai-debug-info');
4538
 
4539
  if ($alignment_class) $classes []= $alignment_class;
4540
 
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.13');
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.14');
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.13"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #ai-data {
2
+ font-family: "2.6.14"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
includes/js/ai-lists.js CHANGED
@@ -126,10 +126,14 @@ jQuery (function ($) {
126
 
127
  if (tcData.eventStatus == 'tcloaded' || tcData.eventStatus == 'useractioncomplete') {
128
  ai_tcData = tcData;
129
-
130
- $('#ai-iab-tcf-status').text ('DATA LOADED');
131
- $('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
132
-
 
 
 
 
133
  setTimeout (function () {ai_process_lists ();}, 10);
134
 
135
  if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi getTCData success", ai_tcData);
@@ -147,7 +151,10 @@ jQuery (function ($) {
147
  }
148
  } else {
149
  if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi getTCData failed");
150
- }
 
 
 
151
  });
152
  }
153
  }
@@ -355,6 +362,7 @@ jQuery (function ($) {
355
  var url_parameters_need_tcData = false;
356
  if (enable_block) {
357
  var parameter_list = $(this).attr ("parameter-list");
 
358
  if (typeof parameter_list != "undefined") {
359
  var parameter_list_array = b64d (parameter_list).split (",");
360
  var parameter_list_type = $(this).attr ("parameter-list-type");
@@ -399,95 +407,104 @@ jQuery (function ($) {
399
 
400
  if (ai_debug) console.log ("");
401
  if (ai_debug) console.log ("AI LISTS item check", list_parameter_org);
402
-
403
- if (list_parameter.indexOf ('=') != - 1) {
404
- if (cookies.indexOf (list_parameter) != - 1) {
405
- // list_passed = true;
406
- list_passed = result;
407
- } else {
408
- // cookie=value
409
- var list_parameter_data = list_parameter.split ("=");
410
-
411
- if (list_parameter_data [0].indexOf ('euconsent-v2') == 0 && list_parameter_data [0].indexOf ('[') != - 1) {
412
-
413
- // IAB Europe Transparency and Consent Framework (TCF v2)
414
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2");
415
-
416
- $('#ai-iab-tcf-bar').show ();
417
-
418
- if (typeof ai_tcData == 'object') {
419
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: ai_tcData set");
420
-
421
- $('#ai-iab-tcf-bar').addClass ('status-ok');
422
-
423
- var indexes = list_parameter_data [0].replace (/]| /gi, '').split ('[');
424
- // Remove cookie name (euconsent-v2)
425
- indexes.shift ();
426
-
427
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: tcData", ai_tcData);
428
-
429
- if (ai_structured_data_item (indexes, ai_tcData, list_parameter_data [1])) {
430
-
431
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2 data found");
432
-
433
- // list_passed = true;
434
- list_passed = result;
435
- }
436
- } else {
437
- // Mark this list as unprocessed - will be processed later when __tcfapi callback function is called
438
- block_div.addClass ('ai-list-data');
439
- url_parameters_no_ai_tcData_yet = true;
440
-
441
- if (typeof __tcfapi == 'function') {
442
- // Already available
443
- check_and_call__tcfapi (false)
444
- } else {
445
- if (typeof ai_tcData_retrying == 'undefined') {
446
- ai_tcData_retrying = true;
447
-
448
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi not found, waiting...");
449
-
450
- setTimeout (function() {
451
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: checking again for __tcfapi");
452
- check_and_call__tcfapi (true);
453
- }, 200);
454
- } else {
455
- if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi still waiting...");
456
- }
457
- }
458
- }
459
- } else
460
-
461
- if (ai_structured_data (cookie_array, list_parameter_data [0], list_parameter_data [1])) {
462
- // list_passed = true;
463
- list_passed = result;
464
- }
465
- } // cookie=value
466
- } else {
467
- // only cookie check
468
- var cookie_found = false;
469
- // cookies.forEach (function (cookie) { // Use cookies.every to be able to break out of the loop
470
- cookies.every (function (cookie) {
471
- var cookie_data = cookie.split ("=");
472
-
473
- if (list_parameter == cookie_data [0]) {
474
- cookie_found = true;
475
- return false; // exit from cookies.every
476
- }
477
-
478
- return true; // Next loop iteration
479
- });
480
-
481
- if (cookie_found) {
482
- // list_passed = true;
483
- list_passed = result;
484
- }
485
-
486
- if (!list_passed && ai_structured_data (cookie_array, list_parameter, '!@!')) {
487
- // list_passed = true;
488
- list_passed = result;
489
- }
490
- }
 
 
 
 
 
 
 
 
 
491
 
492
  if (!list_passed) {
493
  if (ai_debug) console.log ("AI LISTS item failed", list_parameter_org);
@@ -522,8 +539,15 @@ jQuery (function ($) {
522
  }
523
  }
524
 
525
- if (enable_block && block_wrapping_div.prev ().hasClass ('ai-debug-waiting')) {
526
- block_wrapping_div.prev ().remove ();
 
 
 
 
 
 
 
527
  }
528
 
529
  if (ai_debug) console.log ("AI LISTS list passed", list_passed);
@@ -708,11 +732,13 @@ jQuery (function ($) {
708
  __tcfapi ('addEventListener', 2, ai_iab_tcf_callback);
709
  }
710
 
711
- jQuery(document).on ("cmplzEnableScripts", ai_cmplzEnableScripts);
 
712
 
713
- function ai_cmplzEnableScripts (consentData) {
714
- if (consentData.consentLevel === 'all'){
715
- ai_load_blocks ();
 
716
  }
717
  }
718
 
126
 
127
  if (tcData.eventStatus == 'tcloaded' || tcData.eventStatus == 'useractioncomplete') {
128
  ai_tcData = tcData;
129
+
130
+ if (!tcData.gdprApplies) {
131
+ jQuery('#ai-iab-tcf-status').text ('GDPR DOES NOT APPLY');
132
+ } else {
133
+ $('#ai-iab-tcf-status').text ('DATA LOADED');
134
+ }
135
+ $('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
136
+
137
  setTimeout (function () {ai_process_lists ();}, 10);
138
 
139
  if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi getTCData success", ai_tcData);
151
  }
152
  } else {
153
  if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi getTCData failed");
154
+
155
+ $('#ai-iab-tcf-status').text ('__tcfapi getTCData failed');
156
+ $('#ai-iab-tcf-bar').removeClass ('status-ok').addClass ('status-error');
157
+ }
158
  });
159
  }
160
  }
362
  var url_parameters_need_tcData = false;
363
  if (enable_block) {
364
  var parameter_list = $(this).attr ("parameter-list");
365
+
366
  if (typeof parameter_list != "undefined") {
367
  var parameter_list_array = b64d (parameter_list).split (",");
368
  var parameter_list_type = $(this).attr ("parameter-list-type");
407
 
408
  if (ai_debug) console.log ("");
409
  if (ai_debug) console.log ("AI LISTS item check", list_parameter_org);
410
+
411
+ var cookie_name = list_parameter;
412
+ var cookie_value = '!@!';
413
+ // General check
414
+ var structured_data = list_parameter.indexOf ('[') != - 1;
415
+ var euconsent_v2_check = list_parameter.indexOf ('euconsent-v2') == 0 && list_parameter.indexOf ('[') != - 1;
416
+
417
+ if (list_parameter.indexOf ('=') != - 1) {
418
+ var list_parameter_data = list_parameter.split ("=");
419
+ cookie_name = list_parameter_data [0];
420
+ cookie_value = list_parameter_data [1];
421
+ // Check again only cookie name (no value)
422
+ structured_data = cookie_name.indexOf ('[') != - 1;
423
+ euconsent_v2_check = cookie_name.indexOf ('euconsent-v2') == 0 && cookie_name.indexOf ('[') != - 1;
424
+ }
425
+
426
+ if (euconsent_v2_check) {
427
+ // IAB Europe Transparency and Consent Framework (TCF v2)
428
+ if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2");
429
+
430
+ $('#ai-iab-tcf-bar').show ();
431
+
432
+ if (typeof ai_tcData == 'object') {
433
+ if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: ai_tcData set");
434
+
435
+ $('#ai-iab-tcf-bar').addClass ('status-ok');
436
+
437
+ var indexes = cookie_name.replace (/]| /gi, '').split ('[');
438
+ // Remove cookie name (euconsent-v2)
439
+ indexes.shift ();
440
+
441
+ if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: tcData", ai_tcData);
442
+
443
+ var structured_data_found = ai_structured_data_item (indexes, ai_tcData, cookie_value);
444
+
445
+ if (ai_debug) console.log ("AI LISTS COOKIE", cookie_value == '!@!' ? cookie_name : cookie_name + '=' + cookie_value, structured_data_found);
446
+
447
+ if (structured_data_found) {
448
+ list_passed = result;
449
+ } else list_passed = !result;
450
+ } else {
451
+ // Mark this list as unprocessed - will be processed later when __tcfapi callback function is called
452
+ block_div.addClass ('ai-list-data');
453
+ url_parameters_no_ai_tcData_yet = true;
454
+
455
+ if (typeof __tcfapi == 'function') {
456
+ // Already available
457
+ check_and_call__tcfapi (false)
458
+ } else {
459
+ if (typeof ai_tcData_retrying == 'undefined') {
460
+ ai_tcData_retrying = true;
461
+
462
+ if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi not found, waiting...");
463
+
464
+ setTimeout (function() {
465
+ if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: checking again for __tcfapi");
466
+ check_and_call__tcfapi (true);
467
+ }, 200);
468
+ } else {
469
+ if (ai_debug) console.log ("AI LISTS COOKIE euconsent-v2: __tcfapi still waiting...");
470
+ }
471
+ }
472
+ }
473
+ } else
474
+
475
+ if (structured_data) {
476
+ var structured_data_found = ai_structured_data (cookie_array, cookie_name, cookie_value);
477
+
478
+ if (ai_debug) console.log ("AI LISTS COOKIE", cookie_value == '!@!' ? cookie_name : cookie_name + '=' + cookie_value, 'found: ', structured_data_found);
479
+
480
+ if (structured_data_found) {
481
+ list_passed = result;
482
+ } else list_passed = !result;
483
+ } else {
484
+ var cookie_found = false;
485
+ if (cookie_value == '!@!') {
486
+ // Check only cookie presence
487
+ cookies.every (function (cookie) {
488
+ var cookie_data = cookie.split ("=");
489
+
490
+ if (cookie_data [0] == list_parameter) {
491
+ cookie_found = true;
492
+ return false; // exit from cookies.every
493
+ }
494
+
495
+ return true; // Next loop iteration
496
+ });
497
+ } else {
498
+ // Check cookie with value
499
+ cookie_found = cookies.indexOf (list_parameter) != - 1;
500
+ }
501
+
502
+ if (ai_debug) console.log ("AI LISTS COOKIE", list_parameter, 'found: ', found);
503
+
504
+ if (cookie_found) {
505
+ list_passed = result;
506
+ } else list_passed = !result;
507
+ }
508
 
509
  if (!list_passed) {
510
  if (ai_debug) console.log ("AI LISTS item failed", list_parameter_org);
539
  }
540
  }
541
 
542
+ var debug_info = $(this).data ('debug-info');
543
+ if (typeof debug_info != 'undefined') {
544
+ var debug_info_element = $('.' + debug_info);
545
+ if (debug_info_element.length != 0) {
546
+ var debug_bar = debug_info_element.parent ();
547
+ if (debug_bar.hasClass ('ai-debug-info')) {
548
+ debug_bar.remove ();
549
+ }
550
+ }
551
  }
552
 
553
  if (ai_debug) console.log ("AI LISTS list passed", list_passed);
732
  __tcfapi ('addEventListener', 2, ai_iab_tcf_callback);
733
  }
734
 
735
+ if (typeof ai_load_blocks == 'function') {
736
+ jQuery(document).on ("cmplzEnableScripts", ai_cmplzEnableScripts);
737
 
738
+ function ai_cmplzEnableScripts (consentData) {
739
+ if (consentData.consentLevel === 'all'){
740
+ ai_load_blocks ();
741
+ }
742
  }
743
  }
744
 
includes/js/ai-lists.min.js CHANGED
@@ -1,18 +1,19 @@
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(h){h=h.match(n);return null!=h&&1<h.length&&"string"===typeof h[1]&&0<h[1].length?h[1].toLowerCase():null}function w(h){try{var f=Date.parse(h);isNaN(f)&&(f=null)}catch(v){f=null}return f}Array.prototype.includes||(Array.prototype.includes=function(h){return!!~this.indexOf(h)});var n=/:\/\/(.[^/:]+)/i;ai_process_lists=function(h){function f(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"!=
3
- typeof b&&"array"!=typeof b)return!1;var e=d[0];d=d.slice(1);if("*"==e)for(b=$jscomp.makeIterator(Object.entries(b)),e=b.next();!e.done;e=b.next()){if(e=$jscomp.makeIterator(e.value),e.next(),e=e.next().value,f(d,e,g))return!0}else if(e in b)return f(d,b[e],g);return!1}function v(d,b,g){if("object"!=typeof d||-1==b.indexOf("["))return!1;b=b.replace(/]| /gi,"").split("[");return f(b,d,g)}function S(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("DETECTED"),__tcfapi("getTCData",2,function(d,
4
- b){b&&(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==d.eventStatus||"useractioncomplete"==d.eventStatus?(ai_tcData=d,a("#ai-iab-tcf-status").text("DATA LOADED"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},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")))}))}function K(d){"function"==typeof __tcfapi?"undefined"==
5
- typeof ai_tcData_requested&&(ai_tcData_requested=!0,S(),url_parameters_need_tcData=!0):d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}h=null==h?a("div.ai-list-data"):h.filter(".ai-list-data");if(h.length){h.removeClass("ai-list-data");var B=document.cookie.split(";");B.forEach(function(d,b){B[b]=d.trim()});var L=getAllUrlParams(window.location.search);if(null!=L.referrer)var p=L.referrer;else p=document.referrer,
6
- ""!=p&&(p=k(p));var E=window.navigator.userAgent,F=E.toLowerCase();if("undefined"!==typeof MobileDetect)var M=new MobileDetect(E);h.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 e=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!=p.indexOf(c))return l=!0,!1}else{if(c=c.substr(1),
7
- p.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-1)){if(c=c.substr(0,c.length-1),0==p.indexOf(c))return l=!0,!1}else if("#"==c){if(""==p)return l=!0,!1}else if(c==p)return l=!0,!1});switch(e){case "B":l&&(b=!1);break;case "W":l||(b=!1)}}if(b&&(g=a(this).attr("client-list"),"undefined"!=typeof g&&"undefined"!==typeof M))switch(g=b64d(g).split(","),e=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=
8
- c.substr(1,c.length-2).toLowerCase(),-1!=F.indexOf(c))return l=!0,!1}else{if(c=c.substr(1).toLowerCase(),F.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==F.indexOf(c))return l=!0,!1}else if(M.is(c))return l=!0,!1}),e){case "B":l&&(b=!1);break;case "W":l||(b=!1)}var N=g=!1;if(b&&(e=a(this).attr("parameter-list"),"undefined"!=typeof e)){e=b64d(e).split(",");var q=a(this).attr("parameter-list-type"),G=[];B.forEach(function(u){u=u.split("=");
9
- try{var c=JSON.parse(decodeURIComponent(u[1]))}catch(O){c=decodeURIComponent(u[1])}G[u[0]]=c});var r=!1,C=a(this);a.each(e,function(u,c){var O=c.split("&&");a.each(O,function(T,t){var x=!0;t=t.trim();"!!"==t.substring(0,2)&&(x=!1,t=t.substring(2));if(-1!=t.indexOf("="))if(-1!=B.indexOf(t))r=x;else{var y=t.split("=");if(0==y[0].indexOf("euconsent-v2")&&-1!=y[0].indexOf("["))if(a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData){a("#ai-iab-tcf-bar").addClass("status-ok");var P=y[0].replace(/]| /gi,
10
- "").split("[");P.shift();f(P,ai_tcData,y[1])&&(r=x)}else C.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?K(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){K(!0)},200));else v(G,y[0],y[1])&&(r=x)}else{var Q=!1;B.every(function(H){H=H.split("=");return t==H[0]?(Q=!0,!1):!0});Q&&(r=x);!r&&v(G,t,"!@!")&&(r=x)}if(!r)return!1});if(r)return!1});switch(q){case "B":r&&(b=!1);break;case "W":r||(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(C.removeClass("ai-list-data"),
11
- C.removeClass("ai-list-manual")):(g=!0,C.addClass("ai-list-data")));b&&d.prev().hasClass("ai-debug-waiting")&&d.prev().remove()}var m=a(this).prevAll(".ai-debug-bar.ai-debug-lists");e=""==p?"#":p;m.find(".ai-debug-name.ai-list-info").text(e).attr("title",E);m.find(".ai-debug-name.ai-list-status").text(b?ai_front.visible:ai_front.hidden);e=!1;if(b){var D=a(this).attr("scheduling-start");m=a(this).attr("scheduling-end");var z=a(this).attr("scheduling-days");if("undefined"!=typeof D&&"undefined"!=typeof m&&
12
- "undefined"!=typeof z){e=!0;var I=parseInt(a(this).attr("scheduling-fallback"));q=parseInt(a(this).attr("gmt"));var A=w(b64d(D))+q;m=w(b64d(m))+q;D=b64d(z).split(",");z=a(this).attr("scheduling-type");var J=(new Date).getTime()+q,R=new Date(J);q=R.getDay();0==q?q=6:q--;A=J>=A&&J<m&&D.includes(q.toString());switch(z){case "B":A=!A}A||(b=!1);z=R.toISOString().split(".")[0].replace("T"," ");m=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");m.find(".ai-debug-name.ai-scheduling-info").text(z+" "+
13
- q);m.find(".ai-debug-name.ai-scheduling-status").text(b?ai_front.visible:ai_front.hidden);b||0==I||(m.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),m.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+I))}}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")),a(this).append(b),
14
- ai_process_element(this))):e&&!A&&0!=I?(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(),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",b))):(a(this).hide(),d.removeAttr("data-ai").removeClass("ai-track"),
15
- 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(h){setTimeout(function(){ai_process_lists();(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&"function"==typeof __tcfapi&&__tcfapi("addEventListener",2,function(f,v){v&&"useractioncomplete"===f.eventStatus&&
16
- (ai_tcData=f,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))});jQuery(document).on("cmplzEnableScripts",function(f){"all"===f.consentLevel&&ai_load_blocks()});jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",{path:"/",domain:"."+window.location.hostname});jQuery("#ai-iab-tcf-status").text("COOKIE DELETED")})},5)})});
 
17
  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("div.ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
18
- 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 w=0;w<k.length;w++){var n=k[w].split("="),h=void 0,f=n[0].replace(/\[\d*\]/,function(v){h=v.slice(1,-1);return""});n="undefined"===typeof n[1]?"":n[1];f=f.toLowerCase();n=n.toLowerCase();a[f]?("string"===typeof a[f]&&(a[f]=[a[f]]),"undefined"===typeof h?a[f].push(n):a[f][h]=n):a[f]=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(h){h=h.match(p);return null!=h&&1<h.length&&"string"===typeof h[1]&&0<h[1].length?h[1].toLowerCase():null}function y(h){try{var f=Date.parse(h);isNaN(f)&&(f=null)}catch(z){f=null}return f}Array.prototype.includes||(Array.prototype.includes=function(h){return!!~this.indexOf(h)});var p=/:\/\/(.[^/:]+)/i;ai_process_lists=function(h){function f(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"!=
3
+ typeof b&&"array"!=typeof b)return!1;var e=d[0];d=d.slice(1);if("*"==e)for(b=$jscomp.makeIterator(Object.entries(b)),e=b.next();!e.done;e=b.next()){if(e=$jscomp.makeIterator(e.value),e.next(),e=e.next().value,f(d,e,g))return!0}else if(e in b)return f(d,b[e],g);return!1}function z(d,b,g){if("object"!=typeof d||-1==b.indexOf("["))return!1;b=b.replace(/]| /gi,"").split("[");return f(b,d,g)}function T(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("DETECTED"),__tcfapi("getTCData",2,function(d,
4
+ 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()},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"))):
5
+ (a("#ai-iab-tcf-status").text("__tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function K(d){"function"==typeof __tcfapi?"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,T(),url_parameters_need_tcData=!0):d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}h=null==h?a("div.ai-list-data"):h.filter(".ai-list-data");if(h.length){h.removeClass("ai-list-data");
6
+ var C=document.cookie.split(";");C.forEach(function(d,b){C[b]=d.trim()});var L=getAllUrlParams(window.location.search);if(null!=L.referrer)var q=L.referrer;else q=document.referrer,""!=q&&(q=k(q));var F=window.navigator.userAgent,G=F.toLowerCase();if("undefined"!==typeof MobileDetect)var M=new MobileDetect(F);h.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 e=a(this).attr("referer-list-type"),
7
+ m=!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!=q.indexOf(c))return m=!0,!1}else{if(c=c.substr(1),q.substr(-c.length)==c)return m=!0,!1}else if("*"==c.charAt(c.length-1)){if(c=c.substr(0,c.length-1),0==q.indexOf(c))return m=!0,!1}else if("#"==c){if(""==q)return m=!0,!1}else if(c==q)return m=!0,!1});switch(e){case "B":m&&(b=!1);break;case "W":m||(b=!1)}}if(b&&(g=a(this).attr("client-list"),"undefined"!=typeof g&&"undefined"!==
8
+ typeof M))switch(g=b64d(g).split(","),e=a(this).attr("client-list-type"),m=!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!=G.indexOf(c))return m=!0,!1}else{if(c=c.substr(1).toLowerCase(),G.substr(-c.length)==c)return m=!0,!1}else if("*"==c.charAt(c.length-1)){if(c=c.substr(0,c.length-1).toLowerCase(),0==G.indexOf(c))return m=!0,!1}else if(M.is(c))return m=!0,!1}),e){case "B":m&&(b=!1);break;case "W":m||(b=
9
+ !1)}var N=g=!1;if(b&&(e=a(this).attr("parameter-list"),"undefined"!=typeof e)){e=b64d(e).split(",");var r=a(this).attr("parameter-list-type"),O=[];C.forEach(function(u){u=u.split("=");try{var c=JSON.parse(decodeURIComponent(u[1]))}catch(P){c=decodeURIComponent(u[1])}O[u[0]]=c});var v=!1,D=a(this);a.each(e,function(u,c){var P=c.split("&&");a.each(P,function(V,n){var w=!0;n=n.trim();"!!"==n.substring(0,2)&&(w=!1,n=n.substring(2));var t=n,x="!@!",Q=-1!=n.indexOf("["),R=0==n.indexOf("euconsent-v2")&&
10
+ -1!=n.indexOf("[");-1!=n.indexOf("=")&&(x=n.split("="),t=x[0],x=x[1],Q=-1!=t.indexOf("["),R=0==t.indexOf("euconsent-v2")&&-1!=t.indexOf("["));if(R)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?(a("#ai-iab-tcf-bar").addClass("status-ok"),t=t.replace(/]| /gi,"").split("["),t.shift(),v=(t=f(t,ai_tcData,x))?w:!w):(D.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?K(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){K(!0)},200)));else if(Q)v=(t=
11
+ z(O,t,x))?w:!w;else{var H=!1;"!@!"==x?C.every(function(U){return U.split("=")[0]==n?(H=!0,!1):!0}):H=-1!=C.indexOf(n);v=H?w:!w}if(!v)return!1});if(v)return!1});switch(r){case "B":v&&(b=!1);break;case "W":v||(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(D.removeClass("ai-list-data"),D.removeClass("ai-list-manual")):(g=!0,D.addClass("ai-list-data")));e=a(this).data("debug-info");if("undefined"!=typeof e&&(e=a("."+e),0!=e.length)){var l=e.parent();l.hasClass("ai-debug-info")&&l.remove()}}l=a(this).prevAll(".ai-debug-bar.ai-debug-lists");
12
+ e=""==q?"#":q;l.find(".ai-debug-name.ai-list-info").text(e).attr("title",F);l.find(".ai-debug-name.ai-list-status").text(b?ai_front.visible:ai_front.hidden);e=!1;if(b){var E=a(this).attr("scheduling-start");l=a(this).attr("scheduling-end");var A=a(this).attr("scheduling-days");if("undefined"!=typeof E&&"undefined"!=typeof l&&"undefined"!=typeof A){e=!0;var I=parseInt(a(this).attr("scheduling-fallback"));r=parseInt(a(this).attr("gmt"));var B=y(b64d(E))+r;l=y(b64d(l))+r;E=b64d(A).split(",");A=a(this).attr("scheduling-type");
13
+ var J=(new Date).getTime()+r,S=new Date(J);r=S.getDay();0==r?r=6:r--;B=J>=B&&J<l&&E.includes(r.toString());switch(A){case "B":B=!B}B||(b=!1);A=S.toISOString().split(".")[0].replace("T"," ");l=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");l.find(".ai-debug-name.ai-scheduling-info").text(A+" "+r);l.find(".ai-debug-name.ai-scheduling-status").text(b?ai_front.visible:ai_front.hidden);b||0==I||(l.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),l.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+
14
+ "="+I))}}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")),a(this).append(b),ai_process_element(this))):e&&!B&&0!=I?(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")),
15
+ a(this).append(b),ai_process_element(this)):a(this).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",b))):(a(this).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")})}};
16
+ a(document).ready(function(h){setTimeout(function(){ai_process_lists();(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&"function"==typeof __tcfapi&&__tcfapi("addEventListener",2,function(f,z){z&&"useractioncomplete"===f.eventStatus&&(ai_tcData=f,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))});if("function"==typeof ai_load_blocks)jQuery(document).on("cmplzEnableScripts",function(f){"all"===
17
+ f.consentLevel&&ai_load_blocks()});jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",{path:"/",domain:"."+window.location.hostname});jQuery("#ai-iab-tcf-status").text("COOKIE DELETED")})},5)})});
18
  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("div.ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
19
+ 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 y=0;y<k.length;y++){var p=k[y].split("="),h=void 0,f=p[0].replace(/\[\d*\]/,function(z){h=z.slice(1,-1);return""});p="undefined"===typeof p[1]?"":p[1];f=f.toLowerCase();p=p.toLowerCase();a[f]?("string"===typeof a[f]&&(a[f]=[a[f]]),"undefined"===typeof h?a[f].push(p):a[f][h]=p):a[f]=p}}return a};
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.6.13";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
1
+ var javascript_version = "2.6.14";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
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.5
8
  Requires PHP: 5.6
9
- Stable tag: 2.6.13
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
@@ -335,6 +335,10 @@ If you are not happy to reveal this information and you have opted in, simply di
335
 
336
  == Changelog ==
337
 
 
 
 
 
338
  = 2.6.13 =
339
  - Few minor bug fixes
340
 
@@ -454,6 +458,10 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
454
 
455
  == Upgrade Notice ==
456
 
 
 
 
 
457
  = 2.6.13 =
458
  Few minor bug fixes
459
 
6
  Requires at least: 4.6
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
+ Stable tag: 2.6.14
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
335
 
336
  == Changelog ==
337
 
338
+ = 2.6.14 =
339
+ - Added support to insert [embed] shortcodes
340
+ - Few minor bug fixes, cosmetic changes and code improvements
341
+
342
  = 2.6.13 =
343
  - Few minor bug fixes
344
 
458
 
459
  == Upgrade Notice ==
460
 
461
+ = 2.6.14 =
462
+ Added support to insert [embed] shortcodes;
463
+ Few minor bug fixes, cosmetic changes and code improvements
464
+
465
  = 2.6.13 =
466
  Few minor bug fixes
467