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

Version Description

  • Added shortcuts for TCF v2 consent cookie checks
  • Added support for adinserter shortcode to get post ID
  • Improved ad blocking detection
  • Changed internal IP to country database (Pro only)
  • 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.7.2
Comparing to
See all releases

Code changes from version 2.7.1 to 2.7.2

ad-inserter.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
- Version: 2.7.1
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,13 @@ Requires PHP: 5.6
17
 
18
  Change Log
19
 
 
 
 
 
 
 
 
20
  Ad Inserter 2.7.1 - 2021-06-16
21
  - Improved ad blocking detection
22
  - Few minor bug fixes, cosmetic changes and code improvements
@@ -1369,11 +1376,11 @@ function ai_wp_hook () {
1369
  if (isset ($_GET [AI_URL_DEBUG]) && $_GET [AI_URL_DEBUG] == 0) {
1370
  if (isset ($_COOKIE ['AI_WP_DEBUGGING'])) {
1371
  unset ($_COOKIE ['AI_WP_DEBUGGING']);
1372
- setcookie ('AI_WP_DEBUGGING', '', time() - (15 * 60), COOKIEPATH);
1373
  }
1374
  if (isset ($_COOKIE ['AI_WP_DEBUG_BLOCK'])) {
1375
  unset ($_COOKIE ['AI_WP_DEBUG_BLOCK']);
1376
- setcookie ('AI_WP_DEBUG_BLOCK', '', time() - (15 * 60), COOKIEPATH);
1377
  }
1378
  } else {
1379
  $ai_wp_data [AI_WP_DEBUGGING] = isset ($_COOKIE ['AI_WP_DEBUGGING']) ? $ai_wp_data [AI_WP_DEBUGGING] | ($_COOKIE ['AI_WP_DEBUGGING'] & ~AI_DEBUG_PROCESSING) : $ai_wp_data [AI_WP_DEBUGGING];
@@ -1407,15 +1414,15 @@ function ai_wp_hook () {
1407
  if (!defined ('AI_DEBUGGING_DEMO')) {
1408
  if ($ai_wp_data [AI_WP_DEBUGGING] != 0) {
1409
  if (!isset ($_GET ['no-cookie'])) {
1410
- setcookie ('AI_WP_DEBUGGING', $ai_wp_data [AI_WP_DEBUGGING], time() + AI_COOKIE_TIME, COOKIEPATH);
1411
  }
1412
- } else if (isset ($_COOKIE ['AI_WP_DEBUGGING'])) setcookie ('AI_WP_DEBUGGING', '', time() - (15 * 60), COOKIEPATH);
1413
 
1414
  if ($ai_wp_data [AI_WP_DEBUG_BLOCK] != 0) {
1415
  if (!isset ($_GET ['no-cookie'])) {
1416
- setcookie ('AI_WP_DEBUG_BLOCK', $ai_wp_data [AI_WP_DEBUG_BLOCK], time() + AI_COOKIE_TIME, COOKIEPATH);
1417
  }
1418
- } else if (isset ($_COOKIE ['AI_WP_DEBUG_BLOCK'])) setcookie ('AI_WP_DEBUG_BLOCK', '', time() - (15 * 60), COOKIEPATH);
1419
 
1420
  if ($ai_wp_data [AI_WP_DEBUGGING] != 0 || isset ($_GET [AI_URL_DEBUG])) {
1421
  ai_disable_caching ();
@@ -2542,6 +2549,22 @@ function ai_adb_code () {
2542
  // return array ("<span ai-ao></span>","replace");
2543
  //}
2544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2545
  function add_footer_inline_scripts () {
2546
  global $ai_wp_data, $wp_version;
2547
 
@@ -2554,18 +2577,13 @@ function add_footer_inline_scripts () {
2554
  echo '<!-- Code for ad blocking detection -->', "\n";
2555
  echo '<!--noptimize-->', "\n";
2556
 
2557
- if (!defined ('AI_ADB_NO_DOUBLECLICK_NET')) {
2558
- echo '<object id="ai-adb-dblclk" data="https://securepubads.g.doubleclick.net/tag/js/gpt.js" style="position:absolute; z-index: -100; top: -1000px; left: -1000px; visibility: hidden;"></object>', "\n";
2559
  }
 
2560
  if (!defined ('AI_ADB_NO_BANNER_AD')) {
2561
  echo '<div id="banner-advert-container" class="ad-inserter infolinks-ad" style="position:absolute; z-index: -10; height: 1px; width: 1px; top: -100px; left: -100px;"><img id="adsense" class="SponsorAds adsense" src="', AD_INSERTER_PLUGIN_IMAGES_URL, 'ads.png" width="1" height="1" alt="pixel"></div>', "\n";
2562
  }
2563
- if (!defined ('AI_ADB_NO_GOOGLE_ANALYTICS')) {
2564
- echo '<object id="ai-adb-ga" data="https://www.google-analytics.com/analytics.js" style="position:absolute; z-index: -100; top: -1000px; left: -1000px; visibility: hidden;"></object>', "\n";
2565
- }
2566
- if (!defined ('AI_ADB_NO_MEDIA_NET')) {
2567
- echo '<object id="ai-adb-mn" data="//contextual.media.net/dmedianet.js" style="position:absolute; z-index: -100; 1px; top: -1000px; left: -1000px; visibility: hidden;"></object>', "\n";
2568
- }
2569
  if (!defined ('AI_ADB_NO_ADS_JS')) {
2570
  echo '<script async id="ai-adb-ads" src="', plugins_url ('js/ads.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
2571
  }
@@ -2594,9 +2612,6 @@ function add_footer_inline_scripts () {
2594
 
2595
  ob_start ();
2596
 
2597
- // Moved down
2598
- // echo ai_front_translations_code ();
2599
-
2600
  if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
2601
  $js_code = "";
2602
 
@@ -2741,7 +2756,7 @@ function add_footer_inline_scripts () {
2741
  'AI_JS_JQUERY1',
2742
  // "AI_JS_CODE=2"
2743
  ), array (
2744
- includes_url ('js/jquery/jquery.js') . '?ver=' . $ver,
2745
  includes_url ('js/jquery/jquery-migrate.min.js') . '?ver=' . $wp_version,
2746
  // trim (ai_front_translations_code ())
2747
  ), $jquery_ready_code [1]);
@@ -4097,6 +4112,7 @@ function ai_write_debug_info ($write_processing_log = false) {
4097
  if (function_exists ('ai_debug')) {
4098
  echo 'ADB DETECTION: ', get_adb_detection () == AI_ADB_DETECTION_ADVANCED ? 'ADVANCED' : 'STANDARD', "\n";
4099
  }
 
4100
 
4101
  $redirection_page = get_redirection_page ();
4102
  echo 'ADB REDIRECTION PAGE: ', $redirection_page != 0 ? get_the_title ($redirection_page) . ' (' . get_permalink ($redirection_page) . ')' : 'Custom Url', "\n";
@@ -4625,6 +4641,7 @@ function ai_check_plugin_options ($plugin_options = array ()) {
4625
  if (!isset ($plugin_options ['ADB_OVERLAY_CSS'])) $plugin_options ['ADB_OVERLAY_CSS'] = AI_DEFAULT_ADB_OVERLAY_CSS;
4626
  if (!isset ($plugin_options ['ADB_MESSAGE_CSS'])) $plugin_options ['ADB_MESSAGE_CSS'] = AI_DEFAULT_ADB_MESSAGE_CSS;
4627
  if (!isset ($plugin_options ['ADB_UNDISMISSIBLE_MESSAGE'])) $plugin_options ['ADB_UNDISMISSIBLE_MESSAGE'] = AI_DEFAULT_ADB_UNDISMISSIBLE_MESSAGE;
 
4628
  if (!isset ($plugin_options ['ADB_NO_UNDISMISSIBLE_MESSAGE'])) $plugin_options ['ADB_NO_UNDISMISSIBLE_MESSAGE'] = AI_DEFAULT_ADB_NO_UNDISMISSIBLE_MESSAGE;
4629
  if (!isset ($plugin_options ['ADMIN_TOOLBAR_DEBUGGING'])) $plugin_options ['ADMIN_TOOLBAR_DEBUGGING'] = DEFAULT_ADMIN_TOOLBAR_DEBUGGING;
4630
  if (!isset ($plugin_options ['ADMIN_TOOLBAR_MOBILE'])) $plugin_options ['ADMIN_TOOLBAR_MOBILE'] = DEFAULT_ADMIN_TOOLBAR_MOBILE;
@@ -5507,6 +5524,14 @@ function get_custom_redirection_url () {
5507
  return ($ai_db_options [AI_OPTION_GLOBAL]['ADB_CUSTOM_REDIRECTION_URL']);
5508
  }
5509
 
 
 
 
 
 
 
 
 
5510
  function get_message_css () {
5511
  global $ai_db_options;
5512
 
@@ -7142,6 +7167,7 @@ function ai_settings () {
7142
  if (isset ($_POST [AI_OPTION_ADB_MESSAGE_CSS])) $options ['ADB_MESSAGE_CSS'] = filter_option ('ADB_MESSAGE_CSS', $_POST [AI_OPTION_ADB_MESSAGE_CSS]);
7143
  if (isset ($_POST [AI_OPTION_ADB_OVERLAY_CSS])) $options ['ADB_OVERLAY_CSS'] = filter_option ('ADB_OVERLAY_CSS', $_POST [AI_OPTION_ADB_OVERLAY_CSS]);
7144
  if (isset ($_POST [AI_OPTION_ADB_UNDISMISSIBLE_MESSAGE])) $options ['ADB_UNDISMISSIBLE_MESSAGE'] = filter_option ('ADB_UNDISMISSIBLE_MESSAGE', $_POST [AI_OPTION_ADB_UNDISMISSIBLE_MESSAGE]);
 
7145
  if (isset ($_POST [AI_OPTION_ADB_NO_UNDISMISSIBLE_MESSAGE]))$options ['ADB_NO_UNDISMISSIBLE_MESSAGE'] = filter_option ('ADB_NO_UNDISMISSIBLE_MESSAGE', $_POST [AI_OPTION_ADB_NO_UNDISMISSIBLE_MESSAGE]);
7146
  if (isset ($_POST ['force_admin_toolbar'])) $options ['FORCE_ADMIN_TOOLBAR'] = filter_option ('FORCE_ADMIN_TOOLBAR', $_POST ['force_admin_toolbar']);
7147
  if (isset ($_POST ['admin_toolbar_debugging'])) $options ['ADMIN_TOOLBAR_DEBUGGING'] = filter_option ('ADMIN_TOOLBAR_DEBUGGING', $_POST ['admin_toolbar_debugging']);
@@ -8365,6 +8391,10 @@ function ai_process_shortcode (&$block, $atts) {
8365
  case 'disabled':
8366
  $ai_wp_data [AI_ADB_SHORTCODE_DISABLED] = true;
8367
  break;
 
 
 
 
8368
  }
8369
  return "";
8370
  }
@@ -9901,10 +9931,10 @@ function ai_set_cookie ($block, $property, $value) {
9901
  $ai_cookie_array = (array) $ai_cookie;
9902
  if (empty ($ai_cookie_array)) {
9903
  unset ($_COOKIE [$ai_cookie_name]);
9904
- setcookie ($ai_cookie_name, null, - 1, '/');
9905
  } else {
9906
  $_COOKIE [$ai_cookie_name] = addslashes (json_encode ($ai_cookie));
9907
- setcookie ($ai_cookie_name, $_COOKIE [$ai_cookie_name], 365, '/');
9908
  }
9909
 
9910
  // if (isset ($_COOKIE [$ai_cookie_name])) {
@@ -10430,6 +10460,21 @@ function ai_post_is_in_child_taxonomies ($taxonomy, $term) {
10430
  return false;
10431
  }
10432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10433
  function ai_process_viewport_separators ($code, $viewport_shortcode_data) {
10434
  global $ai_wp_data;
10435
 
@@ -10751,6 +10796,8 @@ function replace_ai_tags ($content, $general_tag = '') {
10751
 
10752
  $url = remove_debug_parameters_from_url ((isset ($_SERVER ['HTTPS']) && $_SERVER ['HTTPS'] === 'on' ? "https" : "http") . '://'. $_SERVER ['HTTP_HOST'] . $_SERVER ['REQUEST_URI']);
10753
 
 
 
10754
  $ai_wp_data [AI_TAGS]['TITLE'] = $title;
10755
  $ai_wp_data [AI_TAGS]['SHORT_TITLE'] = $short_title;
10756
  $ai_wp_data [AI_TAGS]['CATEGORY'] = $category;
@@ -10768,6 +10815,7 @@ function replace_ai_tags ($content, $general_tag = '') {
10768
  $ai_wp_data [AI_TAGS]['SEARCH_QUERY'] = $search_query;
10769
  $ai_wp_data [AI_TAGS]['AUTHOR'] = $author;
10770
  $ai_wp_data [AI_TAGS]['AUTHOR_NAME'] = $author_name;
 
10771
  $ai_wp_data [AI_TAGS]['URL'] = $url;
10772
  }
10773
 
@@ -10784,6 +10832,7 @@ function replace_ai_tags ($content, $general_tag = '') {
10784
  $ad_data = preg_replace ("/{search-query}/i", $ai_wp_data [AI_TAGS]['SEARCH_QUERY'], $ad_data);
10785
  $ad_data = preg_replace ("/{author}/i", $ai_wp_data [AI_TAGS]['AUTHOR'], $ad_data);
10786
  $ad_data = preg_replace ("/{author-name}/i", $ai_wp_data [AI_TAGS]['AUTHOR_NAME'], $ad_data);
 
10787
 
10788
  $ad_data = preg_replace ("/{short_title}/i", $ai_wp_data [AI_TAGS]['SHORT_TITLE'], $ad_data);
10789
  $ad_data = preg_replace ("/{short_category}/i", $ai_wp_data [AI_TAGS]['SHORT_CATEGORY'], $ad_data);
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
+ Version: 2.7.2
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.7.2 - 2021-07-05
21
+ - Added shortcuts for TCF v2 consent cookie checks
22
+ - Added support for adinserter shortcode to get post ID
23
+ - Improved ad blocking detection
24
+ - Changed internal IP to country database (Pro only)
25
+ - Few minor bug fixes, cosmetic changes and code improvements
26
+
27
  Ad Inserter 2.7.1 - 2021-06-16
28
  - Improved ad blocking detection
29
  - Few minor bug fixes, cosmetic changes and code improvements
1376
  if (isset ($_GET [AI_URL_DEBUG]) && $_GET [AI_URL_DEBUG] == 0) {
1377
  if (isset ($_COOKIE ['AI_WP_DEBUGGING'])) {
1378
  unset ($_COOKIE ['AI_WP_DEBUGGING']);
1379
+ ai_setcookie ('AI_WP_DEBUGGING', '', time() - (15 * 60), COOKIEPATH);
1380
  }
1381
  if (isset ($_COOKIE ['AI_WP_DEBUG_BLOCK'])) {
1382
  unset ($_COOKIE ['AI_WP_DEBUG_BLOCK']);
1383
+ ai_setcookie ('AI_WP_DEBUG_BLOCK', '', time() - (15 * 60), COOKIEPATH);
1384
  }
1385
  } else {
1386
  $ai_wp_data [AI_WP_DEBUGGING] = isset ($_COOKIE ['AI_WP_DEBUGGING']) ? $ai_wp_data [AI_WP_DEBUGGING] | ($_COOKIE ['AI_WP_DEBUGGING'] & ~AI_DEBUG_PROCESSING) : $ai_wp_data [AI_WP_DEBUGGING];
1414
  if (!defined ('AI_DEBUGGING_DEMO')) {
1415
  if ($ai_wp_data [AI_WP_DEBUGGING] != 0) {
1416
  if (!isset ($_GET ['no-cookie'])) {
1417
+ ai_setcookie ('AI_WP_DEBUGGING', $ai_wp_data [AI_WP_DEBUGGING], time() + AI_COOKIE_TIME, COOKIEPATH);
1418
  }
1419
+ } else if (isset ($_COOKIE ['AI_WP_DEBUGGING'])) ai_setcookie ('AI_WP_DEBUGGING', '', time() - (15 * 60), COOKIEPATH);
1420
 
1421
  if ($ai_wp_data [AI_WP_DEBUG_BLOCK] != 0) {
1422
  if (!isset ($_GET ['no-cookie'])) {
1423
+ ai_setcookie ('AI_WP_DEBUG_BLOCK', $ai_wp_data [AI_WP_DEBUG_BLOCK], time() + AI_COOKIE_TIME, COOKIEPATH);
1424
  }
1425
+ } else if (isset ($_COOKIE ['AI_WP_DEBUG_BLOCK'])) ai_setcookie ('AI_WP_DEBUG_BLOCK', '', time() - (15 * 60), COOKIEPATH);
1426
 
1427
  if ($ai_wp_data [AI_WP_DEBUGGING] != 0 || isset ($_GET [AI_URL_DEBUG])) {
1428
  ai_disable_caching ();
2549
  // return array ("<span ai-ao></span>","replace");
2550
  //}
2551
 
2552
+ function ai_adb_external_scripts () {
2553
+ $code = '';
2554
+
2555
+ if (!defined ('AI_ADB_NO_DOUBLECLICK_NET')) {
2556
+ $code .= '<object id="ai-adb-dblclk" data="https://securepubads.g.doubleclick.net/tag/js/gpt.js" style="position:absolute; z-index: -100; top: -1000px; left: -1000px; visibility: hidden;"></object>' . "\n";
2557
+ }
2558
+ if (!defined ('AI_ADB_NO_GOOGLE_ANALYTICS')) {
2559
+ $code .= '<object id="ai-adb-ga" data="https://www.google-analytics.com/analytics.js" style="position:absolute; z-index: -100; top: -1000px; left: -1000px; visibility: hidden;"></object>' . "\n";
2560
+ }
2561
+ if (!defined ('AI_ADB_NO_MEDIA_NET')) {
2562
+ $code .= '<object id="ai-adb-mn" data="//contextual.media.net/dmedianet.js" style="position:absolute; z-index: -100; 1px; top: -1000px; left: -1000px; visibility: hidden;"></object>' . "\n";
2563
+ }
2564
+
2565
+ return $code;
2566
+ }
2567
+
2568
  function add_footer_inline_scripts () {
2569
  global $ai_wp_data, $wp_version;
2570
 
2577
  echo '<!-- Code for ad blocking detection -->', "\n";
2578
  echo '<!--noptimize-->', "\n";
2579
 
2580
+ if (get_adb_external_scripts ()) {
2581
+ echo ai_adb_external_scripts ();
2582
  }
2583
+
2584
  if (!defined ('AI_ADB_NO_BANNER_AD')) {
2585
  echo '<div id="banner-advert-container" class="ad-inserter infolinks-ad" style="position:absolute; z-index: -10; height: 1px; width: 1px; top: -100px; left: -100px;"><img id="adsense" class="SponsorAds adsense" src="', AD_INSERTER_PLUGIN_IMAGES_URL, 'ads.png" width="1" height="1" alt="pixel"></div>', "\n";
2586
  }
 
 
 
 
 
 
2587
  if (!defined ('AI_ADB_NO_ADS_JS')) {
2588
  echo '<script async id="ai-adb-ads" src="', plugins_url ('js/ads.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
2589
  }
2612
 
2613
  ob_start ();
2614
 
 
 
 
2615
  if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
2616
  $js_code = "";
2617
 
2756
  'AI_JS_JQUERY1',
2757
  // "AI_JS_CODE=2"
2758
  ), array (
2759
+ includes_url ('js/jquery/jquery.min.js') . '?ver=' . $ver,
2760
  includes_url ('js/jquery/jquery-migrate.min.js') . '?ver=' . $wp_version,
2761
  // trim (ai_front_translations_code ())
2762
  ), $jquery_ready_code [1]);
4112
  if (function_exists ('ai_debug')) {
4113
  echo 'ADB DETECTION: ', get_adb_detection () == AI_ADB_DETECTION_ADVANCED ? 'ADVANCED' : 'STANDARD', "\n";
4114
  }
4115
+ echo 'ADB EXTERNAL SCRIPTS: ', get_adb_external_scripts () ? 'ON' : 'OFF', "\n";
4116
 
4117
  $redirection_page = get_redirection_page ();
4118
  echo 'ADB REDIRECTION PAGE: ', $redirection_page != 0 ? get_the_title ($redirection_page) . ' (' . get_permalink ($redirection_page) . ')' : 'Custom Url', "\n";
4641
  if (!isset ($plugin_options ['ADB_OVERLAY_CSS'])) $plugin_options ['ADB_OVERLAY_CSS'] = AI_DEFAULT_ADB_OVERLAY_CSS;
4642
  if (!isset ($plugin_options ['ADB_MESSAGE_CSS'])) $plugin_options ['ADB_MESSAGE_CSS'] = AI_DEFAULT_ADB_MESSAGE_CSS;
4643
  if (!isset ($plugin_options ['ADB_UNDISMISSIBLE_MESSAGE'])) $plugin_options ['ADB_UNDISMISSIBLE_MESSAGE'] = AI_DEFAULT_ADB_UNDISMISSIBLE_MESSAGE;
4644
+ if (!isset ($plugin_options ['ADB_EXTERNAL_SCRIPTS'])) $plugin_options ['ADB_EXTERNAL_SCRIPTS'] = AI_DEFAULT_ADB_EXTERNAL_SCRIPTS;
4645
  if (!isset ($plugin_options ['ADB_NO_UNDISMISSIBLE_MESSAGE'])) $plugin_options ['ADB_NO_UNDISMISSIBLE_MESSAGE'] = AI_DEFAULT_ADB_NO_UNDISMISSIBLE_MESSAGE;
4646
  if (!isset ($plugin_options ['ADMIN_TOOLBAR_DEBUGGING'])) $plugin_options ['ADMIN_TOOLBAR_DEBUGGING'] = DEFAULT_ADMIN_TOOLBAR_DEBUGGING;
4647
  if (!isset ($plugin_options ['ADMIN_TOOLBAR_MOBILE'])) $plugin_options ['ADMIN_TOOLBAR_MOBILE'] = DEFAULT_ADMIN_TOOLBAR_MOBILE;
5524
  return ($ai_db_options [AI_OPTION_GLOBAL]['ADB_CUSTOM_REDIRECTION_URL']);
5525
  }
5526
 
5527
+ function get_adb_external_scripts () {
5528
+ global $ai_db_options;
5529
+
5530
+ if (!isset ($ai_db_options [AI_OPTION_GLOBAL]['ADB_EXTERNAL_SCRIPTS'])) $ai_db_options [AI_OPTION_GLOBAL]['ADB_EXTERNAL_SCRIPTS'] = AI_DEFAULT_ADB_EXTERNAL_SCRIPTS;
5531
+
5532
+ return ($ai_db_options [AI_OPTION_GLOBAL]['ADB_EXTERNAL_SCRIPTS']);
5533
+ }
5534
+
5535
  function get_message_css () {
5536
  global $ai_db_options;
5537
 
7167
  if (isset ($_POST [AI_OPTION_ADB_MESSAGE_CSS])) $options ['ADB_MESSAGE_CSS'] = filter_option ('ADB_MESSAGE_CSS', $_POST [AI_OPTION_ADB_MESSAGE_CSS]);
7168
  if (isset ($_POST [AI_OPTION_ADB_OVERLAY_CSS])) $options ['ADB_OVERLAY_CSS'] = filter_option ('ADB_OVERLAY_CSS', $_POST [AI_OPTION_ADB_OVERLAY_CSS]);
7169
  if (isset ($_POST [AI_OPTION_ADB_UNDISMISSIBLE_MESSAGE])) $options ['ADB_UNDISMISSIBLE_MESSAGE'] = filter_option ('ADB_UNDISMISSIBLE_MESSAGE', $_POST [AI_OPTION_ADB_UNDISMISSIBLE_MESSAGE]);
7170
+ if (isset ($_POST [AI_OPTION_ADB_EXTERNAL_SCRIPTS])) $options ['ADB_EXTERNAL_SCRIPTS'] = filter_option ('ADB_EXTERNAL_SCRIPTS', $_POST [AI_OPTION_ADB_EXTERNAL_SCRIPTS]);
7171
  if (isset ($_POST [AI_OPTION_ADB_NO_UNDISMISSIBLE_MESSAGE]))$options ['ADB_NO_UNDISMISSIBLE_MESSAGE'] = filter_option ('ADB_NO_UNDISMISSIBLE_MESSAGE', $_POST [AI_OPTION_ADB_NO_UNDISMISSIBLE_MESSAGE]);
7172
  if (isset ($_POST ['force_admin_toolbar'])) $options ['FORCE_ADMIN_TOOLBAR'] = filter_option ('FORCE_ADMIN_TOOLBAR', $_POST ['force_admin_toolbar']);
7173
  if (isset ($_POST ['admin_toolbar_debugging'])) $options ['ADMIN_TOOLBAR_DEBUGGING'] = filter_option ('ADMIN_TOOLBAR_DEBUGGING', $_POST ['admin_toolbar_debugging']);
8391
  case 'disabled':
8392
  $ai_wp_data [AI_ADB_SHORTCODE_DISABLED] = true;
8393
  break;
8394
+ case 'external-scripts':
8395
+ if (!get_adb_external_scripts ()) {
8396
+ return ai_adb_external_scripts ();
8397
+ }
8398
  }
8399
  return "";
8400
  }
9931
  $ai_cookie_array = (array) $ai_cookie;
9932
  if (empty ($ai_cookie_array)) {
9933
  unset ($_COOKIE [$ai_cookie_name]);
9934
+ ai_setcookie ($ai_cookie_name, null, - 1, '/');
9935
  } else {
9936
  $_COOKIE [$ai_cookie_name] = addslashes (json_encode ($ai_cookie));
9937
+ ai_setcookie ($ai_cookie_name, $_COOKIE [$ai_cookie_name], time () + 365 * 24 * 3600, '/');
9938
  }
9939
 
9940
  // if (isset ($_COOKIE [$ai_cookie_name])) {
10460
  return false;
10461
  }
10462
 
10463
+
10464
+ function ai_setcookie ($name, $value, $expire, $path, $samesite = 'Lax') {
10465
+ if (PHP_VERSION_ID < 70300) {
10466
+ setcookie ($name, $value, $expire, $path . '; samesite=' . $samesite);
10467
+ return;
10468
+ }
10469
+
10470
+ setcookie ($name, $value, [
10471
+ 'expires' => $expire,
10472
+ 'path' => $path,
10473
+ 'samesite' => $samesite,
10474
+ ]);
10475
+ }
10476
+
10477
+
10478
  function ai_process_viewport_separators ($code, $viewport_shortcode_data) {
10479
  global $ai_wp_data;
10480
 
10796
 
10797
  $url = remove_debug_parameters_from_url ((isset ($_SERVER ['HTTPS']) && $_SERVER ['HTTPS'] === 'on' ? "https" : "http") . '://'. $_SERVER ['HTTP_HOST'] . $_SERVER ['REQUEST_URI']);
10798
 
10799
+ $post_id = ai_get_post_id ();
10800
+
10801
  $ai_wp_data [AI_TAGS]['TITLE'] = $title;
10802
  $ai_wp_data [AI_TAGS]['SHORT_TITLE'] = $short_title;
10803
  $ai_wp_data [AI_TAGS]['CATEGORY'] = $category;
10815
  $ai_wp_data [AI_TAGS]['SEARCH_QUERY'] = $search_query;
10816
  $ai_wp_data [AI_TAGS]['AUTHOR'] = $author;
10817
  $ai_wp_data [AI_TAGS]['AUTHOR_NAME'] = $author_name;
10818
+ $ai_wp_data [AI_TAGS]['POST_ID'] = $post_id;
10819
  $ai_wp_data [AI_TAGS]['URL'] = $url;
10820
  }
10821
 
10832
  $ad_data = preg_replace ("/{search-query}/i", $ai_wp_data [AI_TAGS]['SEARCH_QUERY'], $ad_data);
10833
  $ad_data = preg_replace ("/{author}/i", $ai_wp_data [AI_TAGS]['AUTHOR'], $ad_data);
10834
  $ad_data = preg_replace ("/{author-name}/i", $ai_wp_data [AI_TAGS]['AUTHOR_NAME'], $ad_data);
10835
+ $ad_data = preg_replace ("/{post-id}/i", $ai_wp_data [AI_TAGS]['POST_ID'], $ad_data);
10836
 
10837
  $ad_data = preg_replace ("/{short_title}/i", $ai_wp_data [AI_TAGS]['SHORT_TITLE'], $ad_data);
10838
  $ad_data = preg_replace ("/{short_category}/i", $ai_wp_data [AI_TAGS]['SHORT_CATEGORY'], $ad_data);
class.php CHANGED
@@ -3943,14 +3943,27 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
3943
  $fallback_tracking_data = '';
3944
  if ($scheduling_type !== null) {
3945
  $fallback_block = $scheduling_fallback_block;
 
3946
  if ($fallback_block != $this->number && $fallback_block >= 1 && $fallback_block <= 96) {
3947
- $fallback_block_data = $fallback_block;
3948
- $fallback_obj = $block_object [$fallback_block];
3949
- $fallback_code = $fallback_obj->ai_getProcessedCode ();
3950
- $fallback_code_data = " data-fallback-code='" . base64_encode ($fallback_code) . "'";
3951
 
3952
- $fallback_tracking_block = $fallback_obj->get_tracking () ? $fallback_obj->number : 0;
3953
- $fallback_tracking_data = base64_encode ("[{$fallback_tracking_block},{$fallback_obj->code_version},\"{$fallback_obj->get_ad_name ()}\",\"{$fallback_obj->version_name}\"]");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3954
 
3955
  }
3956
  }
@@ -8169,9 +8182,7 @@ echo '</body>
8169
  case AI_SCHEDULING_DELAY_FOR:
8170
  $after_days = trim ($this->get_ad_after_day());
8171
  if ($after_days == '') return true;
8172
- // $after_days = intval ($after_days);
8173
  $after_days = $after_days;
8174
- // if ($after_days == AD_ZERO) return true;
8175
 
8176
  $post_date = get_the_date ('U');
8177
  if ($post_date === false) return true;
@@ -8182,9 +8193,7 @@ echo '</body>
8182
  case AI_SCHEDULING_INSERT_ONLY_FOR:
8183
  $after_days = trim ($this->get_ad_after_day());
8184
  if ($after_days == '') return false;
8185
- // $after_days = intval ($after_days);
8186
  $after_days = $after_days;
8187
- // if ($after_days == AD_ZERO) return false;
8188
 
8189
  $post_date = get_the_date ('U');
8190
  if ($post_date === false) return false;
@@ -8270,11 +8279,15 @@ echo '</body>
8270
  $insertion_enabled = $post_date >= $start_date && $post_date < $end_date && in_array ($post_weekday, $weekdays);
8271
 
8272
  if (!$insertion_enabled) {
 
 
8273
  $fallback = intval ($this->get_fallback());
8274
- if ($fallback != $this->number && $fallback != 0 && $fallback <= 96) {
8275
  $this->fallback = $fallback;
8276
  return true;
8277
  }
 
 
8278
  }
8279
 
8280
  return ($insertion_enabled);
@@ -8307,11 +8320,15 @@ echo '</body>
8307
  $insertion_enabled = $post_date < $start_date || $post_date >= $end_date || !in_array ($post_weekday, $weekdays);
8308
 
8309
  if (!$insertion_enabled) {
 
 
8310
  $fallback = intval ($this->get_fallback());
8311
- if ($fallback != $this->number && $fallback != 0 && $fallback <= 96) {
8312
  $this->fallback = $fallback;
8313
  return true;
8314
  }
 
 
8315
  }
8316
 
8317
  return ($insertion_enabled);
3943
  $fallback_tracking_data = '';
3944
  if ($scheduling_type !== null) {
3945
  $fallback_block = $scheduling_fallback_block;
3946
+
3947
  if ($fallback_block != $this->number && $fallback_block >= 1 && $fallback_block <= 96) {
 
 
 
 
3948
 
3949
+ $globals_name = AI_SCHEDULING_FALLBACK_DEPTH_NAME;
3950
+ if (!isset ($ad_inserter_globals [$globals_name])) {
3951
+ $ad_inserter_globals [$globals_name] = 0;
3952
+ }
3953
+
3954
+ if ($ad_inserter_globals [$globals_name] < 2) {
3955
+ $ad_inserter_globals [$globals_name] ++;
3956
+
3957
+ $fallback_block_data = $fallback_block;
3958
+ $fallback_obj = $block_object [$fallback_block];
3959
+ $fallback_code = $fallback_obj->ai_getProcessedCode ();
3960
+ $fallback_code_data = " data-fallback-code='" . base64_encode ($fallback_code) . "'";
3961
+
3962
+ $fallback_tracking_block = $fallback_obj->get_tracking () ? $fallback_obj->number : 0;
3963
+ $fallback_tracking_data = base64_encode ("[{$fallback_tracking_block},{$fallback_obj->code_version},\"{$fallback_obj->get_ad_name ()}\",\"{$fallback_obj->version_name}\"]");
3964
+
3965
+ $ad_inserter_globals [$globals_name] --;
3966
+ }
3967
 
3968
  }
3969
  }
8182
  case AI_SCHEDULING_DELAY_FOR:
8183
  $after_days = trim ($this->get_ad_after_day());
8184
  if ($after_days == '') return true;
 
8185
  $after_days = $after_days;
 
8186
 
8187
  $post_date = get_the_date ('U');
8188
  if ($post_date === false) return true;
8193
  case AI_SCHEDULING_INSERT_ONLY_FOR:
8194
  $after_days = trim ($this->get_ad_after_day());
8195
  if ($after_days == '') return false;
 
8196
  $after_days = $after_days;
 
8197
 
8198
  $post_date = get_the_date ('U');
8199
  if ($post_date === false) return false;
8279
  $insertion_enabled = $post_date >= $start_date && $post_date < $end_date && in_array ($post_weekday, $weekdays);
8280
 
8281
  if (!$insertion_enabled) {
8282
+ if (!isset ($ai_wp_data [AI_FALLBACK_LEVEL])) $ai_wp_data [AI_FALLBACK_LEVEL] = 1; else $ai_wp_data [AI_FALLBACK_LEVEL] ++;
8283
+
8284
  $fallback = intval ($this->get_fallback());
8285
+ if ($fallback != $this->number && $fallback != 0 && $fallback <= 96 && $ai_wp_data [AI_FALLBACK_LEVEL] <= 2) {
8286
  $this->fallback = $fallback;
8287
  return true;
8288
  }
8289
+
8290
+ $ai_wp_data [AI_FALLBACK_LEVEL] --;
8291
  }
8292
 
8293
  return ($insertion_enabled);
8320
  $insertion_enabled = $post_date < $start_date || $post_date >= $end_date || !in_array ($post_weekday, $weekdays);
8321
 
8322
  if (!$insertion_enabled) {
8323
+ if (!isset ($ai_wp_data [AI_FALLBACK_LEVEL])) $ai_wp_data [AI_FALLBACK_LEVEL] = 1; else $ai_wp_data [AI_FALLBACK_LEVEL] ++;
8324
+
8325
  $fallback = intval ($this->get_fallback());
8326
+ if ($fallback != $this->number && $fallback != 0 && $fallback <= 96 && $ai_wp_data [AI_FALLBACK_LEVEL] <= 2) {
8327
  $this->fallback = $fallback;
8328
  return true;
8329
  }
8330
+
8331
+ $ai_wp_data [AI_FALLBACK_LEVEL] --;
8332
  }
8333
 
8334
  return ($insertion_enabled);
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.7.1');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
@@ -227,6 +227,7 @@ define ('AI_OPTION_ADB_MESSAGE_CSS', 'adb-message-css');
227
  define ('AI_OPTION_ADB_OVERLAY_CSS', 'adb-overlay-css');
228
  define ('AI_OPTION_ADB_UNDISMISSIBLE_MESSAGE', 'adb-undismissible-message');
229
  define ('AI_OPTION_ADB_NO_UNDISMISSIBLE_MESSAGE','adb-no-undismissible-message');
 
230
 
231
  //misc
232
  define('AD_EMPTY_VALUE','');
@@ -734,10 +735,9 @@ define ('AI_STICKY_WIDGET_MODE_JS', 1);
734
  define ('AI_TEXT_CSS', 'CSS');
735
  define ('AI_TEXT_JS', 'JavaScript ');
736
 
737
- define ('AI_GEO_DB_WEBNET77', 0);
738
  define ('AI_GEO_DB_MAXMIND', 1);
739
 
740
- define ('AI_TEXT_WEBNET77', 'Webnet77');
741
  define ('AI_TEXT_MAXMIND', 'MaxMind');
742
 
743
  define ('AI_MANUAL_LOADING_DISABLED',0);
@@ -874,7 +874,7 @@ define ('DEFAULT_OUTPUT_BUFFERING', AI_OUTPUT_BUFFERING_DISABLED);
874
  define ('DEFAULT_DISABLE_CACHING', AI_DISABLE_CACHING_ENABLED);
875
  define ('DEFAULT_TAB_SETUP_DELAY', 100);
876
  define ('DEFAULT_WAIT_FOR_JQUERY', AI_WAIT_FOR_JQUERY_ENABLED);
877
- define ('DEFAULT_GEO_DB', AI_GEO_DB_WEBNET77);
878
  define ('DEFAULT_GEO_DB_UPDATES', AI_DISABLED);
879
  define ('DEFAULT_CLOSE_BUTTON', AI_CLOSE_NONE);
880
  define ('DEFAULT_AUTO_CLOSE_TIME', '');
@@ -966,6 +966,7 @@ define ('AI_DEFAULT_ADB_ACTION', AI_ADB_ACTION_NONE);
966
  define ('AI_DEFAULT_ADB_NO_ACTION', AI_ADB_NO_ACTION_NONE);
967
  define ('AI_DEFAULT_ADB_NO_ACTION_PERIOD', 30);
968
  define ('AI_DEFAULT_ADB_REDIRECTION_PAGE', 0);
 
969
  define ('AI_DEFAULT_ADB_UNDISMISSIBLE_MESSAGE', AI_DISABLED);
970
  define ('AI_DEFAULT_ADB_NO_UNDISMISSIBLE_MESSAGE', AI_ADB_NO_ACTION_NONE);
971
  define ('AI_ADB_VERSION_MASK', 0x7F);
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
+ define ('AD_INSERTER_VERSION', '2.7.2');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
227
  define ('AI_OPTION_ADB_OVERLAY_CSS', 'adb-overlay-css');
228
  define ('AI_OPTION_ADB_UNDISMISSIBLE_MESSAGE', 'adb-undismissible-message');
229
  define ('AI_OPTION_ADB_NO_UNDISMISSIBLE_MESSAGE','adb-no-undismissible-message');
230
+ define ('AI_OPTION_ADB_EXTERNAL_SCRIPTS', 'adb-external-scripts');
231
 
232
  //misc
233
  define('AD_EMPTY_VALUE','');
735
  define ('AI_TEXT_CSS', 'CSS');
736
  define ('AI_TEXT_JS', 'JavaScript ');
737
 
738
+ define ('AI_GEO_DB_INTERNAL', 0);
739
  define ('AI_GEO_DB_MAXMIND', 1);
740
 
 
741
  define ('AI_TEXT_MAXMIND', 'MaxMind');
742
 
743
  define ('AI_MANUAL_LOADING_DISABLED',0);
874
  define ('DEFAULT_DISABLE_CACHING', AI_DISABLE_CACHING_ENABLED);
875
  define ('DEFAULT_TAB_SETUP_DELAY', 100);
876
  define ('DEFAULT_WAIT_FOR_JQUERY', AI_WAIT_FOR_JQUERY_ENABLED);
877
+ define ('DEFAULT_GEO_DB', AI_GEO_DB_INTERNAL);
878
  define ('DEFAULT_GEO_DB_UPDATES', AI_DISABLED);
879
  define ('DEFAULT_CLOSE_BUTTON', AI_CLOSE_NONE);
880
  define ('DEFAULT_AUTO_CLOSE_TIME', '');
966
  define ('AI_DEFAULT_ADB_NO_ACTION', AI_ADB_NO_ACTION_NONE);
967
  define ('AI_DEFAULT_ADB_NO_ACTION_PERIOD', 30);
968
  define ('AI_DEFAULT_ADB_REDIRECTION_PAGE', 0);
969
+ define ('AI_DEFAULT_ADB_EXTERNAL_SCRIPTS', AI_ENABLED);
970
  define ('AI_DEFAULT_ADB_UNDISMISSIBLE_MESSAGE', AI_DISABLED);
971
  define ('AI_DEFAULT_ADB_NO_UNDISMISSIBLE_MESSAGE', AI_ADB_NO_ACTION_NONE);
972
  define ('AI_ADB_VERSION_MASK', 0x7F);
css/ai-settings.css CHANGED
@@ -1,5 +1,5 @@
1
  #ai-data {
2
- font-family: "2.7.1"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
@@ -63,16 +63,22 @@ hr {
63
  filter: alpha(opacity=50);
64
  }
65
 
66
- .ui-button.ui-corner-all.ui-widget {
 
67
  padding: .4em 1em;
68
  border: 1px solid #d3d3d3;
 
69
  background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
70
  color: #666;
 
71
  }
72
 
73
  /*.ai-button.ui-button.ui-corner-all.ui-widget {*/
74
- .ai-button.ai-button-small.ui-button.ui-corner-all.ui-widget {
 
75
  padding: 0;
 
 
76
  }
77
 
78
  button.ui-button.ui-corner-all.ui-dialog-titlebar-close {
1
  #ai-data {
2
+ font-family: "2.7.2"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
63
  filter: alpha(opacity=50);
64
  }
65
 
66
+ /*.ui-button.ui-corner-all.ui-widget {*/
67
+ .ui-button.ui-corner-all.ui-widget:not(.ai-button-small), button.ai-button, button.ai-button2, input[type=submit] {
68
  padding: .4em 1em;
69
  border: 1px solid #d3d3d3;
70
+ border-radius: 4px;
71
  background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
72
  color: #666;
73
+ cursor: pointer;
74
  }
75
 
76
  /*.ai-button.ui-button.ui-corner-all.ui-widget {*/
77
+ /*.ai-button.ai-button-small.ui-button.ui-corner-all.ui-widget {*/
78
+ .ai-button.ai-button-small {
79
  padding: 0;
80
+ border-radius: 4px;
81
+ cursor: pointer;
82
  }
83
 
84
  button.ui-button.ui-corner-all.ui-dialog-titlebar-close {
includes/js/ai-adb.js CHANGED
@@ -20,7 +20,7 @@ function ai_adb_process_content () {
20
  // var ai_adb_debugging = false;
21
 
22
  if (ai_adb_debugging) console.log ('');
23
- if (ai_adb_debugging) console.log ("AI AD BLOCKING CONTENT PROCESSING");
24
 
25
  $(".AI_ADB_CONTENT_CSS_BEGIN_CLASS").each (function () {
26
  var ai_adb_parent = $(this).parent ();
@@ -148,6 +148,9 @@ function ai_adb_process_blocks (element) {
148
  if (ai_adb_debugging) console.log ("AI AD BLOCKING block actions:", ai_adb_active, $(element).prop ("tagName") + '.' + $(element).attr ('class'));
149
 
150
  if (typeof ai_adb_data === "string" && typeof ai_adb_active === "boolean") {
 
 
 
151
  if (ai_adb_active) {
152
 
153
  var code_inserted = false;
@@ -385,7 +388,7 @@ var ai_adb_detected_actions = function(n) {
385
  });
386
 
387
  if (ai_adb_debugging) console.log ("AI AD BLOCKING action check");
388
- // AiCookies.remove (ai_adb_pgv_cookie_name, {path: "/" });
389
 
390
  // Disable action for bots
391
  if (typeof MobileDetect !== "undefined") {
@@ -449,7 +452,7 @@ var ai_adb_detected_actions = function(n) {
449
  else if (ai_adb_debugging) console.log ("AI AD BLOCKING invalid cookie");
450
  AiCookies.set (ai_adb_act_cookie_name, "AI_CONST_AI_ADB_COOKIE_VALUE", {expires: ai_adb_message_cookie_lifetime, path: "/"});
451
  } else
452
- AiCookies.remove (ai_adb_act_cookie_name, {path: "/" });
453
 
454
  if (ai_adb_debugging) console.log ("AI AD BLOCKING action", ai_adb_action);
455
 
@@ -483,7 +486,7 @@ var ai_adb_detected_actions = function(n) {
483
  if (ai_adb_debugging) console.log ("AI AD BLOCKING MESSAGE click detection installed");
484
 
485
  } else {
486
- // AiCookies.remove (ai_adb_act_cookie_name, {path: "/" });
487
 
488
  ai_adb_overlay.find ('[style*="cursor"]').css ("cursor", "no-drop");
489
  ai_adb_message_window.find ('[style*="cursor"]').css ("cursor", "no-drop");
@@ -512,7 +515,7 @@ var ai_adb_detected_actions = function(n) {
512
  if (typeof cookie == "undefined") {
513
  var date = new Date();
514
  date.setTime (date.getTime() + (10 * 1000));
515
- AiCookies.set (ai_adb_page_redirection_cookie_name, window.location.href, {expires: date, path: "/" });
516
 
517
  window.location.replace (ai_adb_redirection_url)
518
  } else {
@@ -532,7 +535,16 @@ var ai_adb_detected_actions = function(n) {
532
  }
533
 
534
 
535
- var ai_adb_undetected = function(n) {
 
 
 
 
 
 
 
 
 
536
  ai_adb_counter ++;
537
 
538
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 5
@@ -614,8 +626,8 @@ jQuery (document).ready (function ($) {
614
 
615
  setTimeout (function() {
616
  $("#ai-adb-bar").click (function () {
617
- AiCookies.remove (ai_adb_act_cookie_name, {path: "/" });
618
- AiCookies.remove (ai_adb_pgv_cookie_name, {path: "/" });
619
  window.AI_ADB_STATUS_MESSAGE=5;
620
  ai_dummy = 15; // Do not remove - to prevent optimization
621
  });
@@ -672,15 +684,6 @@ jQuery (document).ready (function ($) {
672
  if (ai_adb_el_counter != 0 && ai_adb_el_zero == 0) $(document).ready (function () {ai_adb_undetected (4)});
673
  }
674
 
675
- var element = jQuery (b64d ("I2FpLWFkYi1kYmxjbGs="));
676
- if (element.length) {
677
- if (!!(element.width () * element.height ())) {
678
- ai_adb_undetected (8);
679
- } else {
680
- if (!ai_adb_active || ai_debugging_active) ai_adb_detected (8);
681
- }
682
- }
683
-
684
  });
685
  });
686
 
@@ -765,7 +768,9 @@ jQuery (window).on ('load', function () {
765
  }
766
  }
767
 
768
- setTimeout (function() {
 
 
769
  var element = jQuery (b64d ("I2FpLWFkYi1nYQ=="));
770
  if (element.length) {
771
  if (!!(element.width () * element.height ())) {
@@ -783,11 +788,37 @@ jQuery (window).on ('load', function () {
783
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (6);
784
  }
785
  }
786
- }, 5);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
787
 
788
  setTimeout (function() {
789
  var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
790
 
 
 
791
  if (jQuery(b64d ("I2FpLWFkYi1hZHM=")).length) {
792
  if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")) {
793
  ai_adb_get_script ('ads', ai_adb_1);
@@ -818,6 +849,6 @@ jQuery (window).on ('load', function () {
818
  if (jQuery(b64d ("I2FpLWFkYi0zMDB4MjUw")).length) {
819
  ai_adb_12 ();
820
  }
821
- }, 120);
822
  });
823
 
20
  // var ai_adb_debugging = false;
21
 
22
  if (ai_adb_debugging) console.log ('');
23
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING CONTENT PROCESSING", ai_adb_active);
24
 
25
  $(".AI_ADB_CONTENT_CSS_BEGIN_CLASS").each (function () {
26
  var ai_adb_parent = $(this).parent ();
148
  if (ai_adb_debugging) console.log ("AI AD BLOCKING block actions:", ai_adb_active, $(element).prop ("tagName") + '.' + $(element).attr ('class'));
149
 
150
  if (typeof ai_adb_data === "string" && typeof ai_adb_active === "boolean") {
151
+
152
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING block actions checking");
153
+
154
  if (ai_adb_active) {
155
 
156
  var code_inserted = false;
388
  });
389
 
390
  if (ai_adb_debugging) console.log ("AI AD BLOCKING action check");
391
+ // AiCookies.remove (ai_adb_pgv_cookie_name, {path: "/"});
392
 
393
  // Disable action for bots
394
  if (typeof MobileDetect !== "undefined") {
452
  else if (ai_adb_debugging) console.log ("AI AD BLOCKING invalid cookie");
453
  AiCookies.set (ai_adb_act_cookie_name, "AI_CONST_AI_ADB_COOKIE_VALUE", {expires: ai_adb_message_cookie_lifetime, path: "/"});
454
  } else
455
+ AiCookies.remove (ai_adb_act_cookie_name, {path: "/"});
456
 
457
  if (ai_adb_debugging) console.log ("AI AD BLOCKING action", ai_adb_action);
458
 
486
  if (ai_adb_debugging) console.log ("AI AD BLOCKING MESSAGE click detection installed");
487
 
488
  } else {
489
+ // AiCookies.remove (ai_adb_act_cookie_name, {path: "/"});
490
 
491
  ai_adb_overlay.find ('[style*="cursor"]').css ("cursor", "no-drop");
492
  ai_adb_message_window.find ('[style*="cursor"]').css ("cursor", "no-drop");
515
  if (typeof cookie == "undefined") {
516
  var date = new Date();
517
  date.setTime (date.getTime() + (10 * 1000));
518
+ AiCookies.set (ai_adb_page_redirection_cookie_name, window.location.href, {expires: date, path: "/"});
519
 
520
  window.location.replace (ai_adb_redirection_url)
521
  } else {
535
  }
536
 
537
 
538
+ var ai_adb_undetected = function (n) {
539
+ setTimeout (function() {
540
+ if (!ai_adb_active) {
541
+ ai_adb_undetected_actions (n);
542
+ }
543
+ }, 200);
544
+ }
545
+
546
+
547
+ var ai_adb_undetected_actions = function (n) {
548
  ai_adb_counter ++;
549
 
550
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 5
626
 
627
  setTimeout (function() {
628
  $("#ai-adb-bar").click (function () {
629
+ AiCookies.remove (ai_adb_act_cookie_name, {path: "/"});
630
+ AiCookies.remove (ai_adb_pgv_cookie_name, {path: "/"});
631
  window.AI_ADB_STATUS_MESSAGE=5;
632
  ai_dummy = 15; // Do not remove - to prevent optimization
633
  });
684
  if (ai_adb_el_counter != 0 && ai_adb_el_zero == 0) $(document).ready (function () {ai_adb_undetected (4)});
685
  }
686
 
 
 
 
 
 
 
 
 
 
687
  });
688
  });
689
 
768
  }
769
  }
770
 
771
+ function ai_adb_external_scripts () {
772
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING check external scripts");
773
+
774
  var element = jQuery (b64d ("I2FpLWFkYi1nYQ=="));
775
  if (element.length) {
776
  if (!!(element.width () * element.height ())) {
788
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (6);
789
  }
790
  }
791
+
792
+ var element = jQuery (b64d ("I2FpLWFkYi1kYmxjbGs="));
793
+ if (element.length) {
794
+ if (!!(element.width () * element.height ())) {
795
+ ai_adb_undetected (8);
796
+ } else {
797
+ if (!ai_adb_active || ai_debugging_active) ai_adb_detected (8);
798
+ }
799
+ }
800
+ }
801
+
802
+ setTimeout (function() {
803
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING delayed checks external scripts");
804
+
805
+ ai_adb_external_scripts ();
806
+
807
+ // Check again, result is delayed
808
+ setTimeout (function() {
809
+ if (!ai_adb_active) {
810
+ setTimeout (function() {
811
+ ai_adb_external_scripts ();
812
+ }, 400);
813
+ }
814
+ }, 5);
815
+ }, 1050);
816
 
817
  setTimeout (function() {
818
  var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
819
 
820
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING delayed checks 1, 2, 3, 11, 12");
821
+
822
  if (jQuery(b64d ("I2FpLWFkYi1hZHM=")).length) {
823
  if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")) {
824
  ai_adb_get_script ('ads', ai_adb_1);
849
  if (jQuery(b64d ("I2FpLWFkYi0zMDB4MjUw")).length) {
850
  ai_adb_12 ();
851
  }
852
+ }, 1150);
853
  });
854
 
includes/js/ai-adb.min.js CHANGED
@@ -1,23 +1,24 @@
1
  var ai_adb_active=!1,ai_adb_counter=0,ai_adb_act_cookie_name="aiADB",ai_adb_pgv_cookie_name="aiADB_PV",ai_adb_page_redirection_cookie_name="aiADB_PR",ai_adb_overlay=AI_ADB_OVERLAY_WINDOW,ai_adb_message_window=AI_ADB_MESSAGE_WINDOW,ai_adb_message_undismissible=AI_FUNCB_GET_UNDISMISSIBLE_MESSAGE,ai_adb_message_cookie_lifetime=AI_FUNCT_GET_NO_ACTION_PERIOD,ai_adb_action=AI_FUNC_GET_ADB_ACTION,ai_adb_page_views="AI_FUNC_GET_DELAY_ACTION",ai_adb_selectors="AI_ADB_SELECTORS",ai_adb_redirection_url="AI_ADB_REDIRECTION_PAGE";
2
- function ai_adb_process_content(){(function(a){a(".AI_ADB_CONTENT_CSS_BEGIN_CLASS").each(function(){var d=a(this).parent(),b=a(this).data("css");"undefined"==typeof b&&(b="display: none !important;");var c=a(this).data("selectors");if("undefined"==typeof c||""==c)c="p";var g=!1;a(d).find(".AI_ADB_CONTENT_CSS_BEGIN_CLASS, .AI_ADB_CONTENT_CSS_END_CLASS, "+c).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_CSS_BEGIN_CLASS"))a(this).remove(),g=!0;else if(a(this).hasClass("AI_ADB_CONTENT_CSS_END_CLASS"))a(this).remove(),
3
- g=!1;else if(g){var e=a(this).attr("style");"undefined"==typeof e?e="":(e=e.trim(),""!=e&&";"!=e[e.length-1]&&(e+=";"));a(this).attr("style",e+" "+b)}})});a(".AI_ADB_CONTENT_DELETE_BEGIN_CLASS").each(function(){var d=a(this).parent(),b=a(this).data("selectors");if("undefined"==typeof b||""==b)b="p";var c=!1;a(d).find(".AI_ADB_CONTENT_DELETE_BEGIN_CLASS, .AI_ADB_CONTENT_DELETE_END_CLASS, "+b).each(function(){a(this).hasClass("AI_ADB_CONTENT_DELETE_BEGIN_CLASS")?(a(this).remove(),c=!0):a(this).hasClass("AI_ADB_CONTENT_DELETE_END_CLASS")?
4
- (a(this).remove(),c=!1):c&&a(this).remove()})});a(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS").each(function(){var d=a(this).parent(),b=a(this).data("text");"undefined"==typeof b&&(b="");var c=a(this).data("css");"undefined"==typeof c&&(c="");var g=a(this).data("selectors");if("undefined"==typeof g||""==g)g="p";var e=!1;a(d).find(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS, .AI_ADB_CONTENT_REPLACE_END_CLASS, "+g).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_BEGIN_CLASS"))a(this).remove(),e=!0;else if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_END_CLASS"))a(this).remove(),
5
- e=!1;else if(e){if(0!=b.length){var f=Math.round(a(this).text().length/(b.length+1));a(this).text(Array(f+1).join(b+" ").trim())}else a(this).text("");""!=c&&(f=a(this).attr("style"),"undefined"==typeof f?f="":(f=f.trim(),""!=f&&";"!=f[f.length-1]&&(f+=";")),""!=c&&(c=" "+c),a(this).attr("style",f+c))}})})})(jQuery)}
6
- function ai_adb_process_blocks(a){(function(d){"undefined"==typeof a&&(a=d("body"));var b=d(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME),c="string"===typeof b?b==b64d("bWFzaw=="):null;if("string"===typeof b&&"boolean"===typeof c)if(c){do{var g=!1;d(".ai-adb-hide",a).each(function(){d(this).css({display:"none",visibility:"hidden"});d(this).removeClass("ai-adb-hide");var e=d(this).closest("div[data-ai]");if("undefined"!=typeof e.attr("data-ai")){var f=JSON.parse(b64d(e.attr("data-ai")));"undefined"!==typeof f&&
7
- f.constructor===Array&&(f[1]="",e.attr("data-ai",b64e(JSON.stringify(f))))}ai_disable_processing(d(this))});d(".ai-adb-show",a).each(function(){d(this).css({display:"block",visibility:"visible"});d(this).removeClass("ai-adb-show");if("undefined"!=typeof d(this).data("code")){var e=b64d(d(this).data("code"));d(this).append(e);g=!0;"function"==typeof ai_process_elements&&ai_process_elements()}e=d(this).attr("data-ai-tracking");if("undefined"!=typeof e){var f=d(this).closest("div[data-ai]");if("undefined"!=
8
- typeof f.attr("data-ai")){if(d(this).hasClass("ai-no-tracking")){var h=JSON.parse(b64d(f.attr("data-ai")));"undefined"!==typeof h&&h.constructor===Array&&(h[1]="",e=b64e(JSON.stringify(h)))}f.attr("data-ai",e)}}})}while(g);setTimeout(function(){"function"==typeof ai_process_impressions&&1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers()},15);setTimeout(ai_adb_process_content,10)}else d(".ai-adb-hide",
9
- a).each(function(){d(this).removeClass("ai-adb-hide");if(0==d(this).outerHeight()&&0==d(this).closest(".ai-adb-show").length){var e=d(this).closest("div[data-ai]");if("undefined"!=typeof e.attr("data-ai")){var f=JSON.parse(b64d(e.attr("data-ai")));"undefined"!==typeof f&&f.constructor===Array&&(f[1]="",e.attr("data-ai",b64e(JSON.stringify(f))),e.addClass("ai-viewport-0").css("display","none"))}}}),d(".ai-adb-show",a).each(function(){ai_disable_processing(d(this));d(this).removeClass("ai-adb-show")})})(jQuery)}
10
- ai_adb_detection_type_log=function(a){var d=ai_adb_detection_type(a),b=jQuery("#ai-adb-events");if(0!=b.count){var c=b.text();b.text((""!=c?c+", ":c+", EVENTS: ")+a)}return d};ai_adb_detection_type=function(a){return""};
11
  var ai_adb_detected=function(a){setTimeout(function(){ai_adb_detected_actions(a)},2)},ai_disable_processing=function(a){jQuery(a).find(".ai-lazy").removeClass("ai-lazy");jQuery(a).find(".ai-manual").removeClass("ai-manual");jQuery(a).find(".ai-rotate").removeClass("ai-unprocessed").removeAttr("data-info");jQuery(a).find(".ai-list-data").removeClass("ai-list-data");jQuery(a).find(".ai-ip-data").removeClass("ai-ip-data");jQuery(a).find("[data-code]").removeAttr("data-code")},ai_adb_detected_actions=
12
- function(a){ai_adb_active||(ai_adb_active=!0,jQuery(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME,b64d("bWFzaw==")),function(d){d(window).ready(function(){ai_adb_process_blocks()});"undefined"!==typeof MobileDetect&&(new MobileDetect(window.navigator.userAgent)).is("bot")&&(ai_adb_action=0);if(""!=ai_adb_page_views){if(ai_adb_page_views.includes(",")){var b=ai_adb_page_views.split(","),c=parseInt(b[0]);b=parseInt(b[1])}else c=parseInt(ai_adb_page_views),b=0;var g=1,e=AiCookies.get(ai_adb_pgv_cookie_name);
13
- "undefined"!=typeof e&&(g=parseInt(e)+1);if(g<=c){AiCookies.set(ai_adb_pgv_cookie_name,g,{expires:365,path:"/"});window.ai_d1=g;window.AI_ADB_STATUS_MESSAGE=1;return}if(0!=b&&(AiCookies.set(ai_adb_pgv_cookie_name,g,{expires:365,path:"/"}),0!=(g-c-1)%b)){window.ai_d1=g;window.AI_ADB_STATUS_MESSAGE=1;return}}if(0==ai_adb_message_cookie_lifetime||1==ai_adb_action&&ai_adb_message_undismissible)AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});else{e=AiCookies.get(ai_adb_act_cookie_name);if("undefined"!=
14
  typeof e&&"AI_CONST_AI_ADB_COOKIE_VALUE"==e){window.AI_ADB_STATUS_MESSAGE=2;return}AiCookies.set(ai_adb_act_cookie_name,"AI_CONST_AI_ADB_COOKIE_VALUE",{expires:ai_adb_message_cookie_lifetime,path:"/"})}0==ai_adb_action?(ai_dummy=16,window.AI_ADB_STATUS_MESSAGE=6,ai_dummy++):(window.AI_ADB_STATUS_MESSAGE=3,ai_dummy=13);switch(ai_adb_action){case 1:ai_adb_message_undismissible?(ai_adb_overlay.find('[style*="cursor"]').css("cursor","no-drop"),ai_adb_message_window.find('[style*="cursor"]').css("cursor",
15
- "no-drop")):(ai_adb_overlay.click(function(){d(this).remove();ai_adb_message_window.remove()}),ai_adb_message_window.click(function(){d(this).remove();ai_adb_overlay.remove()}),window.onkeydown=function(f){27===f.keyCode&&(ai_adb_overlay.click(),ai_adb_message_window.click())});c=d(b64d("Ym9keQ==")).children();c.eq(Math.floor(Math.random()*c.length)).after(ai_adb_overlay);c.eq(Math.floor(Math.random()*c.length)).after(ai_adb_message_window);break;case 2:""!=ai_adb_redirection_url&&(c=!0,"http"==ai_adb_redirection_url.toLowerCase().substring(0,
16
- 4)?window.location.href==ai_adb_redirection_url&&(c=!1):window.location.pathname==ai_adb_redirection_url&&(c=!1),c?(e=AiCookies.get(ai_adb_page_redirection_cookie_name),"undefined"==typeof e&&(c=new Date,c.setTime(c.getTime()+1E4),AiCookies.set(ai_adb_page_redirection_cookie_name,window.location.href,{expires:c,path:"/"}),window.location.replace(ai_adb_redirection_url))):AiCookies.remove(ai_adb_page_redirection_cookie_name,{path:"/"}))}}(jQuery))},ai_adb_undetected=function(a){ai_adb_counter++;ai_adb_active||
17
- 4!=ai_adb_counter||(jQuery(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME,b64d("Y2xlYXI=")),ai_dummy=11,window.AI_ADB_STATUS_MESSAGE=4,ai_dummy=14,ai_adb_process_blocks())};AI_DBG_AI_DEBUG_AD_BLOCKING&&jQuery(document).ready(function(){ai_adb_detected(0)});
18
- jQuery(document).ready(function(a){a(window).ready(function(){ai_debugging_active="undefined"!==typeof ai_adb_fe_dbg;setTimeout(function(){a("#ai-adb-bar").click(function(){AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});AiCookies.remove(ai_adb_pgv_cookie_name,{path:"/"});window.AI_ADB_STATUS_MESSAGE=5;ai_dummy=15})},2);if((!ai_adb_active||ai_debugging_active)&&""!=ai_adb_selectors){var d=0,b=0,c=ai_adb_selectors.split(",");a.each(c,function(e){c[e]=c[e].trim();0!=a(c[e]).length&&a(c[e]).each(function(f){var h=
19
- a(this).outerHeight();f=a(this).find(".ai-attributes");f.length&&f.each(function(){h>=a(this).outerHeight()&&(h-=a(this).outerHeight())});d++;if(0===h&&(a(document).ready(function(){ai_adb_active&&!ai_debugging_active||ai_adb_detected(4)}),b++,!ai_debugging_active))return!1})});0!=d&&0==b&&a(document).ready(function(){ai_adb_undetected(4)})}var g=jQuery(b64d("I2FpLWFkYi1kYmxjbGs="));g.length&&(g.width()*g.height()?ai_adb_undetected(8):(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(8))})});
20
- function ai_adb_get_script(a,d){var b=document.createElement("script");b.src="ai-adb-url"+a+".js?ver="+(new Date).getTime();var c=document.getElementsByTagName("head")[0],g=!1;b.onerror=function(){d&&d();b.onerror=null;c.removeChild(b)};b.onload=b.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,d&&d(),b.onload=b.onreadystatechange=null,c.removeChild(b))};c.appendChild(b)}
21
- jQuery(window).on("load",function(){function a(){document.getElementById("AI_CONST_AI_ADB_1_NAME")?ai_adb_undetected(1):ai_adb_active&&!ai_debugging_active||ai_adb_detected(1)}function d(){"undefined"==typeof window.AI_CONST_AI_ADB_2_NAME?(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(2):ai_adb_undetected(2)}setTimeout(function(){var b=jQuery(b64d("I2FpLWFkYi1nYQ=="));b.length&&(b.width()*b.height()?ai_adb_undetected(5):(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(5));b=jQuery(b64d("I2FpLWFkYi1tbg=="));
22
- b.length&&(b.width()*b.height()?ai_adb_undetected(6):(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(6))},5);setTimeout(function(){var b="undefined"!==typeof ai_adb_fe_dbg;jQuery(b64d("I2FpLWFkYi1hZHM=")).length&&(document.getElementById("AI_CONST_AI_ADB_1_NAME")?a():ai_adb_get_script("ads",a));jQuery(b64d("I2FpLWFkYi1zcG9uc29ycw==")).length&&("undefined"==typeof window.AI_CONST_AI_ADB_2_NAME?ai_adb_get_script("sponsors",d):d());var c=b64d("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVy"),g=b64d("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVyIGltZw==");
23
- jQuery(c).length&&0<jQuery(g).length&&(0===jQuery(g).outerHeight()?(!ai_adb_active||b)&&ai_adb_detected(3):ai_adb_undetected(3),jQuery(g).remove());jQuery(b64d("I2FpLWFkYi1iYW5uZXI=")).length&&("undefined"==typeof window.ai_banner?(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(11):ai_adb_undetected(11));jQuery(b64d("I2FpLWFkYi0zMDB4MjUw")).length&&("undefined"==typeof window.ai_300x250?(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(12):ai_adb_undetected(12))},120)});
 
1
  var ai_adb_active=!1,ai_adb_counter=0,ai_adb_act_cookie_name="aiADB",ai_adb_pgv_cookie_name="aiADB_PV",ai_adb_page_redirection_cookie_name="aiADB_PR",ai_adb_overlay=AI_ADB_OVERLAY_WINDOW,ai_adb_message_window=AI_ADB_MESSAGE_WINDOW,ai_adb_message_undismissible=AI_FUNCB_GET_UNDISMISSIBLE_MESSAGE,ai_adb_message_cookie_lifetime=AI_FUNCT_GET_NO_ACTION_PERIOD,ai_adb_action=AI_FUNC_GET_ADB_ACTION,ai_adb_page_views="AI_FUNC_GET_DELAY_ACTION",ai_adb_selectors="AI_ADB_SELECTORS",ai_adb_redirection_url="AI_ADB_REDIRECTION_PAGE";
2
+ function ai_adb_process_content(){(function(a){a(".AI_ADB_CONTENT_CSS_BEGIN_CLASS").each(function(){var c=a(this).parent(),d=a(this).data("css");"undefined"==typeof d&&(d="display: none !important;");var b=a(this).data("selectors");if("undefined"==typeof b||""==b)b="p";var g=!1;a(c).find(".AI_ADB_CONTENT_CSS_BEGIN_CLASS, .AI_ADB_CONTENT_CSS_END_CLASS, "+b).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_CSS_BEGIN_CLASS"))a(this).remove(),g=!0;else if(a(this).hasClass("AI_ADB_CONTENT_CSS_END_CLASS"))a(this).remove(),
3
+ g=!1;else if(g){var e=a(this).attr("style");"undefined"==typeof e?e="":(e=e.trim(),""!=e&&";"!=e[e.length-1]&&(e+=";"));a(this).attr("style",e+" "+d)}})});a(".AI_ADB_CONTENT_DELETE_BEGIN_CLASS").each(function(){var c=a(this).parent(),d=a(this).data("selectors");if("undefined"==typeof d||""==d)d="p";var b=!1;a(c).find(".AI_ADB_CONTENT_DELETE_BEGIN_CLASS, .AI_ADB_CONTENT_DELETE_END_CLASS, "+d).each(function(){a(this).hasClass("AI_ADB_CONTENT_DELETE_BEGIN_CLASS")?(a(this).remove(),b=!0):a(this).hasClass("AI_ADB_CONTENT_DELETE_END_CLASS")?
4
+ (a(this).remove(),b=!1):b&&a(this).remove()})});a(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS").each(function(){var c=a(this).parent(),d=a(this).data("text");"undefined"==typeof d&&(d="");var b=a(this).data("css");"undefined"==typeof b&&(b="");var g=a(this).data("selectors");if("undefined"==typeof g||""==g)g="p";var e=!1;a(c).find(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS, .AI_ADB_CONTENT_REPLACE_END_CLASS, "+g).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_BEGIN_CLASS"))a(this).remove(),e=!0;else if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_END_CLASS"))a(this).remove(),
5
+ e=!1;else if(e){if(0!=d.length){var f=Math.round(a(this).text().length/(d.length+1));a(this).text(Array(f+1).join(d+" ").trim())}else a(this).text("");""!=b&&(f=a(this).attr("style"),"undefined"==typeof f?f="":(f=f.trim(),""!=f&&";"!=f[f.length-1]&&(f+=";")),""!=b&&(b=" "+b),a(this).attr("style",f+b))}})})})(jQuery)}
6
+ function ai_adb_process_blocks(a){(function(c){"undefined"==typeof a&&(a=c("body"));var d=c(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME),b="string"===typeof d?d==b64d("bWFzaw=="):null;if("string"===typeof d&&"boolean"===typeof b)if(b){do{var g=!1;c(".ai-adb-hide",a).each(function(){c(this).css({display:"none",visibility:"hidden"});c(this).removeClass("ai-adb-hide");var e=c(this).closest("div[data-ai]");if("undefined"!=typeof e.attr("data-ai")){var f=JSON.parse(b64d(e.attr("data-ai")));"undefined"!==typeof f&&
7
+ f.constructor===Array&&(f[1]="",e.attr("data-ai",b64e(JSON.stringify(f))))}ai_disable_processing(c(this))});c(".ai-adb-show",a).each(function(){c(this).css({display:"block",visibility:"visible"});c(this).removeClass("ai-adb-show");if("undefined"!=typeof c(this).data("code")){var e=b64d(c(this).data("code"));c(this).append(e);g=!0;"function"==typeof ai_process_elements&&ai_process_elements()}e=c(this).attr("data-ai-tracking");if("undefined"!=typeof e){var f=c(this).closest("div[data-ai]");if("undefined"!=
8
+ typeof f.attr("data-ai")){if(c(this).hasClass("ai-no-tracking")){var h=JSON.parse(b64d(f.attr("data-ai")));"undefined"!==typeof h&&h.constructor===Array&&(h[1]="",e=b64e(JSON.stringify(h)))}f.attr("data-ai",e)}}})}while(g);setTimeout(function(){"function"==typeof ai_process_impressions&&1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers()},15);setTimeout(ai_adb_process_content,10)}else c(".ai-adb-hide",
9
+ a).each(function(){c(this).removeClass("ai-adb-hide");if(0==c(this).outerHeight()&&0==c(this).closest(".ai-adb-show").length){var e=c(this).closest("div[data-ai]");if("undefined"!=typeof e.attr("data-ai")){var f=JSON.parse(b64d(e.attr("data-ai")));"undefined"!==typeof f&&f.constructor===Array&&(f[1]="",e.attr("data-ai",b64e(JSON.stringify(f))),e.addClass("ai-viewport-0").css("display","none"))}}}),c(".ai-adb-show",a).each(function(){ai_disable_processing(c(this));c(this).removeClass("ai-adb-show")})})(jQuery)}
10
+ ai_adb_detection_type_log=function(a){var c=ai_adb_detection_type(a),d=jQuery("#ai-adb-events");if(0!=d.count){var b=d.text();d.text((""!=b?b+", ":b+", EVENTS: ")+a)}return c};ai_adb_detection_type=function(a){return""};
11
  var ai_adb_detected=function(a){setTimeout(function(){ai_adb_detected_actions(a)},2)},ai_disable_processing=function(a){jQuery(a).find(".ai-lazy").removeClass("ai-lazy");jQuery(a).find(".ai-manual").removeClass("ai-manual");jQuery(a).find(".ai-rotate").removeClass("ai-unprocessed").removeAttr("data-info");jQuery(a).find(".ai-list-data").removeClass("ai-list-data");jQuery(a).find(".ai-ip-data").removeClass("ai-ip-data");jQuery(a).find("[data-code]").removeAttr("data-code")},ai_adb_detected_actions=
12
+ function(a){ai_adb_active||(ai_adb_active=!0,jQuery(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME,b64d("bWFzaw==")),function(c){c(window).ready(function(){ai_adb_process_blocks()});"undefined"!==typeof MobileDetect&&(new MobileDetect(window.navigator.userAgent)).is("bot")&&(ai_adb_action=0);if(""!=ai_adb_page_views){if(ai_adb_page_views.includes(",")){var d=ai_adb_page_views.split(","),b=parseInt(d[0]);d=parseInt(d[1])}else b=parseInt(ai_adb_page_views),d=0;var g=1,e=AiCookies.get(ai_adb_pgv_cookie_name);
13
+ "undefined"!=typeof e&&(g=parseInt(e)+1);if(g<=b){AiCookies.set(ai_adb_pgv_cookie_name,g,{expires:365,path:"/"});window.ai_d1=g;window.AI_ADB_STATUS_MESSAGE=1;return}if(0!=d&&(AiCookies.set(ai_adb_pgv_cookie_name,g,{expires:365,path:"/"}),0!=(g-b-1)%d)){window.ai_d1=g;window.AI_ADB_STATUS_MESSAGE=1;return}}if(0==ai_adb_message_cookie_lifetime||1==ai_adb_action&&ai_adb_message_undismissible)AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});else{e=AiCookies.get(ai_adb_act_cookie_name);if("undefined"!=
14
  typeof e&&"AI_CONST_AI_ADB_COOKIE_VALUE"==e){window.AI_ADB_STATUS_MESSAGE=2;return}AiCookies.set(ai_adb_act_cookie_name,"AI_CONST_AI_ADB_COOKIE_VALUE",{expires:ai_adb_message_cookie_lifetime,path:"/"})}0==ai_adb_action?(ai_dummy=16,window.AI_ADB_STATUS_MESSAGE=6,ai_dummy++):(window.AI_ADB_STATUS_MESSAGE=3,ai_dummy=13);switch(ai_adb_action){case 1:ai_adb_message_undismissible?(ai_adb_overlay.find('[style*="cursor"]').css("cursor","no-drop"),ai_adb_message_window.find('[style*="cursor"]').css("cursor",
15
+ "no-drop")):(ai_adb_overlay.click(function(){c(this).remove();ai_adb_message_window.remove()}),ai_adb_message_window.click(function(){c(this).remove();ai_adb_overlay.remove()}),window.onkeydown=function(f){27===f.keyCode&&(ai_adb_overlay.click(),ai_adb_message_window.click())});b=c(b64d("Ym9keQ==")).children();b.eq(Math.floor(Math.random()*b.length)).after(ai_adb_overlay);b.eq(Math.floor(Math.random()*b.length)).after(ai_adb_message_window);break;case 2:""!=ai_adb_redirection_url&&(b=!0,"http"==ai_adb_redirection_url.toLowerCase().substring(0,
16
+ 4)?window.location.href==ai_adb_redirection_url&&(b=!1):window.location.pathname==ai_adb_redirection_url&&(b=!1),b?(e=AiCookies.get(ai_adb_page_redirection_cookie_name),"undefined"==typeof e&&(b=new Date,b.setTime(b.getTime()+1E4),AiCookies.set(ai_adb_page_redirection_cookie_name,window.location.href,{expires:b,path:"/"}),window.location.replace(ai_adb_redirection_url))):AiCookies.remove(ai_adb_page_redirection_cookie_name,{path:"/"}))}}(jQuery))},ai_adb_undetected=function(a){setTimeout(function(){ai_adb_active||
17
+ ai_adb_undetected_actions(a)},200)},ai_adb_undetected_actions=function(a){ai_adb_counter++;ai_adb_active||4!=ai_adb_counter||(jQuery(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME,b64d("Y2xlYXI=")),ai_dummy=11,window.AI_ADB_STATUS_MESSAGE=4,ai_dummy=14,ai_adb_process_blocks())};AI_DBG_AI_DEBUG_AD_BLOCKING&&jQuery(document).ready(function(){ai_adb_detected(0)});
18
+ jQuery(document).ready(function(a){a(window).ready(function(){ai_debugging_active="undefined"!==typeof ai_adb_fe_dbg;setTimeout(function(){a("#ai-adb-bar").click(function(){AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});AiCookies.remove(ai_adb_pgv_cookie_name,{path:"/"});window.AI_ADB_STATUS_MESSAGE=5;ai_dummy=15})},2);if((!ai_adb_active||ai_debugging_active)&&""!=ai_adb_selectors){var c=0,d=0,b=ai_adb_selectors.split(",");a.each(b,function(g){b[g]=b[g].trim();0!=a(b[g]).length&&a(b[g]).each(function(e){var f=
19
+ a(this).outerHeight();e=a(this).find(".ai-attributes");e.length&&e.each(function(){f>=a(this).outerHeight()&&(f-=a(this).outerHeight())});c++;if(0===f&&(a(document).ready(function(){ai_adb_active&&!ai_debugging_active||ai_adb_detected(4)}),d++,!ai_debugging_active))return!1})});0!=c&&0==d&&a(document).ready(function(){ai_adb_undetected(4)})}})});
20
+ function ai_adb_get_script(a,c){var d=document.createElement("script");d.src="ai-adb-url"+a+".js?ver="+(new Date).getTime();var b=document.getElementsByTagName("head")[0],g=!1;d.onerror=function(){c&&c();d.onerror=null;b.removeChild(d)};d.onload=d.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,c&&c(),d.onload=d.onreadystatechange=null,b.removeChild(d))};b.appendChild(d)}
21
+ jQuery(window).on("load",function(){function a(){document.getElementById("AI_CONST_AI_ADB_1_NAME")?ai_adb_undetected(1):ai_adb_active&&!ai_debugging_active||ai_adb_detected(1)}function c(){"undefined"==typeof window.AI_CONST_AI_ADB_2_NAME?(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(2):ai_adb_undetected(2)}function d(){var b=jQuery(b64d("I2FpLWFkYi1nYQ=="));b.length&&(b.width()*b.height()?ai_adb_undetected(5):(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(5));b=jQuery(b64d("I2FpLWFkYi1tbg=="));
22
+ b.length&&(b.width()*b.height()?ai_adb_undetected(6):(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(6));b=jQuery(b64d("I2FpLWFkYi1kYmxjbGs="));b.length&&(b.width()*b.height()?ai_adb_undetected(8):(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(8))}setTimeout(function(){d();setTimeout(function(){ai_adb_active||setTimeout(function(){d()},400)},5)},1050);setTimeout(function(){var b="undefined"!==typeof ai_adb_fe_dbg;jQuery(b64d("I2FpLWFkYi1hZHM=")).length&&(document.getElementById("AI_CONST_AI_ADB_1_NAME")?
23
+ a():ai_adb_get_script("ads",a));jQuery(b64d("I2FpLWFkYi1zcG9uc29ycw==")).length&&("undefined"==typeof window.AI_CONST_AI_ADB_2_NAME?ai_adb_get_script("sponsors",c):c());var g=b64d("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVy"),e=b64d("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVyIGltZw==");jQuery(g).length&&0<jQuery(e).length&&(0===jQuery(e).outerHeight()?(!ai_adb_active||b)&&ai_adb_detected(3):ai_adb_undetected(3),jQuery(e).remove());jQuery(b64d("I2FpLWFkYi1iYW5uZXI=")).length&&("undefined"==typeof window.ai_banner?(!ai_adb_active||
24
+ ai_debugging_active)&&ai_adb_detected(11):ai_adb_undetected(11));jQuery(b64d("I2FpLWFkYi0zMDB4MjUw")).length&&("undefined"==typeof window.ai_300x250?(!ai_adb_active||ai_debugging_active)&&ai_adb_detected(12):ai_adb_undetected(12))},1150)});
includes/js/ai-cookie.js CHANGED
@@ -49,7 +49,8 @@
49
  }
50
 
51
  attributes = extend({
52
- path: '/'
 
53
  }, api.defaults, attributes);
54
 
55
  if (typeof attributes.expires === 'number') {
49
  }
50
 
51
  attributes = extend({
52
+ path: '/',
53
+ sameSite: 'Lax'
54
  }, api.defaults, attributes);
55
 
56
  if (typeof attributes.expires === 'number') {
includes/js/ai-cookie.min.js CHANGED
@@ -1,6 +1,6 @@
1
- (function(a){if("function"===typeof define&&define.amd){define(a);var c=!0}"object"===typeof exports&&(module.exports=a(),c=!0);if(!c){var e=window.Cookies,b=window.Cookies=a();b.noConflict=function(){window.Cookies=e;return b}}})(function(){function a(){for(var e=0,b={};e<arguments.length;e++){var f=arguments[e],d;for(d in f)b[d]=f[d]}return b}function c(e){function b(){}function f(h,k,g){if("undefined"!==typeof document){g=a({path:"/"},b.defaults,g);"number"===typeof g.expires&&(g.expires=new Date(1*
2
- new Date+864E5*g.expires));g.expires=g.expires?g.expires.toUTCString():"";try{var l=JSON.stringify(k);/^[\{\[]/.test(l)&&(k=l)}catch(p){}k=e.write?e.write(k,h):encodeURIComponent(String(k)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);h=encodeURIComponent(String(h)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);l="";for(var n in g)g[n]&&(l+="; "+n,!0!==g[n]&&(l+="="+g[n].split(";")[0]));return document.cookie=h+"="+k+l}}
3
- function d(h,k){if("undefined"!==typeof document){for(var g={},l=document.cookie?document.cookie.split("; "):[],n=0;n<l.length;n++){var p=l[n].split("="),m=p.slice(1).join("=");k||'"'!==m.charAt(0)||(m=m.slice(1,-1));try{var q=p[0].replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent);m=(e.read||e)(m,q)||m.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent);if(k)try{m=JSON.parse(m)}catch(r){}g[q]=m;if(h===q)break}catch(r){}}return h?g[h]:g}}b.set=f;b.get=function(h){return d(h,!1)};b.getJSON=function(h){return d(h,
4
  !0)};b.remove=function(h,k){f(h,"",a(k,{expires:-1}))};b.defaults={};b.withConverter=c;return b}return c(function(){})});AiCookies=Cookies.noConflict();
5
  ai_check_block=function(a){if(null==a)return!0;var c=AiCookies.getJSON("aiBLOCKS");ai_debug_cookie_status="";null==c&&(c={});"undefined"!==typeof ai_delay_showing_pageviews&&(c.hasOwnProperty(a)||(c[a]={}),c[a].hasOwnProperty("d")||(c[a].d=ai_delay_showing_pageviews));if(c.hasOwnProperty(a)){for(var e in c[a]){if("x"==e){var b="",f=document.querySelectorAll('span[data-ai-block="'+a+'"]')[0];"aiHash"in f.dataset&&(b=f.dataset.aiHash);f="";c[a].hasOwnProperty("h")&&(f=c[a].h);var d=new Date;d=c[a][e]-
6
  Math.round(d.getTime()/1E3);if(0<d&&f==b)return ai_debug_cookie_status=a="closed for "+d+" s = "+Math.round(1E4*d/3600/24)/1E4+" days",!1;ai_set_cookie(a,"x","");c[a].hasOwnProperty("i")||c[a].hasOwnProperty("c")||ai_set_cookie(a,"h","")}else if("d"==e){if(0!=c[a][e])return ai_debug_cookie_status=a="delayed for "+c[a][e]+" pageviews",!1}else if("i"==e){b="";f=document.querySelectorAll('span[data-ai-block="'+a+'"]')[0];"aiHash"in f.dataset&&(b=f.dataset.aiHash);f="";c[a].hasOwnProperty("h")&&(f=c[a].h);
1
+ (function(a){if("function"===typeof define&&define.amd){define(a);var c=!0}"object"===typeof exports&&(module.exports=a(),c=!0);if(!c){var e=window.Cookies,b=window.Cookies=a();b.noConflict=function(){window.Cookies=e;return b}}})(function(){function a(){for(var e=0,b={};e<arguments.length;e++){var f=arguments[e],d;for(d in f)b[d]=f[d]}return b}function c(e){function b(){}function f(h,k,g){if("undefined"!==typeof document){g=a({path:"/",sameSite:"Lax"},b.defaults,g);"number"===typeof g.expires&&(g.expires=
2
+ new Date(1*new Date+864E5*g.expires));g.expires=g.expires?g.expires.toUTCString():"";try{var l=JSON.stringify(k);/^[\{\[]/.test(l)&&(k=l)}catch(p){}k=e.write?e.write(k,h):encodeURIComponent(String(k)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);h=encodeURIComponent(String(h)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);l="";for(var n in g)g[n]&&(l+="; "+n,!0!==g[n]&&(l+="="+g[n].split(";")[0]));return document.cookie=
3
+ h+"="+k+l}}function d(h,k){if("undefined"!==typeof document){for(var g={},l=document.cookie?document.cookie.split("; "):[],n=0;n<l.length;n++){var p=l[n].split("="),m=p.slice(1).join("=");k||'"'!==m.charAt(0)||(m=m.slice(1,-1));try{var q=p[0].replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent);m=(e.read||e)(m,q)||m.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent);if(k)try{m=JSON.parse(m)}catch(r){}g[q]=m;if(h===q)break}catch(r){}}return h?g[h]:g}}b.set=f;b.get=function(h){return d(h,!1)};b.getJSON=function(h){return d(h,
4
  !0)};b.remove=function(h,k){f(h,"",a(k,{expires:-1}))};b.defaults={};b.withConverter=c;return b}return c(function(){})});AiCookies=Cookies.noConflict();
5
  ai_check_block=function(a){if(null==a)return!0;var c=AiCookies.getJSON("aiBLOCKS");ai_debug_cookie_status="";null==c&&(c={});"undefined"!==typeof ai_delay_showing_pageviews&&(c.hasOwnProperty(a)||(c[a]={}),c[a].hasOwnProperty("d")||(c[a].d=ai_delay_showing_pageviews));if(c.hasOwnProperty(a)){for(var e in c[a]){if("x"==e){var b="",f=document.querySelectorAll('span[data-ai-block="'+a+'"]')[0];"aiHash"in f.dataset&&(b=f.dataset.aiHash);f="";c[a].hasOwnProperty("h")&&(f=c[a].h);var d=new Date;d=c[a][e]-
6
  Math.round(d.getTime()/1E3);if(0<d&&f==b)return ai_debug_cookie_status=a="closed for "+d+" s = "+Math.round(1E4*d/3600/24)/1E4+" days",!1;ai_set_cookie(a,"x","");c[a].hasOwnProperty("i")||c[a].hasOwnProperty("c")||ai_set_cookie(a,"h","")}else if("d"==e){if(0!=c[a][e])return ai_debug_cookie_status=a="delayed for "+c[a][e]+" pageviews",!1}else if("i"==e){b="";f=document.querySelectorAll('span[data-ai-block="'+a+'"]')[0];"aiHash"in f.dataset&&(b=f.dataset.aiHash);f="";c[a].hasOwnProperty("h")&&(f=c[a].h);
includes/js/ai-lists.js CHANGED
@@ -508,13 +508,23 @@ jQuery (function ($) {
508
  var parameter_list = $(this).attr ("parameter-list");
509
 
510
  if (typeof parameter_list != "undefined") {
511
- var parameter_list_array = b64d (parameter_list).split (",");
512
  var parameter_list_type = $(this).attr ("parameter-list-type");
513
 
514
  if (ai_debug) console.log ('');
515
  if (ai_debug) console.log ("AI LISTS cookies: ", cookies);
516
- if (ai_debug) console.log ("AI LISTS parameter list:", b64d (parameter_list), parameter_list_type);
517
 
 
 
 
 
 
 
 
 
 
 
518
 
519
  var cookie_array = new Array ();
520
  cookies.forEach (function (cookie) {
@@ -926,20 +936,32 @@ jQuery (function ($) {
926
  }
927
 
928
  function get_cookie (name) {
929
- return document.cookie.split (';').some (c => {
930
- return c.trim().startsWith (name + '=');
931
- });
932
- }
933
-
934
- function delete_cookie (name, path, domain) {
935
- if (get_cookie (name)) {
936
- document.cookie = name + "=" +
937
- ((path) ? ";path=" + path : "") +
938
- ((domain) ? ";domain=" + domain : "") +
939
- ";expires=Thu, 01 Jan 1970 00:00:01 GMT";
940
- }
941
  }
942
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
943
  $(document).ready(function($) {
944
  var ai_debug = typeof ai_debugging !== 'undefined'; // 6
945
  // var ai_debug = false;
@@ -974,26 +996,36 @@ jQuery (function ($) {
974
 
975
  jQuery("#ai-iab-tcf-bar").click (function () {
976
 
977
- document.cookie = 'euconsent-v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
978
 
979
  // Clickio GDPR Cookie Consent
980
- document.cookie = '__lxG__consent__v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
981
- document.cookie = '__lxG__consent__v2_daisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
982
- document.cookie = '__lxG__consent__v2_gdaisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
983
-
 
 
 
 
 
 
984
  // Complianz GDPR/CCPA
985
- document.cookie = 'complianz_consent_status=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
986
- document.cookie = 'cmplz_marketing=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
987
- document.cookie = 'cmplz_stats=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
 
 
 
 
988
 
989
  // GDPR Cookie Compliance (CCPA ready)
990
- document.cookie = 'moove_gdpr_popup=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
991
 
992
  // Real Cookie Banner PRO
993
- document.cookie = 'real_cookie_banner-blog:1-tcf; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
994
- document.cookie = 'real_cookie_banner-blog:1; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
995
 
996
- if (ai_debug) console.log ("AI LISTS clear consent cookies", window.location.hostname);
997
 
998
  jQuery('#ai-iab-tcf-status').text ('CONSENT COOKIES DELETED');
999
  });
508
  var parameter_list = $(this).attr ("parameter-list");
509
 
510
  if (typeof parameter_list != "undefined") {
511
+ var parameter_list = b64d (parameter_list);
512
  var parameter_list_type = $(this).attr ("parameter-list-type");
513
 
514
  if (ai_debug) console.log ('');
515
  if (ai_debug) console.log ("AI LISTS cookies: ", cookies);
516
+ if (ai_debug) console.log ("AI LISTS parameter list:", parameter_list, parameter_list_type);
517
 
518
+ parameter_list = parameter_list.replace ('tcf-gdpr', 'tcf-v2[gdprApplies]=true');
519
+ parameter_list = parameter_list.replace ('tcf-no-gdpr', 'tcf-v2[gdprApplies]=false');
520
+ parameter_list = parameter_list.replace ('tcf-google', 'tcf-v2[vendor][consents][755]=true && tcf-v2[purpose][consents][1]=true');
521
+ parameter_list = parameter_list.replace ('tcf-media.net', 'tcf-v2[vendor][consents][142]=true && tcf-v2[purpose][consents][1]=true');
522
+ parameter_list = parameter_list.replace ('tcf-amazon', 'tcf-v2[vendor][consents][793]=true && tcf-v2[purpose][consents][1]=true');
523
+ parameter_list = parameter_list.replace ('tcf-ezoic', 'tcf-v2[vendor][consents][347]=true && tcf-v2[purpose][consents][1]=true');
524
+
525
+ if (ai_debug) console.log ("AI LISTS parameter list:", parameter_list, parameter_list_type);
526
+
527
+ var parameter_list_array = parameter_list.split (",");
528
 
529
  var cookie_array = new Array ();
530
  cookies.forEach (function (cookie) {
936
  }
937
 
938
  function get_cookie (name) {
939
+ // Does not work in older browsers (iOS)
940
+ // return document.cookie.split (';').some (c => {
941
+ // return c.trim().startsWith (name + '=');
942
+ // });
943
+
944
+ const value = `; ${document.cookie}`;
945
+ const parts = value.split(`; ${name}=`);
946
+ if (parts.length === 2) return parts.pop().split(';').shift();
 
 
 
 
947
  }
948
 
949
+ function delete_cookie (name, path, domain) {
950
+ if (get_cookie (name)) {
951
+ document.cookie = name + "=" +
952
+ ((path) ? ";path=" + path : "") +
953
+ ((domain) ? ";domain=" + domain : "") +
954
+ ";expires=Thu, 01 Jan 1970 00:00:01 GMT";
955
+ }
956
+ }
957
+
958
+ function ai_delete_cookie (name) {
959
+ if (get_cookie (name)) {
960
+ delete_cookie (name, '/', window.location.hostname);
961
+ document.cookie = name + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
962
+ }
963
+ }
964
+
965
  $(document).ready(function($) {
966
  var ai_debug = typeof ai_debugging !== 'undefined'; // 6
967
  // var ai_debug = false;
996
 
997
  jQuery("#ai-iab-tcf-bar").click (function () {
998
 
999
+ ai_delete_cookie ('euconsent-v2');
1000
 
1001
  // Clickio GDPR Cookie Consent
1002
+ ai_delete_cookie ('__lxG__consent__v2');
1003
+ ai_delete_cookie ('__lxG__consent__v2_daisybit');
1004
+ ai_delete_cookie ('__lxG__consent__v2_gdaisybit');
1005
+
1006
+ // Cookie Law Info
1007
+ ai_delete_cookie ('CookieLawInfoConsent');
1008
+ ai_delete_cookie ('cookielawinfo-checkbox-advertisement');
1009
+ ai_delete_cookie ('cookielawinfo-checkbox-analytics');
1010
+ ai_delete_cookie ('cookielawinfo-checkbox-necessary');
1011
+
1012
  // Complianz GDPR/CCPA
1013
+ ai_delete_cookie ('complianz_policy_id');
1014
+ ai_delete_cookie ('complianz_consent_status');
1015
+ ai_delete_cookie ('cmplz_marketing');
1016
+ ai_delete_cookie ('cmplz_consent_status');
1017
+ ai_delete_cookie ('cmplz_preferences');
1018
+ ai_delete_cookie ('cmplz_statistics-anonymous');
1019
+ ai_delete_cookie ('cmplz_choice');
1020
 
1021
  // GDPR Cookie Compliance (CCPA ready)
1022
+ ai_delete_cookie ('moove_gdpr_popup');
1023
 
1024
  // Real Cookie Banner PRO
1025
+ ai_delete_cookie ('real_cookie_banner-blog:1-tcf');
1026
+ ai_delete_cookie ('real_cookie_banner-blog:1');
1027
 
1028
+ if (ai_debug) console.log ("AI LISTS clear consent cookies", window.location.hostname);
1029
 
1030
  jQuery('#ai-iab-tcf-status').text ('CONSENT COOKIES DELETED');
1031
  });
includes/js/ai-lists.min.js CHANGED
@@ -1,24 +1,25 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,l){a.raw=l;return a};$jscomp.arrayIteratorImpl=function(a){var l=0;return function(){return l<a.length?{done:!1,value:a[l++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var l="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return l?l.call(a):$jscomp.arrayIterator(a)};
2
- jQuery(function(a){function l(e){e=e.match(t);return null!=e&&1<e.length&&"string"===typeof e[1]&&0<e[1].length?e[1].toLowerCase():null}function A(e){return e.includes(":")?(e=e.split(":"),1E3*(3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2]))):null}function q(e){try{var k=Date.parse(e);isNaN(k)&&(k=null)}catch(E){k=null}if(null==k&&e.includes(" ")){e=e.split(" ");try{k=Date.parse(e[0]),k+=A(e[1]),isNaN(k)&&(k=null)}catch(E){k=null}}return k}function F(){(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,k){k&&"useractioncomplete"===e.eventStatus&&(ai_tcData=e,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 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 t=
4
- /:\/\/(.[^/:]+)/i;ai_process_lists=function(e){function k(d,c,h){if(0==d.length){if("!@!"==h)return!0;c!=h&&("true"==h.toLowerCase()?h=!0:"false"==h.toLowerCase()&&(h=!1));return c==h}if("object"!=typeof c&&"array"!=typeof c)return!1;var f=d[0];d=d.slice(1);if("*"==f)for(c=$jscomp.makeIterator(Object.entries(c)),f=c.next();!f.done;f=c.next()){if(f=$jscomp.makeIterator(f.value),f.next(),f=f.next().value,k(d,f,h))return!0}else if(f in c)return k(d,c[f],h);return!1}function E(d,c,h){if("object"!=typeof d||
5
- -1==c.indexOf("["))return!1;c=c.replace(/]| /gi,"").split("[");return k(c,d,h)}function aa(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("IAB TCF 2.0 DETECTED"),__tcfapi("getTCData",2,function(d,c){c?(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("IAB TCF 2.0 DATA LOADED"):jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),
6
- setTimeout(function(){ai_process_lists()},10)):"cmpuishown"==d.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("IAB TCF 2.0 CMP UI SHOWN"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("IAB TCF 2.0 __tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function J(d){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&F(),"undefined"==typeof ai_tcData_requested&&
7
- (ai_tcData_requested=!0,aa(),url_parameters_need_tcData=!0)):d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("IAB TCF 2.0 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 I=document.cookie.split(";");I.forEach(function(d,c){I[c]=d.trim()});var U=getAllUrlParams(window.location.search);if(null!=U.referrer)var u=U.referrer;else u=
8
- document.referrer,""!=u&&(u=l(u));var Q=window.navigator.userAgent,R=Q.toLowerCase(),V=navigator.language,K=V.toLowerCase();if("undefined"!==typeof MobileDetect)var W=new MobileDetect(Q);e.each(function(){var d=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),c=!0,h=a(this).attr("referer-list");if("undefined"!=typeof h){h=b64d(h).split(",");var f=a(this).attr("referer-list-type"),B=!1;a.each(h,function(z,g){if(""==g)return!0;if("*"==g.charAt(0))if("*"==g.charAt(g.length-1)){if(g=g.substr(1,g.length-
9
- 2),-1!=u.indexOf(g))return B=!0,!1}else{if(g=g.substr(1),u.substr(-g.length)==g)return B=!0,!1}else if("*"==g.charAt(g.length-1)){if(g=g.substr(0,g.length-1),0==u.indexOf(g))return B=!0,!1}else if("#"==g){if(""==u)return B=!0,!1}else if(g==u)return B=!0,!1});switch(f){case "B":B&&(c=!1);break;case "W":B||(c=!1)}}if(c&&(h=a(this).attr("client-list"),"undefined"!=typeof h&&"undefined"!==typeof W))switch(h=b64d(h).split(","),f=a(this).attr("client-list-type"),p=!1,a.each(h,function(z,g){if(""==g.trim())return!0;
10
- var L=g.split("&&");a.each(L,function(ba,b){var v=!0,n=!1;b=b.trim();"!!"==b.substring(0,2)&&(v=!1,b=b.substring(2));"language:"==b.substring(0,9)&&(n=!0,b=b.substring(9).toLowerCase());var m=!1;n?"*"==b.charAt(0)?"*"==b.charAt(b.length-1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=K.indexOf(b)&&(m=!0)):(b=b.substr(1).toLowerCase(),K.substr(-b.length)==b&&(m=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==K.indexOf(b)&&(m=!0)):b==K&&(m=!0):"*"==b.charAt(0)?"*"==b.charAt(b.length-
11
- 1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=R.indexOf(b)&&(m=!0)):(b=b.substr(1).toLowerCase(),R.substr(-b.length)==b&&(m=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==R.indexOf(b)&&(m=!0)):W.is(b)&&(m=!0);p=m?v:!v;if(!p)return!1});if(p)return!1}),f){case "B":p&&(c=!1);break;case "W":p||(c=!1)}var M=h=!1;if(c&&(f=a(this).attr("parameter-list"),"undefined"!=typeof f)){f=b64d(f).split(",");var x=a(this).attr("parameter-list-type"),X=[];I.forEach(function(z){z=z.split("=");
12
- try{var g=JSON.parse(decodeURIComponent(z[1]))}catch(L){g=decodeURIComponent(z[1])}X[z[0]]=g});var p=!1,N=a(this);a.each(f,function(z,g){var L=g.split("&&");a.each(L,function(ba,b){var v=!0;b=b.trim();"!!"==b.substring(0,2)&&(v=!1,b=b.substring(2));var n=b,m="!@!",Y=-1!=b.indexOf("["),Z=(0==b.indexOf("tcf-v2")||0==b.indexOf("euconsent-v2"))&&-1!=b.indexOf("[");-1!=b.indexOf("=")&&(m=b.split("="),n=m[0],m=m[1],Y=-1!=n.indexOf("["),Z=(0==n.indexOf("tcf-v2")||0==n.indexOf("euconsent-v2"))&&-1!=n.indexOf("["));
13
- if(Z)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?(a("#ai-iab-tcf-bar").addClass("status-ok"),n=n.replace(/]| /gi,"").split("["),n.shift(),(p=(n=k(n,ai_tcData,m))?v:!v)&&(M=!1)):(N.addClass("ai-list-data"),M=!0,"function"==typeof __tcfapi?J(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){"function"==typeof __tcfapi?J(!1):setTimeout(function(){"function"==typeof __tcfapi?J(!1):setTimeout(function(){J(!0)},3E3)},1E3)},600)));else if(Y)p=(n=E(X,n,m))?
14
- v:!v;else{var S=!1;"!@!"==m?I.every(function(ca){return ca.split("=")[0]==b?(S=!0,!1):!0}):S=-1!=I.indexOf(b);p=S?v:!v}if(!p)return!1});if(p)return!1});switch(x){case "B":p&&(c=!1);break;case "W":p||(c=!1)}a(this).hasClass("ai-list-manual")&&(c?(N.removeClass("ai-list-data"),N.removeClass("ai-list-manual")):(h=!0,N.addClass("ai-list-data")));if(!h&&!M&&(f=a(this).data("debug-info"),"undefined"!=typeof f&&(f=a("."+f),0!=f.length))){var r=f.parent();r.hasClass("ai-debug-info")&&r.remove()}}r=a(this).prevAll(".ai-debug-bar.ai-debug-lists");
15
- f=""==u?"#":u;r.find(".ai-debug-name.ai-list-info").text(f).attr("title",Q+"\n"+V);r.find(".ai-debug-name.ai-list-status").text(c?ai_front.visible:ai_front.hidden);f=!1;if(c){var C=a(this).attr("scheduling-start");x=a(this).attr("scheduling-end");var G=a(this).attr("scheduling-days");if("undefined"!=typeof C&&"undefined"!=typeof x&&"undefined"!=typeof G){f=!0;var w=b64d(C),O=b64d(x),T=parseInt(a(this).attr("scheduling-fallback")),P=parseInt(a(this).attr("gmt"));w.includes("-")||O.includes("-")?(x=
16
- q(w)+P,C=q(O)+P):(x=A(w),C=A(O));G=b64d(G).split(",");r=a(this).attr("scheduling-type");var y=(new Date).getTime()+P,D=new Date(y),H=D.getDay();w.includes("-")||O.includes("-")||(w=(new Date(D.getFullYear(),D.getMonth(),D.getDate())).getTime()+P,y-=w,0>y&&(y+=864E5));0==H?H=6:H--;w=y>=x&&y<C&&G.includes(H.toString());switch(r){case "B":w=!w}w||(c=!1);D=D.toISOString().split(".")[0].replace("T"," ");r=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");r.find(".ai-debug-name.ai-scheduling-info").text(D+
17
- " "+H+" current_time:"+Math.floor(y.toString()/1E3)+" start_date:"+Math.floor(x/1E3).toString()+" ="+(y>=x).toString()+" end_date:"+Math.floor(C/1E3).toString()+" =:"+(y<C).toString()+" days:"+G.toString()+" =:"+G.includes(H.toString()).toString());r.find(".ai-debug-name.ai-scheduling-status").text(c?ai_front.visible:ai_front.hidden);c||0==T||(r.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),r.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+T))}}if(h||M)return!0;
18
- a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});c?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),"undefined"!=typeof a(this).data("code")&&(c=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(c),a(this).remove()):a(this).append(c),ai_process_element(this))):f&&!w&&0!=T?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=
19
- typeof a(this).data("fallback-code")?(c=b64d(a(this).data("fallback-code")),a(this).append(c),ai_process_element(this)):(a(this).hide(),d.find(".ai-debug-block").length||d.hide()),c=d.attr("data-ai"),"undefined"!==typeof c&&!1!==c&&(c=a(this).attr("fallback-tracking"),"undefined"!==typeof c&&!1!==c&&d.attr("data-ai",c))):(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"),
20
- 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(){F();if("function"==typeof ai_load_blocks){var k=function(E){"cmplzEnableScripts"!=E.type&&"all"!==E.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",k);jQuery(document).on("cmplz_event_marketing",k)}},50);jQuery(".ai-debug-page-type").dblclick(function(){jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES");
21
- jQuery("#ai-iab-tcf-bar").show()});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="__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;";
22
- 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;";document.cookie="moove_gdpr_popup=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="real_cookie_banner-blog:1-tcf; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="real_cookie_banner-blog:1; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES DELETED")})},5)})});
 
23
  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_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
24
- function getAllUrlParams(a){var l=a?a.split("?")[1]:window.location.search.slice(1);a={};if(l){l=l.split("#")[0];l=l.split("&");for(var A=0;A<l.length;A++){var q=l[A].split("="),F=void 0,t=q[0].replace(/\[\d*\]/,function(e){F=e.slice(1,-1);return""});q="undefined"===typeof q[1]?"":q[1];t=t.toLowerCase();q=q.toLowerCase();a[t]?("string"===typeof a[t]&&(a[t]=[a[t]]),"undefined"===typeof F?a[t].push(q):a[t][F]=q):a[t]=q}}return a};
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,n){a.raw=n;return a};$jscomp.arrayIteratorImpl=function(a){var n=0;return function(){return n<a.length?{done:!1,value:a[n++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var n="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return n?n.call(a):$jscomp.arrayIterator(a)};
2
+ jQuery(function(a){function n(d){d=d.match(ba);return null!=d&&1<d.length&&"string"===typeof d[1]&&0<d[1].length?d[1].toLowerCase():null}function B(d){return d.includes(":")?(d=d.split(":"),1E3*(3600*parseInt(d[0])+60*parseInt(d[1])+parseInt(d[2]))):null}function t(d){try{var l=Date.parse(d);isNaN(l)&&(l=null)}catch(F){l=null}if(null==l&&d.includes(" ")){d=d.split(" ");try{l=Date.parse(d[0]),l+=B(d[1]),isNaN(l)&&(l=null)}catch(F){l=null}}return l}function G(){(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(d,l){l&&"useractioncomplete"===d.eventStatus&&(ai_tcData=d,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}function u(d){d=("; "+document.cookie).split("; "+d+"=");if(2===d.length)return d.pop().split(";").shift()}
4
+ function m(d){if(u(d)){var l=window.location.hostname;u(d)&&(document.cookie=d+"=;path=/"+(l?";domain="+l:"")+";expires=Thu, 01 Jan 1970 00:00:01 GMT");document.cookie=d+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}}Array.prototype.includes||(Array.prototype.includes=function(d){return!!~this.indexOf(d)});var ba=/:\/\/(.[^/:]+)/i;ai_process_lists=function(d){function l(e,c,k){if(0==e.length){if("!@!"==k)return!0;c!=k&&("true"==k.toLowerCase()?k=!0:"false"==k.toLowerCase()&&(k=!1));return c==
5
+ k}if("object"!=typeof c&&"array"!=typeof c)return!1;var f=e[0];e=e.slice(1);if("*"==f)for(c=$jscomp.makeIterator(Object.entries(c)),f=c.next();!f.done;f=c.next()){if(f=$jscomp.makeIterator(f.value),f.next(),f=f.next().value,l(e,f,k))return!0}else if(f in c)return l(e,c[f],k);return!1}function F(e,c,k){if("object"!=typeof e||-1==c.indexOf("["))return!1;c=c.replace(/]| /gi,"").split("[");return l(c,e,k)}function ca(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("IAB TCF 2.0 DETECTED"),
6
+ __tcfapi("getTCData",2,function(e,c){c?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==e.eventStatus||"useractioncomplete"==e.eventStatus?(ai_tcData=e,e.gdprApplies?a("#ai-iab-tcf-status").text("IAB TCF 2.0 DATA LOADED"):jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},10)):"cmpuishown"==e.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("IAB TCF 2.0 CMP UI SHOWN"),
7
+ a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("IAB TCF 2.0 __tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function K(e){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&G(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,ca(),url_parameters_need_tcData=!0)):e&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("IAB TCF 2.0 MISSING: __tcfapi function not found"))}
8
+ d=null==d?a("div.ai-list-data, meta.ai-list-data"):d.filter(".ai-list-data");if(d.length){d.removeClass("ai-list-data");var J=document.cookie.split(";");J.forEach(function(e,c){J[c]=e.trim()});var V=getAllUrlParams(window.location.search);if(null!=V.referrer)var w=V.referrer;else w=document.referrer,""!=w&&(w=n(w));var R=window.navigator.userAgent,S=R.toLowerCase(),W=navigator.language,L=W.toLowerCase();if("undefined"!==typeof MobileDetect)var X=new MobileDetect(R);d.each(function(){var e=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),
9
+ c=!0,k=a(this).attr("referer-list");if("undefined"!=typeof k){k=b64d(k).split(",");var f=a(this).attr("referer-list-type"),C=!1;a.each(k,function(A,g){if(""==g)return!0;if("*"==g.charAt(0))if("*"==g.charAt(g.length-1)){if(g=g.substr(1,g.length-2),-1!=w.indexOf(g))return C=!0,!1}else{if(g=g.substr(1),w.substr(-g.length)==g)return C=!0,!1}else if("*"==g.charAt(g.length-1)){if(g=g.substr(0,g.length-1),0==w.indexOf(g))return C=!0,!1}else if("#"==g){if(""==w)return C=!0,!1}else if(g==w)return C=!0,!1});
10
+ switch(f){case "B":C&&(c=!1);break;case "W":C||(c=!1)}}if(c&&(k=a(this).attr("client-list"),"undefined"!=typeof k&&"undefined"!==typeof X))switch(k=b64d(k).split(","),f=a(this).attr("client-list-type"),r=!1,a.each(k,function(A,g){if(""==g.trim())return!0;var M=g.split("&&");a.each(M,function(da,b){var x=!0,q=!1;b=b.trim();"!!"==b.substring(0,2)&&(x=!1,b=b.substring(2));"language:"==b.substring(0,9)&&(q=!0,b=b.substring(9).toLowerCase());var p=!1;q?"*"==b.charAt(0)?"*"==b.charAt(b.length-1)?(b=b.substr(1,
11
+ b.length-2).toLowerCase(),-1!=L.indexOf(b)&&(p=!0)):(b=b.substr(1).toLowerCase(),L.substr(-b.length)==b&&(p=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==L.indexOf(b)&&(p=!0)):b==L&&(p=!0):"*"==b.charAt(0)?"*"==b.charAt(b.length-1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=S.indexOf(b)&&(p=!0)):(b=b.substr(1).toLowerCase(),S.substr(-b.length)==b&&(p=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==S.indexOf(b)&&(p=!0)):X.is(b)&&(p=!0);r=p?x:!x;
12
+ if(!r)return!1});if(r)return!1}),f){case "B":r&&(c=!1);break;case "W":r||(c=!1)}var N=k=!1;if(c){var h=a(this).attr("parameter-list");if("undefined"!=typeof h){h=b64d(h);f=a(this).attr("parameter-list-type");h=h.replace("tcf-gdpr","tcf-v2[gdprApplies]=true");h=h.replace("tcf-no-gdpr","tcf-v2[gdprApplies]=false");h=h.replace("tcf-google","tcf-v2[vendor][consents][755]=true && tcf-v2[purpose][consents][1]=true");h=h.replace("tcf-media.net","tcf-v2[vendor][consents][142]=true && tcf-v2[purpose][consents][1]=true");
13
+ h=h.replace("tcf-amazon","tcf-v2[vendor][consents][793]=true && tcf-v2[purpose][consents][1]=true");h=h.replace("tcf-ezoic","tcf-v2[vendor][consents][347]=true && tcf-v2[purpose][consents][1]=true");h=h.split(",");var Y=[];J.forEach(function(A){A=A.split("=");try{var g=JSON.parse(decodeURIComponent(A[1]))}catch(M){g=decodeURIComponent(A[1])}Y[A[0]]=g});var r=!1,O=a(this);a.each(h,function(A,g){var M=g.split("&&");a.each(M,function(da,b){var x=!0;b=b.trim();"!!"==b.substring(0,2)&&(x=!1,b=b.substring(2));
14
+ var q=b,p="!@!",Z=-1!=b.indexOf("["),aa=(0==b.indexOf("tcf-v2")||0==b.indexOf("euconsent-v2"))&&-1!=b.indexOf("[");-1!=b.indexOf("=")&&(p=b.split("="),q=p[0],p=p[1],Z=-1!=q.indexOf("["),aa=(0==q.indexOf("tcf-v2")||0==q.indexOf("euconsent-v2"))&&-1!=q.indexOf("["));if(aa)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?(a("#ai-iab-tcf-bar").addClass("status-ok"),q=q.replace(/]| /gi,"").split("["),q.shift(),(r=(q=l(q,ai_tcData,p))?x:!x)&&(N=!1)):(O.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?
15
+ K(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){"function"==typeof __tcfapi?K(!1):setTimeout(function(){"function"==typeof __tcfapi?K(!1):setTimeout(function(){K(!0)},3E3)},1E3)},600)));else if(Z)r=(q=F(Y,q,p))?x:!x;else{var T=!1;"!@!"==p?J.every(function(ea){return ea.split("=")[0]==b?(T=!0,!1):!0}):T=-1!=J.indexOf(b);r=T?x:!x}if(!r)return!1});if(r)return!1});switch(f){case "B":r&&(c=!1);break;case "W":r||(c=!1)}a(this).hasClass("ai-list-manual")&&(c?(O.removeClass("ai-list-data"),
16
+ O.removeClass("ai-list-manual")):(k=!0,O.addClass("ai-list-data")));if(!k&&!N&&(f=a(this).data("debug-info"),"undefined"!=typeof f&&(f=a("."+f),0!=f.length))){var v=f.parent();v.hasClass("ai-debug-info")&&v.remove()}}}v=a(this).prevAll(".ai-debug-bar.ai-debug-lists");f=""==w?"#":w;v.find(".ai-debug-name.ai-list-info").text(f).attr("title",R+"\n"+W);v.find(".ai-debug-name.ai-list-status").text(c?ai_front.visible:ai_front.hidden);f=!1;if(c){var D=a(this).attr("scheduling-start");h=a(this).attr("scheduling-end");
17
+ var H=a(this).attr("scheduling-days");if("undefined"!=typeof D&&"undefined"!=typeof h&&"undefined"!=typeof H){f=!0;var y=b64d(D),P=b64d(h),U=parseInt(a(this).attr("scheduling-fallback")),Q=parseInt(a(this).attr("gmt"));y.includes("-")||P.includes("-")?(h=t(y)+Q,D=t(P)+Q):(h=B(y),D=B(P));H=b64d(H).split(",");v=a(this).attr("scheduling-type");var z=(new Date).getTime()+Q,E=new Date(z),I=E.getDay();y.includes("-")||P.includes("-")||(y=(new Date(E.getFullYear(),E.getMonth(),E.getDate())).getTime()+Q,
18
+ z-=y,0>z&&(z+=864E5));0==I?I=6:I--;y=z>=h&&z<D&&H.includes(I.toString());switch(v){case "B":y=!y}y||(c=!1);E=E.toISOString().split(".")[0].replace("T"," ");v=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");v.find(".ai-debug-name.ai-scheduling-info").text(E+" "+I+" current_time:"+Math.floor(z.toString()/1E3)+" start_date:"+Math.floor(h/1E3).toString()+" ="+(z>=h).toString()+" end_date:"+Math.floor(D/1E3).toString()+" =:"+(z<D).toString()+" days:"+H.toString()+" =:"+H.includes(I.toString()).toString());
19
+ v.find(".ai-debug-name.ai-scheduling-status").text(c?ai_front.visible:ai_front.hidden);c||0==U||(v.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),v.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+U))}}if(k||N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});c?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),"undefined"!=typeof a(this).data("code")&&(c=b64d(a(this).data("code")),0!=a(this).closest("head").length?
20
+ (a(this).after(c),a(this).remove()):a(this).append(c),ai_process_element(this))):f&&!y&&0!=U?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(c=b64d(a(this).data("fallback-code")),a(this).append(c),ai_process_element(this)):(a(this).hide(),e.find(".ai-debug-block").length||e.hide()),c=e.attr("data-ai"),"undefined"!==typeof c&&!1!==c&&(c=a(this).attr("fallback-tracking"),
21
+ "undefined"!==typeof c&&!1!==c&&e.attr("data-ai",c))):(a(this).hide(),e.find(".ai-debug-block").length||e.hide(),e.removeAttr("data-ai").removeClass("ai-track"),e.find(".ai-debug-block").length?(e.css({visibility:""}).removeClass("ai-close"),e.hasClass("ai-remove-position")&&e.css({position:""})):e.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");e.removeClass("ai-list-block")})}};a(document).ready(function(d){setTimeout(function(){ai_process_lists();setTimeout(function(){G();
22
+ if("function"==typeof ai_load_blocks){var l=function(F){"cmplzEnableScripts"!=F.type&&"all"!==F.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",l);jQuery(document).on("cmplz_event_marketing",l)}},50);jQuery(".ai-debug-page-type").dblclick(function(){jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES");jQuery("#ai-iab-tcf-bar").show()});jQuery("#ai-iab-tcf-bar").click(function(){m("euconsent-v2");m("__lxG__consent__v2");m("__lxG__consent__v2_daisybit");m("__lxG__consent__v2_gdaisybit");
23
+ m("CookieLawInfoConsent");m("cookielawinfo-checkbox-advertisement");m("cookielawinfo-checkbox-analytics");m("cookielawinfo-checkbox-necessary");m("complianz_policy_id");m("complianz_consent_status");m("cmplz_marketing");m("cmplz_consent_status");m("cmplz_preferences");m("cmplz_statistics-anonymous");m("cmplz_choice");m("moove_gdpr_popup");m("real_cookie_banner-blog:1-tcf");m("real_cookie_banner-blog:1");jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES DELETED")})},5)})});
24
  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_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
25
+ function getAllUrlParams(a){var n=a?a.split("?")[1]:window.location.search.slice(1);a={};if(n){n=n.split("#")[0];n=n.split("&");for(var B=0;B<n.length;B++){var t=n[B].split("="),G=void 0,u=t[0].replace(/\[\d*\]/,function(m){G=m.slice(1,-1);return""});t="undefined"===typeof t[1]?"":t[1];u=u.toLowerCase();t=t.toLowerCase();a[u]?("string"===typeof a[u]&&(a[u]=[a[u]]),"undefined"===typeof G?a[u].push(t):a[u][G]=t):a[u]=t}}return a};
includes/js/ai-rotation.js CHANGED
@@ -13,6 +13,7 @@ jQuery (function ($) {
13
 
14
  if (ai_debug) console.log ('');
15
 
 
16
  if (typeof $(rotation_block).data ('info') != 'undefined') {
17
  var block_info = JSON.parse (atob ($(rotation_block).data ('info')));
18
  var rotation_id = block_info [0];
@@ -20,6 +21,7 @@ jQuery (function ($) {
20
 
21
  if (ai_rotation_triggers.includes (rotaion_selector)) {
22
  ai_rotation_triggers.splice (ai_rotation_triggers.indexOf (rotaion_selector), 1);
 
23
 
24
  if (ai_debug) console.log ('AI TIMED ROTATION TRIGGERS', ai_rotation_triggers);
25
  }
@@ -30,12 +32,14 @@ jQuery (function ($) {
30
  for (var index = 0; index < rotation_block.length; index ++) {
31
  if (ai_debug) console.log ('AI ROTATE process rotation block index:', index);
32
 
 
 
33
  if (index == 0) ai_process_single_rotation (rotation_block [index], true); else ai_process_single_rotation (rotation_block [index], false);
34
  }
35
  } else {
36
  if (ai_debug) console.log ('AI ROTATE process rotation: 1 rotation block');
37
 
38
- ai_process_single_rotation (rotation_block, true);
39
  }
40
  }
41
 
@@ -48,7 +52,7 @@ jQuery (function ($) {
48
  if (rotate_options.length == 0) return;
49
 
50
  if (ai_debug) {
51
- console.log ('AI ROTATE process single rotation');
52
  console.log ('AI ROTATE', 'block', $(rotation_block).attr ('class') + ',', rotate_options.length, 'options');
53
  }
54
 
13
 
14
  if (ai_debug) console.log ('');
15
 
16
+ var ai_rotation_triggers_found = false;
17
  if (typeof $(rotation_block).data ('info') != 'undefined') {
18
  var block_info = JSON.parse (atob ($(rotation_block).data ('info')));
19
  var rotation_id = block_info [0];
21
 
22
  if (ai_rotation_triggers.includes (rotaion_selector)) {
23
  ai_rotation_triggers.splice (ai_rotation_triggers.indexOf (rotaion_selector), 1);
24
+ ai_rotation_triggers_found = true;
25
 
26
  if (ai_debug) console.log ('AI TIMED ROTATION TRIGGERS', ai_rotation_triggers);
27
  }
32
  for (var index = 0; index < rotation_block.length; index ++) {
33
  if (ai_debug) console.log ('AI ROTATE process rotation block index:', index);
34
 
35
+ if (ai_debug) console.log ('AI ROTATE process rotation block:', rotation_block [index]);
36
+
37
  if (index == 0) ai_process_single_rotation (rotation_block [index], true); else ai_process_single_rotation (rotation_block [index], false);
38
  }
39
  } else {
40
  if (ai_debug) console.log ('AI ROTATE process rotation: 1 rotation block');
41
 
42
+ ai_process_single_rotation (rotation_block, !ai_rotation_triggers_found);
43
  }
44
  }
45
 
52
  if (rotate_options.length == 0) return;
53
 
54
  if (ai_debug) {
55
+ console.log ('AI ROTATE process single rotation, trigger rotation', trigger_rotation);
56
  console.log ('AI ROTATE', 'block', $(rotation_block).attr ('class') + ',', rotate_options.length, 'options');
57
  }
58
 
includes/js/ai-rotation.min.js CHANGED
@@ -1,12 +1,12 @@
1
- jQuery(function(a){function u(){a("div.ai-rotate.ai-rotation-groups").each(function(f,l){a(this).addClass("ai-timer");ai_process_rotation(this)})}var p=[];ai_process_rotation=function(f){if(a(f).hasClass("ai-unprocessed")||a(f).hasClass("ai-timer")){a(f).removeClass("ai-unprocessed").removeClass("ai-timer");if("undefined"!=typeof a(f).data("info")){var l="div.ai-rotate.ai-"+JSON.parse(atob(a(f).data("info")))[0];p.includes(l)&&p.splice(p.indexOf(l),1)}if("number"==typeof f.length)for(l=0;l<f.length;l++)0==
2
- l?ai_process_single_rotation(f[l],!0):ai_process_single_rotation(f[l],!1);else ai_process_single_rotation(f,!0)}};ai_process_single_rotation=function(f,l){var h=a(f).children(".ai-rotate-option");if(0!=h.length){h.hide();if("undefined"==typeof a(f).data("next"))if("undefined"!=typeof a(h[0]).data("group")){var g=-1,t=[];a("span[data-ai-groups]").each(function(q){(a(this)[0].offsetWidth||a(this)[0].offsetHeight||a(this)[0].getClientRects().length)&&t.push(this)});1<=t.length&&JSON.parse(b64d(a(t).first().data("ai-groups"))).forEach(function(q,
3
- w){-1==g&&h.each(function(v){if(b64d(a(this).data("group"))==q)return g=v,!1})})}else{var e=a(f).data("shares");if("string"===typeof e){e=JSON.parse(atob(e));var d=Math.round(100*Math.random());for(var b=0;b<e.length&&(g=b,0>e[b]||!(d<=e[b]));b++);}else e=a(f).hasClass("ai-unique"),d=new Date,e?("number"!=typeof ai_rotation_seed&&(ai_rotation_seed=(Math.floor(1E3*Math.random())+d.getMilliseconds())%h.length),e=a(f).data("counter"),g=ai_rotation_seed+e,g>=h.length&&(g-=h.length)):(g=Math.floor(Math.random()*
4
- h.length),d.getMilliseconds()%2&&(g=h.length-g-1))}else g=parseInt(a(f).attr("data-next")),d=a(h[g]),"undefined"!=typeof d.data("code")&&(d=a(b64d(d.data("code")))),0!=d.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&&0!=a(".ai-rotation-groups").length&&setTimeout(function(){u()},5);if(a(f).hasClass("ai-rotation-scheduling"))for(g=-1,e=0;e<h.length;e++)if(d=a(h[e]),d=d.data("scheduling"),"undefined"!=typeof d){b=b64d(d);d=!0;0==b.indexOf("^")&&(d=!1,b=b.substring(1));var m=b.split("="),
5
  c=-1!=b.indexOf("%")?m[0].split("%"):[m[0]];b=c[0].trim().toLowerCase();c="undefined"!=typeof c[1]?c[1].trim():0;m=m[1].replace(" ","");var n=(new Date).getTime();n=new Date(n);var k=0;switch(b){case "s":k=n.getSeconds();break;case "i":k=n.getMinutes();break;case "h":k=n.getHours();break;case "d":k=n.getDate();break;case "m":k=n.getMonth();break;case "y":k=n.getFullYear();break;case "w":k=n.getDay(),k=0==k?6:k-1}b=0!=c?k%c:k;c=m.split(",");m=!d;for(n=0;n<c.length;n++)if(k=c[n],-1!=k.indexOf("-")){if(k=
6
- k.split("-"),b>=k[0]&&b<=k[1]){m=d;break}}else if(b==k){m=d;break}if(m){g=e;break}}if(!(0>g||g>=h.length)){d=a(h[g]);e="";if("undefined"!=typeof d.data("time")){b=atob(d.data("time"));if(0==b&&1<h.length){c=g;do{c++;c>=h.length&&(c=0);m=a(h[c]);if("undefined"==typeof m.data("time")){g=c;d=a(h[g]);b=0;break}m=atob(m.data("time"))}while(0==m&&c!=g);0!=b&&(g=c,d=a(h[g]),b=atob(d.data("time")))}if(0<b&&(c=g+1,c>=h.length&&(c=0),"undefined"!=typeof a(f).data("info"))){e=JSON.parse(atob(a(f).data("info")))[0];
7
- a(f).attr("data-next",c);var r="div.ai-rotate.ai-"+e;p.includes(r)&&(l=!1);l&&(p.push(r),setTimeout(function(){a(r).addClass("ai-timer");ai_process_rotation(a(r))},1E3*b));e=" ("+b+" s)"}}else"undefined"==typeof d.data("group")&&h.each(function(q){q!=g&&a(this).remove()});d.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");a(f).css({position:""});"undefined"!=typeof d.data("code")&&(h.empty(),b=b64d(d.data("code")),
8
  d.append(b),ai_process_elements());d=b64d(d.data("name"));c=a(f).closest(".ai-debug-block");0!=c.length&&(b=c.find("kbd.ai-option-name"),c=c.find(".ai-debug-block"),"undefined"!=typeof c&&(c=c.find("kbd.ai-option-name"),b=b.slice(0,b.length-c.length)),"undefined"!=typeof b&&(c=b.first().data("separator"),"undefined"==typeof c&&(c=""),b.html(c+d+e)));b=!1;c=a(f).closest(".ai-adb-show");0!=c.length&&c.attr("data-ai-tracking")&&(e=JSON.parse(b64d(c.attr("data-ai-tracking"))),"undefined"!==typeof e&&
9
- e.constructor===Array&&(e[1]=g+1,e[3]=d,c.attr("data-ai-tracking",b64e(JSON.stringify(e))),c.addClass("ai-track"),b=!0));b||(b=a(f).closest("div[data-ai]"),"undefined"!=typeof b.attr("data-ai")&&(e=JSON.parse(b64d(b.attr("data-ai"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=d,b.attr("data-ai",b64e(JSON.stringify(e))),b.addClass("ai-track"))))}}};ai_process_rotations=function(){a("div.ai-rotate").each(function(f,l){ai_process_rotation(this)})};ai_process_rotations_in_element=function(f){a("div.ai-rotate",
10
- f).each(function(l,h){ai_process_rotation(this)})};a(document).ready(function(f){setTimeout(function(){ai_process_rotations()},10)})});ai_process_elements_active=!1;
11
  function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks();
12
  "function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5);ai_process_elements_active=!0};
1
+ jQuery(function(a){function u(){a("div.ai-rotate.ai-rotation-groups").each(function(f,l){a(this).addClass("ai-timer");ai_process_rotation(this)})}var p=[];ai_process_rotation=function(f){if(a(f).hasClass("ai-unprocessed")||a(f).hasClass("ai-timer")){a(f).removeClass("ai-unprocessed").removeClass("ai-timer");var l=!1;if("undefined"!=typeof a(f).data("info")){var g="div.ai-rotate.ai-"+JSON.parse(atob(a(f).data("info")))[0];p.includes(g)&&(p.splice(p.indexOf(g),1),l=!0)}if("number"==typeof f.length)for(l=
2
+ 0;l<f.length;l++)0==l?ai_process_single_rotation(f[l],!0):ai_process_single_rotation(f[l],!1);else ai_process_single_rotation(f,!l)}};ai_process_single_rotation=function(f,l){var g=a(f).children(".ai-rotate-option");if(0!=g.length){g.hide();if("undefined"==typeof a(f).data("next"))if("undefined"!=typeof a(g[0]).data("group")){var h=-1,t=[];a("span[data-ai-groups]").each(function(q){(a(this)[0].offsetWidth||a(this)[0].offsetHeight||a(this)[0].getClientRects().length)&&t.push(this)});1<=t.length&&JSON.parse(b64d(a(t).first().data("ai-groups"))).forEach(function(q,
3
+ w){-1==h&&g.each(function(v){if(b64d(a(this).data("group"))==q)return h=v,!1})})}else{var e=a(f).data("shares");if("string"===typeof e){e=JSON.parse(atob(e));var d=Math.round(100*Math.random());for(var b=0;b<e.length&&(h=b,0>e[b]||!(d<=e[b]));b++);}else e=a(f).hasClass("ai-unique"),d=new Date,e?("number"!=typeof ai_rotation_seed&&(ai_rotation_seed=(Math.floor(1E3*Math.random())+d.getMilliseconds())%g.length),e=a(f).data("counter"),h=ai_rotation_seed+e,h>=g.length&&(h-=g.length)):(h=Math.floor(Math.random()*
4
+ g.length),d.getMilliseconds()%2&&(h=g.length-h-1))}else h=parseInt(a(f).attr("data-next")),d=a(g[h]),"undefined"!=typeof d.data("code")&&(d=a(b64d(d.data("code")))),0!=d.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&&0!=a(".ai-rotation-groups").length&&setTimeout(function(){u()},5);if(a(f).hasClass("ai-rotation-scheduling"))for(h=-1,e=0;e<g.length;e++)if(d=a(g[e]),d=d.data("scheduling"),"undefined"!=typeof d){b=b64d(d);d=!0;0==b.indexOf("^")&&(d=!1,b=b.substring(1));var m=b.split("="),
5
  c=-1!=b.indexOf("%")?m[0].split("%"):[m[0]];b=c[0].trim().toLowerCase();c="undefined"!=typeof c[1]?c[1].trim():0;m=m[1].replace(" ","");var n=(new Date).getTime();n=new Date(n);var k=0;switch(b){case "s":k=n.getSeconds();break;case "i":k=n.getMinutes();break;case "h":k=n.getHours();break;case "d":k=n.getDate();break;case "m":k=n.getMonth();break;case "y":k=n.getFullYear();break;case "w":k=n.getDay(),k=0==k?6:k-1}b=0!=c?k%c:k;c=m.split(",");m=!d;for(n=0;n<c.length;n++)if(k=c[n],-1!=k.indexOf("-")){if(k=
6
+ k.split("-"),b>=k[0]&&b<=k[1]){m=d;break}}else if(b==k){m=d;break}if(m){h=e;break}}if(!(0>h||h>=g.length)){d=a(g[h]);e="";if("undefined"!=typeof d.data("time")){b=atob(d.data("time"));if(0==b&&1<g.length){c=h;do{c++;c>=g.length&&(c=0);m=a(g[c]);if("undefined"==typeof m.data("time")){h=c;d=a(g[h]);b=0;break}m=atob(m.data("time"))}while(0==m&&c!=h);0!=b&&(h=c,d=a(g[h]),b=atob(d.data("time")))}if(0<b&&(c=h+1,c>=g.length&&(c=0),"undefined"!=typeof a(f).data("info"))){e=JSON.parse(atob(a(f).data("info")))[0];
7
+ a(f).attr("data-next",c);var r="div.ai-rotate.ai-"+e;p.includes(r)&&(l=!1);l&&(p.push(r),setTimeout(function(){a(r).addClass("ai-timer");ai_process_rotation(a(r))},1E3*b));e=" ("+b+" s)"}}else"undefined"==typeof d.data("group")&&g.each(function(q){q!=h&&a(this).remove()});d.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");a(f).css({position:""});"undefined"!=typeof d.data("code")&&(g.empty(),b=b64d(d.data("code")),
8
  d.append(b),ai_process_elements());d=b64d(d.data("name"));c=a(f).closest(".ai-debug-block");0!=c.length&&(b=c.find("kbd.ai-option-name"),c=c.find(".ai-debug-block"),"undefined"!=typeof c&&(c=c.find("kbd.ai-option-name"),b=b.slice(0,b.length-c.length)),"undefined"!=typeof b&&(c=b.first().data("separator"),"undefined"==typeof c&&(c=""),b.html(c+d+e)));b=!1;c=a(f).closest(".ai-adb-show");0!=c.length&&c.attr("data-ai-tracking")&&(e=JSON.parse(b64d(c.attr("data-ai-tracking"))),"undefined"!==typeof e&&
9
+ e.constructor===Array&&(e[1]=h+1,e[3]=d,c.attr("data-ai-tracking",b64e(JSON.stringify(e))),c.addClass("ai-track"),b=!0));b||(b=a(f).closest("div[data-ai]"),"undefined"!=typeof b.attr("data-ai")&&(e=JSON.parse(b64d(b.attr("data-ai"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=h+1,e[3]=d,b.attr("data-ai",b64e(JSON.stringify(e))),b.addClass("ai-track"))))}}};ai_process_rotations=function(){a("div.ai-rotate").each(function(f,l){ai_process_rotation(this)})};ai_process_rotations_in_element=function(f){a("div.ai-rotate",
10
+ f).each(function(l,g){ai_process_rotation(this)})};a(document).ready(function(f){setTimeout(function(){ai_process_rotations()},10)})});ai_process_elements_active=!1;
11
  function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks();
12
  "function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5);ai_process_elements_active=!0};
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.7.1";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
@@ -2678,48 +2678,34 @@ jQuery(document).ready (function($) {
2678
  });
2679
 
2680
  $("#tab-" + tab + " .page-checker-button").click (function () {
2681
- // $("#page-checker-container").toggle ();
2682
  $("#page-checker-button").click ();
2683
  });
2684
 
2685
  process_display_elements (tab);
2686
 
2687
- // $("#exceptions-button-"+tab).button ({
2688
- // }).click (function () {
2689
  $("#exceptions-button-"+tab).click (function () {
2690
  var block = $(this).attr ("id").replace ("exceptions-button-","");
2691
  $("#block-exceptions-" + block).toggle ();
2692
  });
2693
 
2694
- // $("#show-css-button-"+tab).button ({
2695
- // }).show ().css ('visibility', 'visible').click (function () {
2696
  $("#show-css-button-"+tab).click (function () {
2697
  var block = $(this).attr ("id").replace ("show-css-button-","");
2698
  $("#icons-css-code-" + block).toggle ();
2699
 
2700
  if ($('#icons-css-code-'+block).is(':visible')) {
2701
- // $("#show-css-button-"+block+" span").text (ai_admin.hide);
2702
- // $("#show-css-button-"+block).addClass ('light-blue');
2703
  configure_selection_icons (block);
2704
  process_display_elements (block);
2705
  } else {
2706
- // $("#show-css-button-"+block+" span").text (ai_admin.show);
2707
- // $("#show-css-button-"+block).removeClass ('light-blue');
2708
  $("#sticky-animation-"+block).hide ();
2709
  $("#sticky-background-"+block).hide();
2710
- // $("#sticky-background-"+block).find ('.bkg-parameters').hide();
2711
  }
2712
  });
2713
 
2714
- // $("#counting-button-"+tab).button ({
2715
- // }).show ().click (function () {
2716
  $("#counting-button-"+tab).click (function () {
2717
  var block = $(this).attr ("id").replace ("counting-button-","");
2718
  $("#paragraph-counting-" + block).toggle ();
2719
  });
2720
 
2721
- // $("#clearance-button-"+tab).button ({
2722
- // }).show ().click (function () {
2723
  $("#clearance-button-"+tab).click (function () {
2724
  var block = $(this).attr ("id").replace ("clearance-button-","");
2725
  $("#paragraph-clearance-" + block).toggle ();
@@ -3006,13 +2992,6 @@ jQuery(document).ready (function($) {
3006
  $("#misc-settings-" + block).toggle ();
3007
  });
3008
 
3009
- // $("#scheduling-button-"+tab).button ({
3010
- // }).show ().click (function () {
3011
- // var block = $(this).attr ("id");
3012
- // block = block.replace ("scheduling-button-","");
3013
- // $("#scheduling-settings-" + block).toggle ();
3014
- // });
3015
-
3016
  $("#preview-button-"+tab).button ({
3017
  }).show ().click (function () {
3018
  var block = $(this).attr ("id");
@@ -4442,12 +4421,12 @@ jQuery(document).ready (function($) {
4442
 
4443
  select.multiSelect ({
4444
  selectableHeader:
4445
- '<div class="ai-list-filter-container"> \
4446
- <input type="text" class="filter-input" autocomplete="off" placeholder="' + ai_admin.filter + '" title="' + ai_admin.filter_title + '"> \
4447
- <button class="filter-button" style="margin-top: -2px; display: none;">' + ai_admin.button_filter + '</button> \
4448
- <span class="filter-message"></span> \
4449
- </div> \
4450
- <input type="text" class="search-input" autocomplete="off" placeholder="' + ai_admin.search + '">',
4451
  selectionHeader: '',
4452
  afterInit: function(ms){
4453
  var that = this,
1
+ var javascript_version = "2.7.2"
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
2678
  });
2679
 
2680
  $("#tab-" + tab + " .page-checker-button").click (function () {
 
2681
  $("#page-checker-button").click ();
2682
  });
2683
 
2684
  process_display_elements (tab);
2685
 
 
 
2686
  $("#exceptions-button-"+tab).click (function () {
2687
  var block = $(this).attr ("id").replace ("exceptions-button-","");
2688
  $("#block-exceptions-" + block).toggle ();
2689
  });
2690
 
 
 
2691
  $("#show-css-button-"+tab).click (function () {
2692
  var block = $(this).attr ("id").replace ("show-css-button-","");
2693
  $("#icons-css-code-" + block).toggle ();
2694
 
2695
  if ($('#icons-css-code-'+block).is(':visible')) {
 
 
2696
  configure_selection_icons (block);
2697
  process_display_elements (block);
2698
  } else {
 
 
2699
  $("#sticky-animation-"+block).hide ();
2700
  $("#sticky-background-"+block).hide();
 
2701
  }
2702
  });
2703
 
 
 
2704
  $("#counting-button-"+tab).click (function () {
2705
  var block = $(this).attr ("id").replace ("counting-button-","");
2706
  $("#paragraph-counting-" + block).toggle ();
2707
  });
2708
 
 
 
2709
  $("#clearance-button-"+tab).click (function () {
2710
  var block = $(this).attr ("id").replace ("clearance-button-","");
2711
  $("#paragraph-clearance-" + block).toggle ();
2992
  $("#misc-settings-" + block).toggle ();
2993
  });
2994
 
 
 
 
 
 
 
 
2995
  $("#preview-button-"+tab).button ({
2996
  }).show ().click (function () {
2997
  var block = $(this).attr ("id");
4421
 
4422
  select.multiSelect ({
4423
  selectableHeader:
4424
+ '<div class="ai-list-filter-container">' +
4425
+ '<input type="text" class="filter-input" autocomplete="off" placeholder="' + ai_admin.filter + '" title="' + ai_admin.filter_title + '">' +
4426
+ '<button class="filter-button" style="margin-top: -2px; display: none;">' + ai_admin.button_filter + '</button>' +
4427
+ '<span class="filter-message"></span>' +
4428
+ '</div>' +
4429
+ '<input type="text" class="search-input" autocomplete="off" placeholder="' + ai_admin.search + '">',
4430
  selectionHeader: '',
4431
  afterInit: function(ms){
4432
  var that = this,
js/ad-inserter.min.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version="2.7.1",ignore_key=!0,start=1,end=16,active_tab=1,active_tab_0=0,tabs_to_configure=[],debug=!1,debug_title=!1,save_enabled=!0,current_tab=0,next_tab=0,syntax_highlighting=!1,settings_page="",dateFormat="yy-mm-dd",timeFormat="H:i:s",list_search_reload=!1,website_list_search_reload=!1,AI_DISABLED=0,AI_BEFORE_POST=1,AI_AFTER_POST=2,AI_BEFORE_CONTENT=3,AI_AFTER_CONTENT=4,AI_BEFORE_PARAGRAPH=5,AI_AFTER_PARAGRAPH=6,AI_BEFORE_EXCERPT=7,AI_AFTER_EXCERPT=8,AI_BETWEEN_POSTS=9,AI_BEFORE_COMMENTS=
2
  10,AI_BETWEEN_COMMENTS=11,AI_AFTER_COMMENTS=12,AI_FOOTER=13,AI_ABOVE_HEADER=14,AI_BEFORE_HTML_ELEMENT=15,AI_AFTER_HTML_ELEMENT=16,AI_INSIDE_HTML_ELEMENT=17,AI_BEFORE_IMAGE=18,AI_AFTER_IMAGE=19,AI_ALIGNMENT_DEFAULT=0,AI_ALIGNMENT_LEFT=1,AI_ALIGNMENT_RIGHT=2,AI_ALIGNMENT_CENTER=3,AI_ALIGNMENT_FLOAT_LEFT=4,AI_ALIGNMENT_FLOAT_RIGHT=5,AI_ALIGNMENT_NO_WRAPPING=6,AI_ALIGNMENT_CUSTOM_CSS=7,AI_ALIGNMENT_STICKY_LEFT=8,AI_ALIGNMENT_STICKY_RIGHT=9,AI_ALIGNMENT_STICKY_TOP=10,AI_ALIGNMENT_STICKY_BOTTOM=11,AI_ALIGNMENT_STICKY=
3
  12,AI_ADB_ACTION_NONE=0,AI_ADB_ACTION_MESSAGE=1,AI_ADB_ACTION_REDIRECTION=2,AI_ADB_BLOCK_ACTION_DO_NOTHING=0,AI_ADB_BLOCK_ACTION_REPLACE=1,AI_ADB_BLOCK_ACTION_SHOW=2,AI_ADB_BLOCK_ACTION_HIDE=3,AI_CODE_UNKNOWN=100,AI_CODE_BANNER=0,AI_CODE_ADSENSE=1,AI_CODE_AMAZON=2,AI_ADSENSE_STANDARD=0,AI_ADSENSE_LINK=1,AI_ADSENSE_IN_ARTICLE=2,AI_ADSENSE_IN_FEED=3,AI_ADSENSE_MATCHED_CONTENT=4,AI_ADSENSE_SIZE_FIXED=0,AI_ADSENSE_SIZE_RESPONSIVE=1,AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT=2,AI_HTML_INSERTION_CLIENT_SIDE=0,AI_HTML_INSERTION_SEREVR_SIDE=
4
  2,AI_STICK_TO_THE_LEFT=0,AI_STICK_TO_THE_CONTENT_LEFT=1,AI_STICK_HORIZONTAL_CENTER=2,AI_STICK_TO_THE_CONTENT_RIGHT=3,AI_STICK_TO_THE_RIGHT=4,AI_STICK_TO_THE_TOP=0,AI_STICK_VERTICAL_CENTER=1,AI_SCROLL_WITH_THE_CONTENT=2,AI_STICK_TO_THE_BOTTOM=3,AI_ANIMATION_NONE=0,AI_BACKGROUND_REPEAT_DEFAULT=0,AI_BACKGROUND_REPEAT_NO=1,AI_BACKGROUND_REPEAT_YES=2,AI_BACKGROUND_REPEAT_HORIZONTALY=3,AI_BACKGROUND_REPEAT_VERTICALLY=4,AI_BACKGROUND_REPEAT_SPACE=5,AI_BACKGROUND_REPEAT_ROUND=6,AI_BACKGROUND_SIZE_DEFAULT=
1
+ var javascript_version="2.7.2",ignore_key=!0,start=1,end=16,active_tab=1,active_tab_0=0,tabs_to_configure=[],debug=!1,debug_title=!1,save_enabled=!0,current_tab=0,next_tab=0,syntax_highlighting=!1,settings_page="",dateFormat="yy-mm-dd",timeFormat="H:i:s",list_search_reload=!1,website_list_search_reload=!1,AI_DISABLED=0,AI_BEFORE_POST=1,AI_AFTER_POST=2,AI_BEFORE_CONTENT=3,AI_AFTER_CONTENT=4,AI_BEFORE_PARAGRAPH=5,AI_AFTER_PARAGRAPH=6,AI_BEFORE_EXCERPT=7,AI_AFTER_EXCERPT=8,AI_BETWEEN_POSTS=9,AI_BEFORE_COMMENTS=
2
  10,AI_BETWEEN_COMMENTS=11,AI_AFTER_COMMENTS=12,AI_FOOTER=13,AI_ABOVE_HEADER=14,AI_BEFORE_HTML_ELEMENT=15,AI_AFTER_HTML_ELEMENT=16,AI_INSIDE_HTML_ELEMENT=17,AI_BEFORE_IMAGE=18,AI_AFTER_IMAGE=19,AI_ALIGNMENT_DEFAULT=0,AI_ALIGNMENT_LEFT=1,AI_ALIGNMENT_RIGHT=2,AI_ALIGNMENT_CENTER=3,AI_ALIGNMENT_FLOAT_LEFT=4,AI_ALIGNMENT_FLOAT_RIGHT=5,AI_ALIGNMENT_NO_WRAPPING=6,AI_ALIGNMENT_CUSTOM_CSS=7,AI_ALIGNMENT_STICKY_LEFT=8,AI_ALIGNMENT_STICKY_RIGHT=9,AI_ALIGNMENT_STICKY_TOP=10,AI_ALIGNMENT_STICKY_BOTTOM=11,AI_ALIGNMENT_STICKY=
3
  12,AI_ADB_ACTION_NONE=0,AI_ADB_ACTION_MESSAGE=1,AI_ADB_ACTION_REDIRECTION=2,AI_ADB_BLOCK_ACTION_DO_NOTHING=0,AI_ADB_BLOCK_ACTION_REPLACE=1,AI_ADB_BLOCK_ACTION_SHOW=2,AI_ADB_BLOCK_ACTION_HIDE=3,AI_CODE_UNKNOWN=100,AI_CODE_BANNER=0,AI_CODE_ADSENSE=1,AI_CODE_AMAZON=2,AI_ADSENSE_STANDARD=0,AI_ADSENSE_LINK=1,AI_ADSENSE_IN_ARTICLE=2,AI_ADSENSE_IN_FEED=3,AI_ADSENSE_MATCHED_CONTENT=4,AI_ADSENSE_SIZE_FIXED=0,AI_ADSENSE_SIZE_RESPONSIVE=1,AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT=2,AI_HTML_INSERTION_CLIENT_SIDE=0,AI_HTML_INSERTION_SEREVR_SIDE=
4
  2,AI_STICK_TO_THE_LEFT=0,AI_STICK_TO_THE_CONTENT_LEFT=1,AI_STICK_HORIZONTAL_CENTER=2,AI_STICK_TO_THE_CONTENT_RIGHT=3,AI_STICK_TO_THE_RIGHT=4,AI_STICK_TO_THE_TOP=0,AI_STICK_VERTICAL_CENTER=1,AI_SCROLL_WITH_THE_CONTENT=2,AI_STICK_TO_THE_BOTTOM=3,AI_ANIMATION_NONE=0,AI_BACKGROUND_REPEAT_DEFAULT=0,AI_BACKGROUND_REPEAT_NO=1,AI_BACKGROUND_REPEAT_YES=2,AI_BACKGROUND_REPEAT_HORIZONTALY=3,AI_BACKGROUND_REPEAT_VERTICALLY=4,AI_BACKGROUND_REPEAT_SPACE=5,AI_BACKGROUND_REPEAT_ROUND=6,AI_BACKGROUND_SIZE_DEFAULT=
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.8
8
  Requires PHP: 5.6
9
- Stable tag: 2.7.1
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
@@ -352,6 +352,19 @@ If you are not happy to reveal this information and you have opted in, simply di
352
 
353
  == Changelog ==
354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  = 2.7.1 =
356
  - Improved ad blocking detection
357
  - Few minor bug fixes, cosmetic changes and code improvements
@@ -560,6 +573,19 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
560
 
561
  == Upgrade Notice ==
562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  = 2.7.1 =
564
  Improved ad blocking detection;
565
  Few minor bug fixes, cosmetic changes and code improvements
6
  Requires at least: 4.6
7
  Tested up to: 5.8
8
  Requires PHP: 5.6
9
+ Stable tag: 2.7.2
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
352
 
353
  == Changelog ==
354
 
355
+ = 2.7.2 =
356
+ - Added shortcuts for TCF v2 consent cookie checks
357
+ - Added support for adinserter shortcode to get post ID
358
+ - Improved ad blocking detection
359
+ - Changed internal IP to country database (Pro only)
360
+ - Few minor bug fixes, cosmetic changes and code improvements
361
+
362
+ = 2.7.1 =
363
+ - Added shortcuts for TCF v2 consent cookie checks
364
+ - Improved ad blocking detection
365
+ - Changed internal IP to country database (Pro only)
366
+ - Few minor bug fixes, cosmetic changes and code improvements
367
+
368
  = 2.7.1 =
369
  - Improved ad blocking detection
370
  - Few minor bug fixes, cosmetic changes and code improvements
573
 
574
  == Upgrade Notice ==
575
 
576
+ = 2.7.2 =
577
+ Added shortcuts for TCF v2 consent cookie checks;
578
+ Added support for adinserter shortcode to get post ID;
579
+ Improved ad blocking detection;
580
+ Changed internal IP to country database (Pro only);
581
+ Few minor bug fixes, cosmetic changes and code improvements
582
+
583
+ = 2.7.1 =
584
+ Added shortcuts for TCF v2 consent cookie checks;
585
+ Improved ad blocking detection;
586
+ Changed internal IP to country database (Pro only);
587
+ Few minor bug fixes, cosmetic changes and code improvements;
588
+
589
  = 2.7.1 =
590
  Improved ad blocking detection;
591
  Few minor bug fixes, cosmetic changes and code improvements
settings.php CHANGED
@@ -2920,6 +2920,15 @@ function generate_settings_form (){
2920
  </td>
2921
  </tr>
2922
  <?php if (function_exists ('ai_adb_settings')) ai_adb_settings (); ?>
 
 
 
 
 
 
 
 
 
2923
  </table>
2924
  </div>
2925
 
2920
  </td>
2921
  </tr>
2922
  <?php if (function_exists ('ai_adb_settings')) ai_adb_settings (); ?>
2923
+ <tr style="height: 26px;">
2924
+ <td>
2925
+ <label for="adb-external-scripts" title="<?php _e ('Use external scripts for ad blocking detection. Disable when you need to obtain user consent before collecting personal information. In such case use shortcut to insert external scripts after the consent is given.', 'ad-inserter'); ?>"><?php _e ('Use external scripts', 'ad-inserter'); ?></label>
2926
+ </td>
2927
+ <td>
2928
+ <input type="hidden" name="<?php echo AI_OPTION_ADB_EXTERNAL_SCRIPTS; ?>" value="0" />
2929
+ <input type="checkbox" name="<?php echo AI_OPTION_ADB_EXTERNAL_SCRIPTS; ?>" id="adb-external-scripts" value="1" default="<?php echo AI_DEFAULT_ADB_EXTERNAL_SCRIPTS; ?>" <?php if (get_adb_external_scripts () == AI_ENABLED) echo 'checked '; ?> />
2930
+ </td>
2931
+ </tr>
2932
  </table>
2933
  </div>
2934