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

Version Description

  • Fix for exceptions list not showing all exceptions
  • Improved ad blocking detection
  • Fix for close button in preview window (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.6.6
Comparing to
See all releases

Code changes from version 2.6.5 to 2.6.6

ad-inserter.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
- Version: 2.6.5
6
  Description: Ad management with many advanced advertising features to insert ads at optimal positions
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
@@ -15,6 +15,12 @@ Domain Path: /languages
15
 
16
  Change Log
17
 
 
 
 
 
 
 
18
  Ad Inserter 2.6.5 - 2020-02-26
19
  - Added support for url data shortcode
20
  - Added warning if not all exceptions were cleared
@@ -2026,53 +2032,33 @@ function ai_set_footer_inline_scripts () {
2026
  }
2027
 
2028
  function ai_wp_enqueue_scripts_hook () {
2029
- global $ai_wp_data, $wp_version, $ai_front_translations;
2030
 
2031
  // TEST
2032
- // wp_deregister_script('jquery');
2033
-
2034
- // $adb_code = defined ('AI_ADBLOCKING_DETECTION') && AI_ADBLOCKING_DETECTION && $ai_wp_data [AI_ADB_DETECTION] && !isset ($ai_wp_data [AI_ADB_SHORTCODE_DISABLED]);
2035
 
2036
  ai_set_footer_inline_scripts ();
2037
 
2038
  if ($ai_wp_data [AI_FOOTER_INLINE_SCRIPTS] ||
2039
  ($ai_wp_data [AI_WP_DEBUGGING] & (AI_DEBUG_POSITIONS | AI_DEBUG_BLOCKS)) != 0 ||
2040
  !empty ($_GET) ||
2041
- // $ai_wp_data [AI_FRONTEND_JS_DEBUGGING] ||
2042
- // $ai_wp_data [AI_CLIENT_SIDE_INSERTION] ||
2043
- // $ai_wp_data [AI_CHECK_BLOCK] ||
2044
  get_remote_debugging () || ($ai_wp_data [AI_WP_USER] & AI_USER_ADMINISTRATOR) != 0 ||
2045
  $ai_wp_data [AI_ANIMATION]) {
2046
 
2047
- // force loading of jquery on frontend
2048
- $jquery_required = array (
2049
- 'jquery'
2050
- );
2051
- if ($ai_wp_data [AI_HTML_ELEMENT_SELECTION]) {
2052
- $jquery_required []= 'jquery-ui-button';
2053
- }
2054
-
2055
- if (!$ai_wp_data [AI_WP_AMP_PAGE]) {
2056
- wp_enqueue_script ('ai-jquery-js', plugins_url ('includes/js/ai-jquery.js', __FILE__), $jquery_required, $wp_version . '+' . AD_INSERTER_VERSION);
2057
-
2058
- wp_localize_script ('ai-jquery-js', 'ai_front', $ai_front_translations);
2059
  }
2060
 
2061
  if ($ai_wp_data [AI_HTML_ELEMENT_SELECTION]) {
 
2062
  wp_enqueue_style ('ai-html-jquery-ui', plugins_url ('css/jquery-ui-1.10.3.custom.min.css', __FILE__), array (), null);
2063
  }
2064
 
2065
- // if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
2066
- // wp_add_inline_script ('ai-jquery-js', 'ai_debugging = true;');
2067
- // }
2068
- // FOOTER
2069
- // if (!get_disable_js_code () && (($ai_wp_data [AI_CLOSE_BUTTONS] && !$ai_wp_data [AI_CODE_FOR_IFRAME]) || $ai_wp_data [AI_CHECK_BLOCK] || ($ai_wp_data [AI_TRACKING] && !isset ($ai_wp_data [AI_TRACKING_SHORTCODE_DISABLED])) || $adb_code)) {
2070
- // wp_add_inline_script ('ai-jquery-js', ai_get_js ('ai-cookie', false));
2071
- // }
2072
 
2073
- // FOOTER ????????? FOOTER
2074
- // if (!get_disable_js_code () && ($ai_wp_data [AI_CLIENT_SIDE_INSERTION] || $ai_wp_data [AI_CLOSE_BUTTONS] || $ai_wp_data [AI_CHECK_BLOCK]) && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
2075
- // wp_add_inline_script ('ai-jquery-js', ai_get_js ('ai-insert', false));
2076
  // }
2077
 
2078
  if (!get_disable_css_code () && (get_remote_debugging () || ($ai_wp_data [AI_WP_USER] & AI_USER_ADMINISTRATOR) != 0)) {
@@ -2412,7 +2398,15 @@ function ai_replace_js_data ($js) {
2412
  // Deprecated
2413
  $js = str_replace ('AI_BLOCK_CLASS_NAME', get_block_class_name (true), $js);
2414
 
2415
- if (function_exists ('ai_replace_js_data_2')) ai_replace_js_data_2 ($js);
 
 
 
 
 
 
 
 
2416
 
2417
  return $js;
2418
  }
@@ -2468,6 +2462,10 @@ function add_footer_inline_scripts () {
2468
  $client_side_dynamic_blocks = get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW || get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_CLIENT_SIDE_INSERT;
2469
  $wait_for_jquery = get_wait_for_jquery ();
2470
 
 
 
 
 
2471
  if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
2472
  $js_code = "";
2473
 
@@ -2481,12 +2479,13 @@ function add_footer_inline_scripts () {
2481
  }
2482
 
2483
  if ($client_side_dynamic_blocks ||
 
2484
  $ai_wp_data [AI_CLIENT_SIDE_INSERTION] ||
2485
- $ai_wp_data [AI_CHECK_BLOCK] ||
2486
  isset ($ai_wp_data [AI_CLIENT_SIDE_ROTATION]) ||
2487
  $ai_wp_data [AI_CLIENT_SIDE_DETECTION] ||
2488
- ($ai_wp_data [AI_CLOSE_BUTTONS] && !$ai_wp_data [AI_CODE_FOR_IFRAME]) ||
2489
  $ai_wp_data [AI_CHECK_BLOCK] ||
 
2490
  ($ai_wp_data [AI_TRACKING] && !isset ($ai_wp_data [AI_TRACKING_SHORTCODE_DISABLED])) ||
2491
  $adb_code
2492
  ) {
@@ -2578,18 +2577,33 @@ function add_footer_inline_scripts () {
2578
 
2579
  // Wait for jQuery - for iframe pages it is always loaded
2580
  if ($wait_for_jquery && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
 
 
 
 
 
 
 
2581
 
2582
  echo str_replace (array (
2583
  'AI_JS_JQUERY0',
2584
  'AI_JS_JQUERY1',
2585
- "AI_JS_CODE=2"
2586
  ), array (
2587
- includes_url ('js/jquery/jquery.js') . '?ver=' . $wp_version,
2588
  includes_url ('js/jquery/jquery-migrate.min.js') . '?ver=' . $wp_version,
2589
- trim (ai_front_translations_code ())
2590
  ), $jquery_ready_code [1]);
2591
  }
2592
 
 
 
 
 
 
 
 
 
2593
  echo "\n</script>\n";
2594
  }
2595
  }
@@ -3235,9 +3249,9 @@ function ai_wp_head_hook () {
3235
  }
3236
  }
3237
 
3238
- if (!get_disable_js_code () && $ai_wp_data [AI_CODE_FOR_IFRAME]) {
3239
- echo '<script>', "\n", ai_front_translations_code (), '</script>', "\n";
3240
- }
3241
 
3242
  $ai_wp_data [AI_HEAD] = false;
3243
 
@@ -4056,8 +4070,13 @@ function ai_write_debug_info ($write_processing_log = false) {
4056
  'order' => 'ASC',
4057
  'include' => '',
4058
  'exclude' => '',
4059
- 'meta_key' => '_adinserter_block_exceptions',
4060
- 'meta_value' => '',
 
 
 
 
 
4061
  'post_type' => $screens,
4062
  'post_mime_type' => '',
4063
  'post_parent' => '',
@@ -6193,7 +6212,7 @@ pre.ai-w3tc-debug {font-size: 12px;}
6193
 
6194
  pre.ai-w3tc-debug.ai-w3tc-run {color: #00f;}
6195
 
6196
- pre.ai-processing-log {padding: 10px; font-size: 12px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;}
6197
 
6198
  <?php
6199
  }
@@ -6668,8 +6687,13 @@ function ai_settings () {
6668
  'order' => 'ASC',
6669
  'include' => '',
6670
  'exclude' => '',
6671
- 'meta_key' => '_adinserter_block_exceptions',
6672
- 'meta_value' => '',
 
 
 
 
 
6673
  'post_type' => $screens,
6674
  'post_mime_type' => '',
6675
  'post_parent' => '',
@@ -6713,8 +6737,13 @@ function ai_settings () {
6713
  'order' => 'ASC',
6714
  'include' => '',
6715
  'exclude' => '',
6716
- 'meta_key' => '_adinserter_block_exceptions',
6717
- 'meta_value' => '',
 
 
 
 
 
6718
  'post_type' => $screens,
6719
  'post_mime_type' => '',
6720
  'post_parent' => '',
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
+ Version: 2.6.6
6
  Description: Ad management with many advanced advertising features to insert ads at optimal positions
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
15
 
16
  Change Log
17
 
18
+ Ad Inserter 2.6.6 - 2020-03-15
19
+ - Fix for exceptions list not showing all exceptions
20
+ - Improved ad blocking detection
21
+ - Fix for close button in preview window (Pro only)
22
+ - Few minor bug fixes, cosmetic changes and code improvements
23
+
24
  Ad Inserter 2.6.5 - 2020-02-26
25
  - Added support for url data shortcode
26
  - Added warning if not all exceptions were cleared
2032
  }
2033
 
2034
  function ai_wp_enqueue_scripts_hook () {
2035
+ global $ai_wp_data, $wp_version, $wp_scripts, $ai_front_translations;
2036
 
2037
  // TEST
2038
+ // wp_deregister_script ('jquery');
 
 
2039
 
2040
  ai_set_footer_inline_scripts ();
2041
 
2042
  if ($ai_wp_data [AI_FOOTER_INLINE_SCRIPTS] ||
2043
  ($ai_wp_data [AI_WP_DEBUGGING] & (AI_DEBUG_POSITIONS | AI_DEBUG_BLOCKS)) != 0 ||
2044
  !empty ($_GET) ||
 
 
 
2045
  get_remote_debugging () || ($ai_wp_data [AI_WP_USER] & AI_USER_ADMINISTRATOR) != 0 ||
2046
  $ai_wp_data [AI_ANIMATION]) {
2047
 
2048
+ // Load jQuery on frontend when needed
2049
+ if (!get_wait_for_jquery () && isset ($wp_scripts->registered ['jquery'])) {
2050
+ wp_enqueue_script ('jquery');
 
 
 
 
 
 
 
 
 
2051
  }
2052
 
2053
  if ($ai_wp_data [AI_HTML_ELEMENT_SELECTION]) {
2054
+ wp_enqueue_script ('ai-jquery-js', plugins_url ('includes/js/ai-jquery.js', __FILE__), array ('jquery', 'jquery-ui-button'), $wp_version . '+' . AD_INSERTER_VERSION);
2055
  wp_enqueue_style ('ai-html-jquery-ui', plugins_url ('css/jquery-ui-1.10.3.custom.min.css', __FILE__), array (), null);
2056
  }
2057
 
2058
+ // if (!$ai_wp_data [AI_WP_AMP_PAGE]) {
2059
+ // wp_enqueue_script ('ai-jquery-js', plugins_url ('includes/js/ai-jquery.js', __FILE__), $jquery_required, $wp_version . '+' . AD_INSERTER_VERSION);
 
 
 
 
 
2060
 
2061
+ // wp_localize_script ('ai-jquery-js', 'ai_front', $ai_front_translations);
 
 
2062
  // }
2063
 
2064
  if (!get_disable_css_code () && (get_remote_debugging () || ($ai_wp_data [AI_WP_USER] & AI_USER_ADMINISTRATOR) != 0)) {
2398
  // Deprecated
2399
  $js = str_replace ('AI_BLOCK_CLASS_NAME', get_block_class_name (true), $js);
2400
 
2401
+ if (function_exists ('ai_replace_js_data_2')) ai_replace_js_data_2 ($js); else {
2402
+ $js = str_replace ('AI_ADB_CONTENT_CSS_BEGIN_CLASS', 'wp-slider0-pre90', $js);
2403
+ $js = str_replace ('AI_ADB_CONTENT_CSS_END_CLASS', 'wp-slider1-pre91', $js);
2404
+ $js = str_replace ('AI_ADB_CONTENT_DELETE_BEGIN_CLASS', 'wp-slider2-pre92', $js);
2405
+ $js = str_replace ('AI_ADB_CONTENT_DELETE_END_CLASS', 'wp-slider3-pre93', $js);
2406
+ $js = str_replace ('AI_ADB_CONTENT_REPLACE_BEGIN_CLASS', 'wp-slider4-pre94', $js);
2407
+ $js = str_replace ('AI_ADB_CONTENT_REPLACE_END_CLASS', 'wp-slider5-pre95', $js);
2408
+ $js = str_replace ('ai-adb-url', AD_INSERTER_PLUGIN_URL . 'js/', $js);
2409
+ }
2410
 
2411
  return $js;
2412
  }
2462
  $client_side_dynamic_blocks = get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW || get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_CLIENT_SIDE_INSERT;
2463
  $wait_for_jquery = get_wait_for_jquery ();
2464
 
2465
+ ob_start ();
2466
+
2467
+ echo ai_front_translations_code ();
2468
+
2469
  if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
2470
  $js_code = "";
2471
 
2479
  }
2480
 
2481
  if ($client_side_dynamic_blocks ||
2482
+ $ai_wp_data [AI_CLIENT_SIDE_DETECTION] ||
2483
  $ai_wp_data [AI_CLIENT_SIDE_INSERTION] ||
 
2484
  isset ($ai_wp_data [AI_CLIENT_SIDE_ROTATION]) ||
2485
  $ai_wp_data [AI_CLIENT_SIDE_DETECTION] ||
2486
+ ($ai_wp_data [AI_CLOSE_BUTTONS] && !$ai_wp_data [AI_CODE_FOR_IFRAME]) ||
2487
  $ai_wp_data [AI_CHECK_BLOCK] ||
2488
+ $ai_wp_data [AI_LAZY_LOADING] ||
2489
  ($ai_wp_data [AI_TRACKING] && !isset ($ai_wp_data [AI_TRACKING_SHORTCODE_DISABLED])) ||
2490
  $adb_code
2491
  ) {
2577
 
2578
  // Wait for jQuery - for iframe pages it is always loaded
2579
  if ($wait_for_jquery && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
2580
+ global $wp_scripts;
2581
+
2582
+ if (isset ($wp_scripts->registered ['jquery']->ver)) {
2583
+ $ver = $wp_scripts->registered ['jquery']->ver;
2584
+ } else {
2585
+ $ver = $wp_version;
2586
+ }
2587
 
2588
  echo str_replace (array (
2589
  'AI_JS_JQUERY0',
2590
  'AI_JS_JQUERY1',
2591
+ // "AI_JS_CODE=2"
2592
  ), array (
2593
+ includes_url ('js/jquery/jquery.js') . '?ver=' . $ver,
2594
  includes_url ('js/jquery/jquery-migrate.min.js') . '?ver=' . $wp_version,
2595
+ // trim (ai_front_translations_code ())
2596
  ), $jquery_ready_code [1]);
2597
  }
2598
 
2599
+ $footer_js_code = ob_get_clean ();
2600
+
2601
+ if (function_exists ('check_footer_inline_scripts')) {
2602
+ $footer_js_code = check_footer_inline_scripts ($footer_js_code);
2603
+ }
2604
+
2605
+ echo $footer_js_code;
2606
+
2607
  echo "\n</script>\n";
2608
  }
2609
  }
3249
  }
3250
  }
3251
 
3252
+ // if (!get_disable_js_code () && $ai_wp_data [AI_CODE_FOR_IFRAME]) {
3253
+ // echo '<script>', "\n", ai_front_translations_code (), '</script>', "\n";
3254
+ // }
3255
 
3256
  $ai_wp_data [AI_HEAD] = false;
3257
 
4070
  'order' => 'ASC',
4071
  'include' => '',
4072
  'exclude' => '',
4073
+ 'meta_query' => array (
4074
+ array (
4075
+ 'key' => '_adinserter_block_exceptions',
4076
+ 'value' => '',
4077
+ 'compare' => '!='
4078
+ )
4079
+ ),
4080
  'post_type' => $screens,
4081
  'post_mime_type' => '',
4082
  'post_parent' => '',
6212
 
6213
  pre.ai-w3tc-debug.ai-w3tc-run {color: #00f;}
6214
 
6215
+ pre.ai-processing-log {padding: 10px; font-family: monospace; font-size: 12px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;}
6216
 
6217
  <?php
6218
  }
6687
  'order' => 'ASC',
6688
  'include' => '',
6689
  'exclude' => '',
6690
+ 'meta_query' => array (
6691
+ array (
6692
+ 'key' => '_adinserter_block_exceptions',
6693
+ 'value' => '',
6694
+ 'compare' => '!='
6695
+ )
6696
+ ),
6697
  'post_type' => $screens,
6698
  'post_mime_type' => '',
6699
  'post_parent' => '',
6737
  'order' => 'ASC',
6738
  'include' => '',
6739
  'exclude' => '',
6740
+ 'meta_query' => array (
6741
+ array (
6742
+ 'key' => '_adinserter_block_exceptions',
6743
+ 'value' => '',
6744
+ 'compare' => '!='
6745
+ )
6746
+ ),
6747
  'post_type' => $screens,
6748
  'post_mime_type' => '',
6749
  'post_parent' => '',
class.php CHANGED
@@ -4256,23 +4256,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
4256
  echo "<script type='text/javascript' src='", includes_url ('js/jquery/jquery.js'), "?ver=", $jquery_version, "'></script>\n";
4257
  echo "<script type='text/javascript' src='", includes_url ('js/jquery/jquery-migrate.min.js'), "?ver=", $jquery_migrate_version, "'></script>\n";
4258
 
4259
- // echo "<script>\n";
4260
- // echo "var ai_iframe = true;\n";
4261
-
4262
- // if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
4263
- // echo "ai_debugging = true;\n";
4264
- // }
4265
- // // FOOTER
4266
- // if (!get_disable_js_code () && ($ai_wp_data [AI_CHECK_BLOCK] || $adb_code)) {
4267
- // echo ai_get_js ('ai-cookie', false);
4268
- // }
4269
-
4270
- // // FOOTER
4271
- // if (!get_disable_js_code () && ($ai_wp_data [AI_CHECK_BLOCK])) {
4272
- // echo ai_get_js ('ai-insert', false);
4273
- // }
4274
- // echo "</script>\n";
4275
-
4276
  ai_wp_head_hook ();
4277
  echo '<style>
4278
  body {margin: 0; padding: 0; font-family: arial;}
@@ -4285,23 +4268,8 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
4285
  // $include_viewport_classes = true, $hidden_widgets = false, $code_only = false
4286
  echo ai_extract_js_code ($this->get_code_for_insertion (false, false, false));
4287
 
4288
- // echo "DELA\n";
4289
-
4290
  echo "<script>\n";
4291
  echo "var ai_iframe = true;\n";
4292
-
4293
- // if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
4294
- // echo "ai_debugging = true;\n";
4295
- // }
4296
- // FOOTER
4297
- // if (!get_disable_js_code () && ($ai_wp_data [AI_CHECK_BLOCK] || $adb_code)) {
4298
- // echo ai_get_js ('ai-cookie', false);
4299
- // }
4300
-
4301
- // FOOTER
4302
- // if (!get_disable_js_code () && ($ai_wp_data [AI_CHECK_BLOCK])) {
4303
- // echo ai_get_js ('ai-insert', false);
4304
- // }
4305
  echo "</script>\n";
4306
 
4307
  ai_set_footer_inline_scripts ();
4256
  echo "<script type='text/javascript' src='", includes_url ('js/jquery/jquery.js'), "?ver=", $jquery_version, "'></script>\n";
4257
  echo "<script type='text/javascript' src='", includes_url ('js/jquery/jquery-migrate.min.js'), "?ver=", $jquery_migrate_version, "'></script>\n";
4258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4259
  ai_wp_head_hook ();
4260
  echo '<style>
4261
  body {margin: 0; padding: 0; font-family: arial;}
4268
  // $include_viewport_classes = true, $hidden_widgets = false, $code_only = false
4269
  echo ai_extract_js_code ($this->get_code_for_insertion (false, false, false));
4270
 
 
 
4271
  echo "<script>\n";
4272
  echo "var ai_iframe = true;\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
4273
  echo "</script>\n";
4274
 
4275
  ai_set_footer_inline_scripts ();
constants.php CHANGED
@@ -31,7 +31,7 @@ if (!defined( 'AD_INSERTER_NAME'))
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
- define ('AD_INSERTER_VERSION', '2.6.5');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
@@ -761,6 +761,7 @@ define ('AI_TRANSIENT_ADB_CLASS_6', 'ai-adb-class-6');
761
  define ('AI_TRANSIENT_ADB_CLASS_EXPIRATION', 48 * 3600);
762
 
763
  define ('AI_TRANSIENT_ADB_FILES_VERSION', 'ai-adb-version');
 
764
 
765
  define ('AI_SYNTAX_HIGHLIGHTER_THEME', 'ad_inserter');
766
  define ('DEFAULT_SYNTAX_HIGHLIGHTER_THEME', AI_SYNTAX_HIGHLIGHTER_THEME);
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
+ define ('AD_INSERTER_VERSION', '2.6.6');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
761
  define ('AI_TRANSIENT_ADB_CLASS_EXPIRATION', 48 * 3600);
762
 
763
  define ('AI_TRANSIENT_ADB_FILES_VERSION', 'ai-adb-version');
764
+ define ('AI_TRANSIENT_ADB_SEED', 'ai-adb-seed');
765
 
766
  define ('AI_SYNTAX_HIGHLIGHTER_THEME', 'ad_inserter');
767
  define ('DEFAULT_SYNTAX_HIGHLIGHTER_THEME', AI_SYNTAX_HIGHLIGHTER_THEME);
css/ai-settings.css CHANGED
@@ -1,5 +1,5 @@
1
  #ai-data {
2
- font-family: "2.6.5"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #ai-data {
2
+ font-family: "2.6.6"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
includes/js/ai-adb.js CHANGED
@@ -1,19 +1,20 @@
1
- function b64e (str) {
2
- // first we use encodeURIComponent to get percent-encoded UTF-8,
3
- // then we convert the percent encodings into raw bytes which
4
- // can be fed into btoa.
5
- return btoa (encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
6
- function toSolidBytes (match, p1) {
7
- return String.fromCharCode ('0x' + p1);
8
- }));
9
- }
10
-
11
- function b64d (str) {
12
- // Going backwards: from bytestream, to percent-encoding, to original string.
13
- return decodeURIComponent (atob (str).split ('').map (function(c) {
14
- return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
15
- }).join (''));
16
- }
 
17
 
18
  var ai_adb = true;
19
  var ai_adb_active = false;
@@ -437,7 +438,7 @@ var ai_adb_undetected = function(n) {
437
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 4
438
  // var ai_adb_debugging = false;
439
 
440
- if (ai_adb_debugging && n == 1) console.log ('');
441
  if (ai_adb_debugging) console.log ("AI AD BLOCKING not detected:", '(' + ai_adb_counter + ')', ai_adb_detection_type (n));
442
 
443
  if (!ai_adb_active && ai_adb_counter == 4) {
@@ -505,7 +506,8 @@ jQuery (document).ready (function ($) {
505
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 5
506
  // var ai_adb_debugging = false;
507
 
508
- var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
 
509
 
510
  setTimeout (function() {
511
  $("#ai-adb-bar").click (function () {
@@ -569,24 +571,81 @@ jQuery (document).ready (function ($) {
569
  });
570
  });
571
 
572
- jQuery (window).on ('load', function () {
573
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 6
574
  // var ai_adb_debugging = false;
575
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
  if (ai_adb_debugging) console.log ("AI AD BLOCKING window load");
577
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  setTimeout (function() {
579
  var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
580
 
581
- if (jQuery("#ai-adb-ads").length) {
582
- if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")){
583
- if (!ai_adb_active || ai_debugging_active) ai_adb_detected (1);
584
- } else {
585
- ai_adb_undetected (1);
586
- }
587
  }
588
 
589
- if (jQuery("#ai-adb-ga").length) {
590
  if (!(typeof ga == 'function' && ga.toString().length > 30) &&
591
  !(typeof __gaTracker == 'function' && __gaTracker.toString ().length > 30)) {
592
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (5);
@@ -595,24 +654,24 @@ jQuery (window).on ('load', function () {
595
  }
596
  }
597
 
598
- if (jQuery("#ai-adb-sponsors").length) {
599
  if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
600
- if (!ai_adb_active || ai_debugging_active) ai_adb_detected (2);
601
- } else {
602
- ai_adb_undetected (2);
603
- }
604
  }
605
 
606
- if (jQuery("#banner-advert-container").length) {
607
- if (jQuery("#banner-advert-container img").length > 0) {
608
- if (jQuery("#banner-advert-container img").outerHeight() === 0) {
 
 
609
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (3);
610
  } else ai_adb_undetected (3);
611
- jQuery("#banner-advert-container img").remove();
612
  }
613
  }
614
 
615
- if (jQuery("#ai-adb-mn").length) {
616
  if (!(typeof _mNDetails == 'object' && JSON.stringify (_mNDetails).length > 400)) {
617
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (6);
618
  } else {
1
+ //function b64e (str) {
2
+ // // first we use encodeURIComponent to get percent-encoded UTF-8,
3
+ // // then we convert the percent encodings into raw bytes which
4
+ // // can be fed into btoa.
5
+ // return btoa (encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
6
+ // function toSolidBytes (match, p1) {
7
+ // return String.fromCharCode ('0x' + p1);
8
+ // }));
9
+ //}
10
+
11
+ //function b64d (str) {
12
+ // // Going backwards: from bytestream, to percent-encoding, to original string.
13
+ //// return decodeURIComponent (atob (str).split ('').map (function(c) {
14
+ // return decodeURIComponent (atob (str).split ('').map (function(c) {
15
+ // return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
16
+ // }).join (''));
17
+ //}
18
 
19
  var ai_adb = true;
20
  var ai_adb_active = false;
438
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 4
439
  // var ai_adb_debugging = false;
440
 
441
+ // if (ai_adb_debugging && n == 1) console.log ('');
442
  if (ai_adb_debugging) console.log ("AI AD BLOCKING not detected:", '(' + ai_adb_counter + ')', ai_adb_detection_type (n));
443
 
444
  if (!ai_adb_active && ai_adb_counter == 4) {
506
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 5
507
  // var ai_adb_debugging = false;
508
 
509
+ // var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
510
+ ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
511
 
512
  setTimeout (function() {
513
  $("#ai-adb-bar").click (function () {
571
  });
572
  });
573
 
574
+ function ai_adb_get_script (ai_adb_script, ai_adb_action) {
575
  var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 6
576
  // var ai_adb_debugging = false;
577
 
578
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING loading script", ai_adb_script);
579
+
580
+ var script = document.createElement ('script');
581
+ var date = new Date();
582
+ script.src = 'ai-adb-url' + ai_adb_script + '.js?ver=' + date.getTime();
583
+
584
+ var head = document.getElementsByTagName ('head')[0],
585
+ done = false;
586
+
587
+ // Attach handlers for all browsers
588
+
589
+ script.onerror = function () {
590
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING error loading script", ai_adb_script);
591
+
592
+ if (ai_adb_action) {
593
+ ai_adb_action ();
594
+ }
595
+ script.onerror = null;
596
+ head.removeChild (script);
597
+ }
598
+
599
+ script.onload = script.onreadystatechange = function () {
600
+ if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
601
+ done = true;
602
+
603
+ if (ai_adb_debugging) console.log ("AI AD BLOCKING script loaded ", ai_adb_script);
604
+
605
+ if (ai_adb_action) {
606
+ ai_adb_action ();
607
+ }
608
+
609
+ script.onload = script.onreadystatechange = null;
610
+ head.removeChild (script);
611
+ };
612
+ };
613
+
614
+ head.appendChild (script);
615
+ };
616
+
617
+ jQuery (window).on ('load', function () {
618
+ var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 7
619
+ // var ai_adb_debugging = false;
620
+
621
  if (ai_adb_debugging) console.log ("AI AD BLOCKING window load");
622
 
623
+ function ai_adb_1 () {
624
+ if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")){
625
+ if (!ai_adb_active || ai_debugging_active) ai_adb_detected (1);
626
+ } else {
627
+ ai_adb_undetected (1);
628
+ }
629
+ }
630
+
631
+ function ai_adb_2 () {
632
+ if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
633
+ if (!ai_adb_active || ai_debugging_active) ai_adb_detected (2);
634
+ } else {
635
+ ai_adb_undetected (2);
636
+ }
637
+ }
638
+
639
  setTimeout (function() {
640
  var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
641
 
642
+ if (jQuery(b64d ("I2FpLWFkYi1hZHM=")).length) {
643
+ if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")) {
644
+ ai_adb_get_script ('ads', ai_adb_1);
645
+ } else ai_adb_1 ();
 
 
646
  }
647
 
648
+ if (jQuery(b64d ("I2FpLWFkYi1nYQ==")).length) {
649
  if (!(typeof ga == 'function' && ga.toString().length > 30) &&
650
  !(typeof __gaTracker == 'function' && __gaTracker.toString ().length > 30)) {
651
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (5);
654
  }
655
  }
656
 
657
+ if (jQuery(b64d ("I2FpLWFkYi1zcG9uc29ycw==")).length) {
658
  if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
659
+ ai_adb_get_script ('sponsors', ai_adb_2);
660
+ } else ai_adb_2 ();
 
 
661
  }
662
 
663
+ var banner_advert_container = b64d ("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVy");
664
+ var banner_advert_container_img = b64d ("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVyIGltZw==");
665
+ if (jQuery(banner_advert_container).length) {
666
+ if (jQuery(banner_advert_container_img).length > 0) {
667
+ if (jQuery(banner_advert_container_img).outerHeight() === 0) {
668
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (3);
669
  } else ai_adb_undetected (3);
670
+ jQuery(banner_advert_container_img).remove();
671
  }
672
  }
673
 
674
+ if (jQuery(b64d ("I2FpLWFkYi1tbg==")).length) {
675
  if (!(typeof _mNDetails == 'object' && JSON.stringify (_mNDetails).length > 400)) {
676
  if (!ai_adb_active || ai_debugging_active) ai_adb_detected (6);
677
  } else {
includes/js/ai-adb.min.js CHANGED
@@ -1,4 +1,3 @@
1
- function b64e(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,b){return String.fromCharCode("0x"+b)}))}function b64d(a){return decodeURIComponent(atob(a).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))}
2
  var ai_adb=!0,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_FUNCT_GET_DELAY_ACTION,ai_adb_selectors="AI_ADB_SELECTORS",ai_adb_redirection_url=
3
  "AI_ADB_REDIRECTION_PAGE";
4
  function ai_adb_process_content(){(function(a){a(".AI_ADB_CONTENT_CSS_BEGIN_CLASS").each(function(){var c=a(this).parent(),b=a(this).data("css");"undefined"==typeof b&&(b="display: none !important;");var d=a(this).data("selectors");if("undefined"==typeof d||""==d)d="p";var e=!1;a(c).find(".AI_ADB_CONTENT_CSS_BEGIN_CLASS, .AI_ADB_CONTENT_CSS_END_CLASS, "+d).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_CSS_BEGIN_CLASS"))a(this).remove(),e=!0;else if(a(this).hasClass("AI_ADB_CONTENT_CSS_END_CLASS"))a(this).remove(),e=
@@ -6,15 +5,17 @@ function ai_adb_process_content(){(function(a){a(".AI_ADB_CONTENT_CSS_BEGIN_CLAS
6
  (a(this).remove(),d=!1):d&&a(this).remove()})});a(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS").each(function(){var c=a(this).parent(),b=a(this).data("text");"undefined"==typeof b&&(b="");var d=a(this).data("css");"undefined"==typeof d&&(d="");var e=a(this).data("selectors");if("undefined"==typeof e||""==e)e="p";var f=!1;a(c).find(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS, .AI_ADB_CONTENT_REPLACE_END_CLASS, "+e).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_BEGIN_CLASS"))a(this).remove(),f=!0;else if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_END_CLASS"))a(this).remove(),
7
  f=!1;else if(f){if(0!=b.length){var c=Math.round(a(this).text().length/(b.length+1));a(this).text(Array(c+1).join(b+" ").trim())}else a(this).text("");""!=d&&(c=a(this).attr("style"),"undefined"==typeof c?c="":(c=c.trim(),""!=c&&";"!=c[c.length-1]&&(c+=";")),""!=d&&(d=" "+d),a(this).attr("style",c+d))}})})})(jQuery)}ai_adb_detection_type_log=function(a){var c=ai_adb_detection_type(a),b=jQuery("#ai-adb-events");if(0!=b.count){var d=b.text();b.text((""!=d?d+", ":d+", EVENTS: ")+a)}return c};
8
  ai_adb_detection_type=function(a){return""};
9
- 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-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=function(a){ai_adb_active||(ai_adb_active=!0,function(a){a(window).ready(function(){do{var c=
10
- !1;a(".ai-adb-hide").each(function(){a(this).css({display:"none",visibility:"hidden"});a(this).removeClass("ai-adb-hide");var c=a(this).closest("div[data-ai]");if("undefined"!=typeof c.attr("data-ai")){var b=JSON.parse(b64d(c.attr("data-ai")));"undefined"!==typeof b&&b.constructor===Array&&(b[1]="",c.attr("data-ai",b64e(JSON.stringify(b))))}ai_disable_processing(a(this))});a(".ai-adb-show").each(function(){a(this).css({display:"block",visibility:"visible"});a(this).removeClass("ai-adb-show");if("undefined"!=
11
- typeof a(this).data("code")){var b=b64d(a(this).data("code"));a(this).append(b);c=!0;"function"==typeof ai_process_elements&&ai_process_elements()}b=a(this).attr("data-ai-tracking");if("undefined"!=typeof b){var d=a(this).closest("div[data-ai]");if("undefined"!=typeof d.attr("data-ai")){if(a(this).hasClass("ai-no-tracking")){var e=JSON.parse(b64d(d.attr("data-ai")));"undefined"!==typeof e&&e.constructor===Array&&(e[1]="",b=b64e(JSON.stringify(e)))}d.attr("data-ai",b)}}})}while(c);setTimeout(ai_adb_process_content,
12
  10)});if(0!=ai_adb_page_views){var b=1,c=AiCookies.get(ai_adb_pgv_cookie_name);"undefined"!=typeof c&&(b=parseInt(c)+1);if(b<=ai_adb_page_views){AiCookies.set(ai_adb_pgv_cookie_name,b,{expires:365,path:"/"});window.ai_d1=b;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{c=AiCookies.get(ai_adb_act_cookie_name);if("undefined"!=typeof c&&"AI_CONST_AI_ADB_COOKIE_VALUE"==
13
  c){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,ai_dummy++,window.AI_ADB_STATUS_MESSAGE=6):(window.AI_ADB_STATUS_MESSAGE=3,ai_dummy=13);switch(ai_adb_action){case 1:ai_adb_message_undismissible||(ai_adb_overlay.click(function(){a(this).remove();ai_adb_message_window.remove()}).css("cursor","pointer"),ai_adb_message_window.click(function(){a(this).remove();ai_adb_overlay.remove()}).css("cursor",
14
  "pointer"),window.onkeydown=function(a){27===a.keyCode&&(ai_adb_overlay.click(),ai_adb_message_window.click())});a("body").prepend(ai_adb_overlay).prepend(ai_adb_message_window);break;case 2:""!=ai_adb_redirection_url&&(b=!0,"http"==ai_adb_redirection_url.toLowerCase().substring(0,4)?window.location.href==ai_adb_redirection_url&&(b=!1):window.location.pathname==ai_adb_redirection_url&&(b=!1),b?(c=AiCookies.get(ai_adb_page_redirection_cookie_name),"undefined"==typeof c&&(b=new Date,b.setTime(b.getTime()+
15
  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=!0)},ai_adb_undetected=function(a){ai_adb_counter++;ai_adb_active||4!=ai_adb_counter||(ai_adb=!1,jQuery(".ai-adb-hide").each(function(){if(0==jQuery(this).outerHeight()&&0==jQuery(this).closest(".ai-adb-show").length){var a=jQuery(this).closest("div[data-ai]");if("undefined"!=
16
  typeof a.attr("data-ai")){var b=JSON.parse(b64d(a.attr("data-ai")));"undefined"!==typeof b&&b.constructor===Array&&(b[1]="",a.attr("data-ai",b64e(JSON.stringify(b))),a.addClass("ai-viewport-0").css("display","none"))}}}),jQuery(".ai-adb-show").each(function(){ai_disable_processing(jQuery(this))}),window.AI_ADB_STATUS_MESSAGE=4,ai_dummy=14)};AI_DBG_AI_DEBUG_AD_BLOCKING&&jQuery(document).ready(function(){ai_adb_detected(0)});
17
- jQuery(document).ready(function(a){a(window).ready(function(){var c="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||c)&&""!=ai_adb_selectors){var b=0,d=0,e=ai_adb_selectors.split(",");a.each(e,function(f){e[f]=e[f].trim();0!=a(e[f]).length&&a(e[f]).each(function(e){var f=a(this).outerHeight();
18
- e=a(this).find(".ai-attributes");e.length&&e.each(function(){f>=a(this).outerHeight()&&(f-=a(this).outerHeight())});b++;if(0===f&&(a(document).ready(function(){ai_adb_active&&!c||ai_adb_detected(4)}),d++,!c))return!1})});0!=b&&0==d&&a(document).ready(function(){ai_adb_undetected(4)})}})});
19
- jQuery(window).on("load",function(){setTimeout(function(){var a="undefined"!==typeof ai_adb_fe_dbg;jQuery("#ai-adb-ads").length&&(document.getElementById("AI_CONST_AI_ADB_1_NAME")?ai_adb_undetected(1):ai_adb_active&&!a||ai_adb_detected(1));jQuery("#ai-adb-ga").length&&("function"==typeof ga&&30<ga.toString().length||"function"==typeof __gaTracker&&30<__gaTracker.toString().length?ai_adb_undetected(5):ai_adb_active&&!a||ai_adb_detected(5));jQuery("#ai-adb-sponsors").length&&("undefined"==typeof window.AI_CONST_AI_ADB_2_NAME?
20
- (!ai_adb_active||a)&&ai_adb_detected(2):ai_adb_undetected(2));jQuery("#banner-advert-container").length&&0<jQuery("#banner-advert-container img").length&&(0===jQuery("#banner-advert-container img").outerHeight()?(!ai_adb_active||a)&&ai_adb_detected(3):ai_adb_undetected(3),jQuery("#banner-advert-container img").remove());jQuery("#ai-adb-mn").length&&("object"==typeof _mNDetails&&400<JSON.stringify(_mNDetails).length?ai_adb_undetected(6):ai_adb_active&&!a||ai_adb_detected(6))},120)});
 
 
 
1
  var ai_adb=!0,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_FUNCT_GET_DELAY_ACTION,ai_adb_selectors="AI_ADB_SELECTORS",ai_adb_redirection_url=
2
  "AI_ADB_REDIRECTION_PAGE";
3
  function ai_adb_process_content(){(function(a){a(".AI_ADB_CONTENT_CSS_BEGIN_CLASS").each(function(){var c=a(this).parent(),b=a(this).data("css");"undefined"==typeof b&&(b="display: none !important;");var d=a(this).data("selectors");if("undefined"==typeof d||""==d)d="p";var e=!1;a(c).find(".AI_ADB_CONTENT_CSS_BEGIN_CLASS, .AI_ADB_CONTENT_CSS_END_CLASS, "+d).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_CSS_BEGIN_CLASS"))a(this).remove(),e=!0;else if(a(this).hasClass("AI_ADB_CONTENT_CSS_END_CLASS"))a(this).remove(),e=
5
  (a(this).remove(),d=!1):d&&a(this).remove()})});a(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS").each(function(){var c=a(this).parent(),b=a(this).data("text");"undefined"==typeof b&&(b="");var d=a(this).data("css");"undefined"==typeof d&&(d="");var e=a(this).data("selectors");if("undefined"==typeof e||""==e)e="p";var f=!1;a(c).find(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS, .AI_ADB_CONTENT_REPLACE_END_CLASS, "+e).each(function(){if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_BEGIN_CLASS"))a(this).remove(),f=!0;else if(a(this).hasClass("AI_ADB_CONTENT_REPLACE_END_CLASS"))a(this).remove(),
6
  f=!1;else if(f){if(0!=b.length){var c=Math.round(a(this).text().length/(b.length+1));a(this).text(Array(c+1).join(b+" ").trim())}else a(this).text("");""!=d&&(c=a(this).attr("style"),"undefined"==typeof c?c="":(c=c.trim(),""!=c&&";"!=c[c.length-1]&&(c+=";")),""!=d&&(d=" "+d),a(this).attr("style",c+d))}})})})(jQuery)}ai_adb_detection_type_log=function(a){var c=ai_adb_detection_type(a),b=jQuery("#ai-adb-events");if(0!=b.count){var d=b.text();b.text((""!=d?d+", ":d+", EVENTS: ")+a)}return c};
7
  ai_adb_detection_type=function(a){return""};
8
+ 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-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=function(a){ai_adb_active||(ai_adb_active=!0,function(a){a(window).ready(function(){do{var b=
9
+ !1;a(".ai-adb-hide").each(function(){a(this).css({display:"none",visibility:"hidden"});a(this).removeClass("ai-adb-hide");var b=a(this).closest("div[data-ai]");if("undefined"!=typeof b.attr("data-ai")){var c=JSON.parse(b64d(b.attr("data-ai")));"undefined"!==typeof c&&c.constructor===Array&&(c[1]="",b.attr("data-ai",b64e(JSON.stringify(c))))}ai_disable_processing(a(this))});a(".ai-adb-show").each(function(){a(this).css({display:"block",visibility:"visible"});a(this).removeClass("ai-adb-show");if("undefined"!=
10
+ typeof a(this).data("code")){var c=b64d(a(this).data("code"));a(this).append(c);b=!0;"function"==typeof ai_process_elements&&ai_process_elements()}c=a(this).attr("data-ai-tracking");if("undefined"!=typeof c){var d=a(this).closest("div[data-ai]");if("undefined"!=typeof d.attr("data-ai")){if(a(this).hasClass("ai-no-tracking")){var e=JSON.parse(b64d(d.attr("data-ai")));"undefined"!==typeof e&&e.constructor===Array&&(e[1]="",c=b64e(JSON.stringify(e)))}d.attr("data-ai",c)}}})}while(b);setTimeout(ai_adb_process_content,
11
  10)});if(0!=ai_adb_page_views){var b=1,c=AiCookies.get(ai_adb_pgv_cookie_name);"undefined"!=typeof c&&(b=parseInt(c)+1);if(b<=ai_adb_page_views){AiCookies.set(ai_adb_pgv_cookie_name,b,{expires:365,path:"/"});window.ai_d1=b;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{c=AiCookies.get(ai_adb_act_cookie_name);if("undefined"!=typeof c&&"AI_CONST_AI_ADB_COOKIE_VALUE"==
12
  c){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,ai_dummy++,window.AI_ADB_STATUS_MESSAGE=6):(window.AI_ADB_STATUS_MESSAGE=3,ai_dummy=13);switch(ai_adb_action){case 1:ai_adb_message_undismissible||(ai_adb_overlay.click(function(){a(this).remove();ai_adb_message_window.remove()}).css("cursor","pointer"),ai_adb_message_window.click(function(){a(this).remove();ai_adb_overlay.remove()}).css("cursor",
13
  "pointer"),window.onkeydown=function(a){27===a.keyCode&&(ai_adb_overlay.click(),ai_adb_message_window.click())});a("body").prepend(ai_adb_overlay).prepend(ai_adb_message_window);break;case 2:""!=ai_adb_redirection_url&&(b=!0,"http"==ai_adb_redirection_url.toLowerCase().substring(0,4)?window.location.href==ai_adb_redirection_url&&(b=!1):window.location.pathname==ai_adb_redirection_url&&(b=!1),b?(c=AiCookies.get(ai_adb_page_redirection_cookie_name),"undefined"==typeof c&&(b=new Date,b.setTime(b.getTime()+
14
  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=!0)},ai_adb_undetected=function(a){ai_adb_counter++;ai_adb_active||4!=ai_adb_counter||(ai_adb=!1,jQuery(".ai-adb-hide").each(function(){if(0==jQuery(this).outerHeight()&&0==jQuery(this).closest(".ai-adb-show").length){var a=jQuery(this).closest("div[data-ai]");if("undefined"!=
15
  typeof a.attr("data-ai")){var b=JSON.parse(b64d(a.attr("data-ai")));"undefined"!==typeof b&&b.constructor===Array&&(b[1]="",a.attr("data-ai",b64e(JSON.stringify(b))),a.addClass("ai-viewport-0").css("display","none"))}}}),jQuery(".ai-adb-show").each(function(){ai_disable_processing(jQuery(this))}),window.AI_ADB_STATUS_MESSAGE=4,ai_dummy=14)};AI_DBG_AI_DEBUG_AD_BLOCKING&&jQuery(document).ready(function(){ai_adb_detected(0)});
16
+ 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,b=0,d=ai_adb_selectors.split(",");a.each(d,function(e){d[e]=d[e].trim();0!=a(d[e]).length&&a(d[e]).each(function(d){var e=
17
+ a(this).outerHeight();d=a(this).find(".ai-attributes");d.length&&d.each(function(){e>=a(this).outerHeight()&&(e-=a(this).outerHeight())});c++;if(0===e&&(a(document).ready(function(){ai_adb_active&&!ai_debugging_active||ai_adb_detected(4)}),b++,!ai_debugging_active))return!1})});0!=c&&0==b&&a(document).ready(function(){ai_adb_undetected(4)})}})});
18
+ function ai_adb_get_script(a,c){var b=document.createElement("script");b.src="ai-adb-url"+a+".js?ver="+(new Date).getTime();var d=document.getElementsByTagName("head")[0],e=!1;b.onerror=function(){c&&c();b.onerror=null;d.removeChild(b)};b.onload=b.onreadystatechange=function(){e||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(e=!0,c&&c(),b.onload=b.onreadystatechange=null,d.removeChild(b))};d.appendChild(b)}
19
+ 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)}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",
20
+ a));jQuery(b64d("I2FpLWFkYi1nYQ==")).length&&("function"==typeof ga&&30<ga.toString().length||"function"==typeof __gaTracker&&30<__gaTracker.toString().length?ai_adb_undetected(5):ai_adb_active&&!b||ai_adb_detected(5));jQuery(b64d("I2FpLWFkYi1zcG9uc29ycw==")).length&&("undefined"==typeof window.AI_CONST_AI_ADB_2_NAME?ai_adb_get_script("sponsors",c):c());var d=b64d("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVy"),e=b64d("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVyIGltZw==");jQuery(d).length&&0<jQuery(e).length&&(0===jQuery(e).outerHeight()?
21
+ (!ai_adb_active||b)&&ai_adb_detected(3):ai_adb_undetected(3),jQuery(e).remove());jQuery(b64d("I2FpLWFkYi1tbg==")).length&&("object"==typeof _mNDetails&&400<JSON.stringify(_mNDetails).length?ai_adb_undetected(6):ai_adb_active&&!b||ai_adb_detected(6))},120)});
includes/js/ai-base64.js CHANGED
@@ -1,8 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  b64e = function (str) {
2
  // first we use encodeURIComponent to get percent-encoded UTF-8,
3
  // then we convert the percent encodings into raw bytes which
4
  // can be fed into btoa.
5
- return btoa(encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
 
6
  function toSolidBytes (match, p1) {
7
  return String.fromCharCode ('0x' + p1);
8
  }));
@@ -10,6 +26,7 @@ b64e = function (str) {
10
 
11
  b64d = function (str) {
12
  // Going backwards: from bytestream, to percent-encoding, to original string.
 
13
  return decodeURIComponent (atob (str).split ('').map (function(c) {
14
  return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
15
  }).join (''));
1
+ function b2a (a) {
2
+ var c, d, e, f, g, h, i, j, o, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = 0, l = 0, m = "", n = [];
3
+ if (!a) return a;
4
+ do c = a.charCodeAt(k++), d = a.charCodeAt(k++), e = a.charCodeAt(k++), j = c << 16 | d << 8 | e,
5
+ f = 63 & j >> 18, g = 63 & j >> 12, h = 63 & j >> 6, i = 63 & j, n[l++] = b.charAt(f) + b.charAt(g) + b.charAt(h) + b.charAt(i); while (k < a.length);
6
+ return m = n.join(""), o = a.length % 3, (o ? m.slice(0, o - 3) :m) + "===".slice(o || 3);
7
+ }
8
+
9
+ function a2b (a) {
10
+ var b, c, d, e = {}, f = 0, g = 0, h = "", i = String.fromCharCode, j = a.length;
11
+ for (b = 0; 64 > b; b++) e["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(b)] = b;
12
+ for (c = 0; j > c; c++) for (b = e[a.charAt(c)], f = (f << 6) + b, g += 6; g >= 8; ) ((d = 255 & f >>> (g -= 8)) || j - 2 > c) && (h += i(d));
13
+ return h;
14
+ }
15
+
16
  b64e = function (str) {
17
  // first we use encodeURIComponent to get percent-encoded UTF-8,
18
  // then we convert the percent encodings into raw bytes which
19
  // can be fed into btoa.
20
+ // return btoa (encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
21
+ return btoa (encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
22
  function toSolidBytes (match, p1) {
23
  return String.fromCharCode ('0x' + p1);
24
  }));
26
 
27
  b64d = function (str) {
28
  // Going backwards: from bytestream, to percent-encoding, to original string.
29
+ // return decodeURIComponent (atob (str).split ('').map (function(c) {
30
  return decodeURIComponent (atob (str).split ('').map (function(c) {
31
  return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
32
  }).join (''));
includes/js/ai-base64.min.js CHANGED
@@ -1 +1,3 @@
1
- b64e=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,b){return String.fromCharCode("0x"+b)}))};b64d=function(a){return decodeURIComponent(atob(a).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};
 
 
1
+ function b2a(a){var b,c=0,l=0,f="",g=[];if(!a)return a;do{var e=a.charCodeAt(c++);var h=a.charCodeAt(c++);var k=a.charCodeAt(c++);var d=e<<16|h<<8|k;e=63&d>>18;h=63&d>>12;k=63&d>>6;d&=63;g[l++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)}while(c<
2
+ a.length);return f=g.join(""),b=a.length%3,(b?f.slice(0,b-3):f)+"===".slice(b||3)}function a2b(a){var b,c,l,f={},g=0,e=0,h="",k=String.fromCharCode,d=a.length;for(b=0;64>b;b++)f["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(b)]=b;for(c=0;d>c;c++)for(b=f[a.charAt(c)],g=(g<<6)+b,e+=6;8<=e;)((l=255&g>>>(e-=8))||d-2>c)&&(h+=k(l));return h}b64e=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(b,a){return String.fromCharCode("0x"+a)}))};
3
+ b64d=function(a){return decodeURIComponent(atob(a).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};
includes/js/ai-lists.js CHANGED
@@ -7,22 +7,22 @@ jQuery (function ($) {
7
  }
8
  }
9
 
10
- function b64e (str) {
11
- // first we use encodeURIComponent to get percent-encoded UTF-8,
12
- // then we convert the percent encodings into raw bytes which
13
- // can be fed into btoa.
14
- return btoa (encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
15
- function toSolidBytes (match, p1) {
16
- return String.fromCharCode ('0x' + p1);
17
- }));
18
- }
19
-
20
- function b64d (str) {
21
- // Going backwards: from bytestream, to percent-encoding, to original string.
22
- return decodeURIComponent (atob (str).split ('').map (function(c) {
23
- return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
24
- }).join (''));
25
- }
26
 
27
  // To prevent replacement of regexp pattern with CDN url (CDN code bug)
28
  var host_regexp = new RegExp (':' + '\\/' + '\\/(.[^/:]+)', 'i');
@@ -63,7 +63,7 @@ jQuery (function ($) {
63
  ai_list_blocks.removeClass ('ai-list-data');
64
 
65
  var ai_debug = typeof ai_debugging !== 'undefined'; // 1
66
- // var ai_debug = false;
67
 
68
  var cookies = document.cookie.split (";");
69
 
@@ -92,8 +92,6 @@ jQuery (function ($) {
92
 
93
  var enable_block = true;
94
 
95
- var found = false;
96
-
97
  var referer_list = $(this).attr ("referer-list");
98
  if (typeof referer_list != "undefined") {
99
  var referer_list_array = b64d (referer_list).split (",");
@@ -102,6 +100,7 @@ jQuery (function ($) {
102
  if (ai_debug) console.log ("AI LISTS referer: ", referrer);
103
  if (ai_debug) console.log ("AI LISTS referer list:", b64d (referer_list), referers_list_type);
104
 
 
105
  $.each (referer_list_array, function (index, list_referer) {
106
  if (list_referer == '') return true;
107
 
@@ -160,8 +159,7 @@ jQuery (function ($) {
160
  if (ai_debug) console.log ("AI LISTS client: ", window.navigator.userAgent);
161
  if (ai_debug) console.log ("AI LISTS client list:", b64d (client_list), clients_list_type);
162
 
163
-
164
-
165
  $.each (client_list_array, function (index, list_client) {
166
  if (list_client == '') return true;
167
 
@@ -197,7 +195,6 @@ jQuery (function ($) {
197
  if (ai_debug) console.log ("AI LISTS parameter list:", b64d (parameter_list), parameter_list_type);
198
 
199
  var found = false;
200
-
201
  $.each (parameter_list_array, function (index, list_parameter) {
202
 
203
  if (list_parameter.indexOf ('=') != - 1) {
7
  }
8
  }
9
 
10
+ // function b64e (str) {
11
+ // // first we use encodeURIComponent to get percent-encoded UTF-8,
12
+ // // then we convert the percent encodings into raw bytes which
13
+ // // can be fed into btoa.
14
+ // return btoa (encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
15
+ // function toSolidBytes (match, p1) {
16
+ // return String.fromCharCode ('0x' + p1);
17
+ // }));
18
+ // }
19
+
20
+ // function b64d (str) {
21
+ // // Going backwards: from bytestream, to percent-encoding, to original string.
22
+ // return decodeURIComponent (atob (str).split ('').map (function(c) {
23
+ // return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
24
+ // }).join (''));
25
+ // }
26
 
27
  // To prevent replacement of regexp pattern with CDN url (CDN code bug)
28
  var host_regexp = new RegExp (':' + '\\/' + '\\/(.[^/:]+)', 'i');
63
  ai_list_blocks.removeClass ('ai-list-data');
64
 
65
  var ai_debug = typeof ai_debugging !== 'undefined'; // 1
66
+ // var ai_debug = false;
67
 
68
  var cookies = document.cookie.split (";");
69
 
92
 
93
  var enable_block = true;
94
 
 
 
95
  var referer_list = $(this).attr ("referer-list");
96
  if (typeof referer_list != "undefined") {
97
  var referer_list_array = b64d (referer_list).split (",");
100
  if (ai_debug) console.log ("AI LISTS referer: ", referrer);
101
  if (ai_debug) console.log ("AI LISTS referer list:", b64d (referer_list), referers_list_type);
102
 
103
+ var found = false;
104
  $.each (referer_list_array, function (index, list_referer) {
105
  if (list_referer == '') return true;
106
 
159
  if (ai_debug) console.log ("AI LISTS client: ", window.navigator.userAgent);
160
  if (ai_debug) console.log ("AI LISTS client list:", b64d (client_list), clients_list_type);
161
 
162
+ found = false;
 
163
  $.each (client_list_array, function (index, list_client) {
164
  if (list_client == '') return true;
165
 
195
  if (ai_debug) console.log ("AI LISTS parameter list:", b64d (parameter_list), parameter_list_type);
196
 
197
  var found = false;
 
198
  $.each (parameter_list_array, function (index, list_parameter) {
199
 
200
  if (list_parameter.indexOf ('=') != - 1) {
includes/js/ai-lists.min.js CHANGED
@@ -1,11 +1,10 @@
1
- jQuery(function(a){function e(a){return decodeURIComponent(atob(a).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function n(a){a=a.match(h);return null!=a&&1<a.length&&"string"===typeof a[1]&&0<a[1].length?a[1].toLowerCase():null}function k(a){try{var b=Date.parse(a);isNaN(b)&&(b=null)}catch(w){b=null}return b}Array.prototype.includes||(Array.prototype.includes=function(a){return!!~this.indexOf(a)});var h=/:\/\/(.[^/:]+)/i;ai_process_lists=function(b){b=
2
- null==b?a("div.ai-list-data"):b.filter(".ai-list-data");if(b.length){b.removeClass("ai-list-data");var r=document.cookie.split(";");r.forEach(function(a,c){r[c]=a.trim()});var h=getAllUrlParams(window.location.search);if(null!=h.referrer)var m=h.referrer;else m=document.referrer,""!=m&&(m=n(m));if("undefined"!==typeof MobileDetect)var u=new MobileDetect(window.navigator.userAgent);b.each(function(){var b=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),c=!0,f=!1,d=a(this).attr("referer-list");
3
- if("undefined"!=typeof d){d=e(d).split(",");var g=a(this).attr("referer-list-type");a.each(d,function(a,b){if(""==b)return!0;if("*"==b.charAt(0))if("*"==b.charAt(b.length-1)){if(b=b.substr(1,b.length-2),-1!=m.indexOf(b))return f=!0,!1}else{if(b=b.substr(1),m.substr(-b.length)==b)return f=!0,!1}else if("*"==b.charAt(b.length-1)){if(b=b.substr(0,b.length-1),0==m.indexOf(b))return f=!0,!1}else if("#"==b){if(""==m)return f=!0,!1}else if(b==m)return f=!0,!1});switch(g){case "B":f&&(c=!1);break;case "W":f||
4
- (c=!1)}}d=a(this).attr("client-list");if("undefined"!=typeof d&&"undefined"!==typeof u)switch(d=e(d).split(","),g=a(this).attr("client-list-type"),a.each(d,function(a,b){if(""==b)return!0;if(u.is(b))return f=!0,!1}),g){case "B":f&&(c=!1);break;case "W":f||(c=!1)}if(c&&(d=a(this).attr("parameter-list"),"undefined"!=typeof d))switch(d=e(d).split(","),g=a(this).attr("parameter-list-type"),f=!1,a.each(d,function(a,b){if(-1!=b.indexOf("=")){if(-1!=r.indexOf(b))return f=!0,!1}else r.forEach(function(a){a=
5
- a.split("=");if(b==a[0])return f=!0,!1})}),g){case "B":f&&(c=!1);break;case "W":f||(c=!1)}var l=a(this).prevAll(".ai-debug-bar.ai-debug-lists");d=""==m?"#":m;l.find(".ai-debug-name.ai-list-info").text(d).attr("title",window.navigator.userAgent);l.find(".ai-debug-name.ai-list-status").text(c?ai_front.visible:ai_front.hidden);d=!1;if(c){var h=a(this).attr("scheduling-start");l=a(this).attr("scheduling-end");var p=a(this).attr("scheduling-days");if("undefined"!=typeof h&&"undefined"!=typeof l&&"undefined"!=
6
- typeof p){d=!0;var n=parseInt(a(this).attr("scheduling-fallback"));g=parseInt(a(this).attr("gmt"));var q=k(e(h))+g;l=k(e(l))+g;h=e(p).split(",");p=a(this).attr("scheduling-type");var t=(new Date).getTime()+g,v=new Date(t);g=v.getDay();0==g?g=6:g--;q=t>=q&&t<l&&h.includes(g.toString());switch(p){case "B":q=!q}q||(c=!1);p=v.toISOString().split(".")[0].replace("T"," ");l=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");l.find(".ai-debug-name.ai-scheduling-info").text(p+" "+g);l.find(".ai-debug-name.ai-scheduling-status").text(c?
7
- ai_front.visible:ai_front.hidden);c||0==n||(l.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),l.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+n))}}a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});c?(b.css({visibility:""}),b.hasClass("ai-remove-position")&&b.css({position:""}),"undefined"!=typeof a(this).data("code")&&(c=e(a(this).data("code")),a(this).append(c),ai_process_element(this))):d&&!q&&0!=n?(b.css({visibility:""}),b.hasClass("ai-remove-position")&&
8
- b.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(c=e(a(this).data("fallback-code")),a(this).append(c),ai_process_element(this)):a(this).hide(),c=b.attr("data-ai"),"undefined"!==typeof c&&!1!==c&&(c=a(this).attr("fallback-tracking"),"undefined"!==typeof c&&!1!==c&&b.attr("data-ai",c))):(a(this).hide(),b.removeAttr("data-ai").removeClass("ai-track"),b.find(".ai-debug-block").length?(b.css({visibility:""}).removeClass("ai-close"),
9
- b.hasClass("ai-remove-position")&&b.css({position:""})):b.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");b.removeClass("ai-list-block")})}};a(document).ready(function(a){setTimeout(function(){ai_process_lists()},5)})});
10
- function ai_process_element(a){setTimeout(function(){"function"==typeof ai_process_rotations_in_element&&ai_process_rotations_in_element(a);"function"==typeof ai_process_lists&&ai_process_lists(jQuery("div.ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data",a))},5)}
11
- function getAllUrlParams(a){var e=a?a.split("?")[1]:window.location.search.slice(1);a={};if(e){e=e.split("#")[0];e=e.split("&");for(var n=0;n<e.length;n++){var k=e[n].split("="),h=void 0,b=k[0].replace(/\[\d*\]/,function(a){h=a.slice(1,-1);return""});k="undefined"===typeof k[1]?"":k[1];b=b.toLowerCase();k=k.toLowerCase();a[b]?("string"===typeof a[b]&&(a[b]=[a[b]]),"undefined"===typeof h?a[b].push(k):a[b][h]=k):a[b]=k}}return a};
1
+ jQuery(function(a){function h(a){a=a.match(b);return null!=a&&1<a.length&&"string"===typeof a[1]&&0<a[1].length?a[1].toLowerCase():null}function p(a){try{var d=Date.parse(a);isNaN(d)&&(d=null)}catch(m){d=null}return d}Array.prototype.includes||(Array.prototype.includes=function(a){return!!~this.indexOf(a)});var b=/:\/\/(.[^/:]+)/i;ai_process_lists=function(b){b=null==b?a("div.ai-list-data"):b.filter(".ai-list-data");if(b.length){b.removeClass("ai-list-data");var d=document.cookie.split(";");d.forEach(function(a,
2
+ c){d[c]=a.trim()});var m=getAllUrlParams(window.location.search);if(null!=m.referrer)var l=m.referrer;else l=document.referrer,""!=l&&(l=h(l));if("undefined"!==typeof MobileDetect)var n=new MobileDetect(window.navigator.userAgent);b.each(function(){var b=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),c=!0,e=a(this).attr("referer-list");if("undefined"!=typeof e){e=b64d(e).split(",");var g=a(this).attr("referer-list-type"),f=!1;a.each(e,function(a,b){if(""==b)return!0;if("*"==b.charAt(0))if("*"==
3
+ b.charAt(b.length-1)){if(b=b.substr(1,b.length-2),-1!=l.indexOf(b))return f=!0,!1}else{if(b=b.substr(1),l.substr(-b.length)==b)return f=!0,!1}else if("*"==b.charAt(b.length-1)){if(b=b.substr(0,b.length-1),0==l.indexOf(b))return f=!0,!1}else if("#"==b){if(""==l)return f=!0,!1}else if(b==l)return f=!0,!1});switch(g){case "B":f&&(c=!1);break;case "W":f||(c=!1)}}e=a(this).attr("client-list");if("undefined"!=typeof e&&"undefined"!==typeof n)switch(e=b64d(e).split(","),g=a(this).attr("client-list-type"),
4
+ f=!1,a.each(e,function(a,b){if(""==b)return!0;if(n.is(b))return f=!0,!1}),g){case "B":f&&(c=!1);break;case "W":f||(c=!1)}if(c&&(e=a(this).attr("parameter-list"),"undefined"!=typeof e))switch(e=b64d(e).split(","),g=a(this).attr("parameter-list-type"),f=!1,a.each(e,function(a,b){if(-1!=b.indexOf("=")){if(-1!=d.indexOf(b))return f=!0,!1}else d.forEach(function(a){a=a.split("=");if(b==a[0])return f=!0,!1})}),g){case "B":f&&(c=!1);break;case "W":f||(c=!1)}var k=a(this).prevAll(".ai-debug-bar.ai-debug-lists");
5
+ e=""==l?"#":l;k.find(".ai-debug-name.ai-list-info").text(e).attr("title",window.navigator.userAgent);k.find(".ai-debug-name.ai-list-status").text(c?ai_front.visible:ai_front.hidden);e=!1;if(c){var h=a(this).attr("scheduling-start");k=a(this).attr("scheduling-end");var q=a(this).attr("scheduling-days");if("undefined"!=typeof h&&"undefined"!=typeof k&&"undefined"!=typeof q){e=!0;var m=parseInt(a(this).attr("scheduling-fallback"));g=parseInt(a(this).attr("gmt"));var r=p(b64d(h))+g;k=p(b64d(k))+g;h=b64d(q).split(",");
6
+ q=a(this).attr("scheduling-type");var t=(new Date).getTime()+g,u=new Date(t);g=u.getDay();0==g?g=6:g--;r=t>=r&&t<k&&h.includes(g.toString());switch(q){case "B":r=!r}r||(c=!1);q=u.toISOString().split(".")[0].replace("T"," ");k=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");k.find(".ai-debug-name.ai-scheduling-info").text(q+" "+g);k.find(".ai-debug-name.ai-scheduling-status").text(c?ai_front.visible:ai_front.hidden);c||0==m||(k.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),
7
+ k.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+m))}}a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});c?(b.css({visibility:""}),b.hasClass("ai-remove-position")&&b.css({position:""}),"undefined"!=typeof a(this).data("code")&&(c=b64d(a(this).data("code")),a(this).append(c),ai_process_element(this))):e&&!r&&0!=m?(b.css({visibility:""}),b.hasClass("ai-remove-position")&&b.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=
8
+ typeof a(this).data("fallback-code")?(c=b64d(a(this).data("fallback-code")),a(this).append(c),ai_process_element(this)):a(this).hide(),c=b.attr("data-ai"),"undefined"!==typeof c&&!1!==c&&(c=a(this).attr("fallback-tracking"),"undefined"!==typeof c&&!1!==c&&b.attr("data-ai",c))):(a(this).hide(),b.removeAttr("data-ai").removeClass("ai-track"),b.find(".ai-debug-block").length?(b.css({visibility:""}).removeClass("ai-close"),b.hasClass("ai-remove-position")&&b.css({position:""})):b.hide());a(this).attr("data-code",
9
+ "");a(this).attr("data-fallback-code","");b.removeClass("ai-list-block")})}};a(document).ready(function(a){setTimeout(function(){ai_process_lists()},5)})});function ai_process_element(a){setTimeout(function(){"function"==typeof ai_process_rotations_in_element&&ai_process_rotations_in_element(a);"function"==typeof ai_process_lists&&ai_process_lists(jQuery("div.ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data",a))},5)}
10
+ function getAllUrlParams(a){var h=a?a.split("?")[1]:window.location.search.slice(1);a={};if(h){h=h.split("#")[0];h=h.split("&");for(var p=0;p<h.length;p++){var b=h[p].split("="),n=void 0,d=b[0].replace(/\[\d*\]/,function(a){n=a.slice(1,-1);return""});b="undefined"===typeof b[1]?"":b[1];d=d.toLowerCase();b=b.toLowerCase();a[d]?("string"===typeof a[d]&&(a[d]=[a[d]]),"undefined"===typeof n?a[d].push(b):a[d][n]=b):a[d]=b}}return a};
 
includes/js/ai-rotate.js CHANGED
@@ -1,21 +1,21 @@
1
  jQuery (function ($) {
2
 
3
- function b64e (str) {
4
- // first we use encodeURIComponent to get percent-encoded UTF-8,
5
- // then we convert the percent encodings into raw bytes which
6
- // can be fed into btoa.
7
- return btoa(encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
8
- function toSolidBytes (match, p1) {
9
- return String.fromCharCode ('0x' + p1);
10
- }));
11
- }
12
-
13
- function b64d (str) {
14
- // Going backwards: from bytestream, to percent-encoding, to original string.
15
- return decodeURIComponent (atob (str).split ('').map (function(c) {
16
- return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
17
- }).join (''));
18
- }
19
 
20
  var ai_rotation_triggers = new Array ();
21
 
1
  jQuery (function ($) {
2
 
3
+ // function b64e (str) {
4
+ // // first we use encodeURIComponent to get percent-encoded UTF-8,
5
+ // // then we convert the percent encodings into raw bytes which
6
+ // // can be fed into btoa.
7
+ // return btoa(encodeURIComponent (str).replace (/%([0-9A-F]{2})/g,
8
+ // function toSolidBytes (match, p1) {
9
+ // return String.fromCharCode ('0x' + p1);
10
+ // }));
11
+ // }
12
+
13
+ // function b64d (str) {
14
+ // // Going backwards: from bytestream, to percent-encoding, to original string.
15
+ // return decodeURIComponent (atob (str).split ('').map (function(c) {
16
+ // return '%' + ('00' + c.charCodeAt (0).toString (16)).slice (-2);
17
+ // }).join (''));
18
+ // }
19
 
20
  var ai_rotation_triggers = new Array ();
21
 
includes/js/ai-rotate.min.js CHANGED
@@ -1,9 +1,8 @@
1
- jQuery(function(a){function r(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,b){return String.fromCharCode("0x"+b)}))}function l(a){return decodeURIComponent(atob(a).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function t(){a("div.ai-rotate.ai-rotation-groups").each(function(b,k){a(this).addClass("ai-timer");ai_process_rotation(this)})}var m=[];ai_process_rotation=function(b){if(a(b).hasClass("ai-unprocessed")||a(b).hasClass("ai-timer"))if(a(b).removeClass("ai-unprocessed").removeClass("ai-timer"),
2
- m.includes(b.selector)&&m.splice(m.indexOf(b.selector),1),"number"==typeof b.length)for(var k=0;k<b.length;k++)0==k?ai_process_single_rotation(b[k],!0):ai_process_single_rotation(b[k],!1);else ai_process_single_rotation(b,!0)};ai_process_single_rotation=function(b,k){var h=a(b).children(".ai-rotate-option");if(0!=h.length){h.hide();if("undefined"==typeof a(b).data("next"))if("undefined"!=typeof a(h[0]).data("group")){var g=-1,q=[];a("span[data-ai-groups]").each(function(b){(a(this)[0].offsetWidth||
3
- a(this)[0].offsetHeight||a(this)[0].getClientRects().length)&&q.push(this)});1<=q.length&&JSON.parse(l(a(q).first().data("ai-groups"))).forEach(function(b,c){-1==g&&h.each(function(c){if(l(a(this).data("group"))==b)return g=c,!1})})}else{var e=a(b).data("shares");if("string"===typeof e){e=JSON.parse(atob(e));var f=Math.round(100*Math.random());for(var c=0;c<e.length&&(g=c,0>e[c]||!(f<=e[c]));c++);}else g=Math.floor(Math.random()*h.length),(new Date).getMilliseconds()%2&&(g=h.length-g-1)}else g=parseInt(a(b).attr("data-next")),
4
- f=a(h[g]),"undefined"!=typeof f.data("code")&&(f=a(l(f.data("code")))),0!=f.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&&0!=a(".ai-rotation-groups").length&&setTimeout(function(){t()},5);if(!(0>g||g>=h.length)){f=a(h[g]);e="";if("undefined"!=typeof f.data("time")){c=atob(f.data("time"));if(0==c&&1<h.length){var d=g;do{d++;d>=h.length&&(d=0);var n=a(h[d]);if("undefined"==typeof n.data("time")){g=d;f=a(h[g]);c=0;break}n=atob(n.data("time"))}while(0==n&&d!=g);0!=c&&(g=d,f=a(h[g]),
5
- c=atob(f.data("time")))}if(0<c&&(d=g+1,d>=h.length&&(d=0),"undefined"!=typeof a(b).data("info"))){e=JSON.parse(atob(a(b).data("info")))[0];a(b).attr("data-next",d);var p="div.ai-rotate.ai-"+e;m.includes(p)&&(k=!1);k&&(m.push(p),setTimeout(function(){a(p).addClass("ai-timer");ai_process_rotation(a(p))},1E3*c));e=" ("+c+" s)"}}else"undefined"==typeof f.data("group")&&h.each(function(b){b!=g&&a(this).remove()});f.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");
6
- a(b).css({position:""});"undefined"!=typeof f.data("code")&&(h.empty(),c=l(f.data("code")),f.append(c),ai_process_elements());f=l(f.data("name"));d=a(b).closest(".ai-debug-block");0!=d.length&&(c=d.find("kbd.ai-option-name"),d=d.find(".ai-debug-block"),"undefined"!=typeof d&&(d=d.find("kbd.ai-option-name"),c=c.slice(0,c.length-d.length)),"undefined"!=typeof c&&(d=c.first().data("separator"),"undefined"==typeof d&&(d=""),c.html(d+f+e)));c=!1;d=a(b).closest(".ai-adb-show");0!=d.length&&d.attr("data-ai-tracking")&&
7
- (e=JSON.parse(l(d.attr("data-ai-tracking"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,d.attr("data-ai-tracking",r(JSON.stringify(e))),c=!0));c||(c=a(b).closest("div[data-ai]"),"undefined"!=typeof c.attr("data-ai")&&(e=JSON.parse(l(c.attr("data-ai"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,c.attr("data-ai",r(JSON.stringify(e))))))}}};ai_process_rotations=function(){a("div.ai-rotate").each(function(a,k){ai_process_rotation(this)})};ai_process_rotations_in_element=
8
- function(b){a("div.ai-rotate",b).each(function(a,b){ai_process_rotation(this)})};a(document).ready(function(a){setTimeout(function(){ai_process_rotations()},10)})});ai_process_elements_active=!1;
9
- 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("div.ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data"))},5);ai_process_elements_active=!0};
1
+ jQuery(function(a){function q(){a("div.ai-rotate.ai-rotation-groups").each(function(d,k){a(this).addClass("ai-timer");ai_process_rotation(this)})}var l=[];ai_process_rotation=function(d){if(a(d).hasClass("ai-unprocessed")||a(d).hasClass("ai-timer"))if(a(d).removeClass("ai-unprocessed").removeClass("ai-timer"),l.includes(d.selector)&&l.splice(l.indexOf(d.selector),1),"number"==typeof d.length)for(var k=0;k<d.length;k++)0==k?ai_process_single_rotation(d[k],!0):ai_process_single_rotation(d[k],!1);else ai_process_single_rotation(d,
2
+ !0)};ai_process_single_rotation=function(d,k){var h=a(d).children(".ai-rotate-option");if(0!=h.length){h.hide();if("undefined"==typeof a(d).data("next"))if("undefined"!=typeof a(h[0]).data("group")){var g=-1,p=[];a("span[data-ai-groups]").each(function(b){(a(this)[0].offsetWidth||a(this)[0].offsetHeight||a(this)[0].getClientRects().length)&&p.push(this)});1<=p.length&&JSON.parse(b64d(a(p).first().data("ai-groups"))).forEach(function(b,c){-1==g&&h.each(function(c){if(b64d(a(this).data("group"))==b)return g=
3
+ c,!1})})}else{var e=a(d).data("shares");if("string"===typeof e){e=JSON.parse(atob(e));var f=Math.round(100*Math.random());for(var b=0;b<e.length&&(g=b,0>e[b]||!(f<=e[b]));b++);}else g=Math.floor(Math.random()*h.length),(new Date).getMilliseconds()%2&&(g=h.length-g-1)}else g=parseInt(a(d).attr("data-next")),f=a(h[g]),"undefined"!=typeof f.data("code")&&(f=a(b64d(f.data("code")))),0!=f.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&&0!=a(".ai-rotation-groups").length&&setTimeout(function(){q()},
4
+ 5);if(!(0>g||g>=h.length)){f=a(h[g]);e="";if("undefined"!=typeof f.data("time")){b=atob(f.data("time"));if(0==b&&1<h.length){var c=g;do{c++;c>=h.length&&(c=0);var m=a(h[c]);if("undefined"==typeof m.data("time")){g=c;f=a(h[g]);b=0;break}m=atob(m.data("time"))}while(0==m&&c!=g);0!=b&&(g=c,f=a(h[g]),b=atob(f.data("time")))}if(0<b&&(c=g+1,c>=h.length&&(c=0),"undefined"!=typeof a(d).data("info"))){e=JSON.parse(atob(a(d).data("info")))[0];a(d).attr("data-next",c);var n="div.ai-rotate.ai-"+e;l.includes(n)&&
5
+ (k=!1);k&&(l.push(n),setTimeout(function(){a(n).addClass("ai-timer");ai_process_rotation(a(n))},1E3*b));e=" ("+b+" s)"}}else"undefined"==typeof f.data("group")&&h.each(function(b){b!=g&&a(this).remove()});f.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");a(d).css({position:""});"undefined"!=typeof f.data("code")&&(h.empty(),b=b64d(f.data("code")),f.append(b),ai_process_elements());f=b64d(f.data("name"));
6
+ c=a(d).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+f+e)));b=!1;c=a(d).closest(".ai-adb-show");0!=c.length&&c.attr("data-ai-tracking")&&(e=JSON.parse(b64d(c.attr("data-ai-tracking"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,c.attr("data-ai-tracking",
7
+ b64e(JSON.stringify(e))),b=!0));b||(b=a(d).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]=f,b.attr("data-ai",b64e(JSON.stringify(e))))))}}};ai_process_rotations=function(){a("div.ai-rotate").each(function(a,k){ai_process_rotation(this)})};ai_process_rotations_in_element=function(d){a("div.ai-rotate",d).each(function(a,d){ai_process_rotation(this)})};a(document).ready(function(a){setTimeout(function(){ai_process_rotations()},
8
+ 10)})});ai_process_elements_active=!1;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("div.ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data"))},5);ai_process_elements_active=!0};
 
includes/js/ai-wait-jquery.js CHANGED
@@ -2,9 +2,9 @@ function ai_run_scripts () {
2
  AI_JS_CODE=1
3
  }
4
 
5
- function ai_load_translations () {
6
- AI_JS_CODE=2
7
- }
8
 
9
  function ai_wait_for_jquery () {
10
  var ai_debug = typeof ai_debugging !== 'undefined'; // 1
@@ -53,7 +53,7 @@ function ai_wait_for_jquery () {
53
  ai_get_script ('AI_JS_JQUERY1', null);
54
  });
55
 
56
- ai_load_translations ();
57
  }
58
 
59
  if (ai_jquery_waiting_counter < 30) {
2
  AI_JS_CODE=1
3
  }
4
 
5
+ //function ai_load_translations () {
6
+ //AI_JS_CODE=2
7
+ //}
8
 
9
  function ai_wait_for_jquery () {
10
  var ai_debug = typeof ai_debugging !== 'undefined'; // 1
53
  ai_get_script ('AI_JS_JQUERY1', null);
54
  });
55
 
56
+ // ai_load_translations ();
57
  }
58
 
59
  if (ai_jquery_waiting_counter < 30) {
includes/js/ai-wait-jquery.min.js CHANGED
@@ -1,3 +1,3 @@
1
- function ai_run_scripts(){AI_JS_CODE=1}function ai_load_translations(){AI_JS_CODE=2}
2
- function ai_wait_for_jquery(){function b(b,c){var a=document.createElement("script");a.src=b;var d=document.getElementsByTagName("head")[0],e=!1;a.onload=a.onreadystatechange=function(){e||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(e=!0,c&&c(),a.onload=a.onreadystatechange=null,d.removeChild(a))};d.appendChild(a)}window.jQuery?ai_run_scripts():(ai_jquery_waiting_counter++,4==ai_jquery_waiting_counter&&(b("AI_JS_JQUERY0",function(){b("AI_JS_JQUERY1",null)}),ai_load_translations()),
3
- 30>ai_jquery_waiting_counter&&setTimeout(function(){ai_wait_for_jquery()},50))}ai_jquery_waiting_counter=0;ai_wait_for_jquery();
1
+ function ai_run_scripts(){AI_JS_CODE=1}
2
+ function ai_wait_for_jquery(){function b(b,c){var a=document.createElement("script");a.src=b;var d=document.getElementsByTagName("head")[0],e=!1;a.onload=a.onreadystatechange=function(){e||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(e=!0,c&&c(),a.onload=a.onreadystatechange=null,d.removeChild(a))};d.appendChild(a)}window.jQuery?ai_run_scripts():(ai_jquery_waiting_counter++,4==ai_jquery_waiting_counter&&b("AI_JS_JQUERY0",function(){b("AI_JS_JQUERY1",null)}),30>ai_jquery_waiting_counter&&
3
+ setTimeout(function(){ai_wait_for_jquery()},50))}ai_jquery_waiting_counter=0;ai_wait_for_jquery();
includes/preview.php CHANGED
@@ -195,7 +195,8 @@ function generate_code_preview (
195
  echo ".ai-close-show {display: block;}\n";
196
  echo ".ai-close-left {right: unset; left: -10px;}\n";
197
  echo ".ai-close-bottom {top: unset; bottom: -11px;}\n";
198
- echo ".ai-close-fit {width: fit-content; width: -moz-fit-content;}\n";
 
199
  echo "</style>\n";
200
  }
201
  $head_code = ob_get_clean ();
@@ -877,23 +878,23 @@ function generate_code_preview (
877
  $("#close-button-selection").show ();
878
 
879
  var selected_close_button = $("#close-button-0 option:selected").attr('value');
880
- var button_class = 'ai-close-button';
881
 
882
  switch (parseInt (selected_close_button)) {
883
  case AI_CLOSE_NONE:
884
- button_class = 'ai-close-button ai-close-hidden';
885
  break;
886
  case AI_CLOSE_TOP_RIGHT:
887
- button_class = 'ai-close-button';
888
  break;
889
  case AI_CLOSE_TOP_LEFT:
890
- button_class = 'ai-close-button ai-close-left';
891
  break;
892
  case AI_CLOSE_BOTTOM_RIGHT:
893
- button_class = 'ai-close-button ai-close-bottom';
894
  break;
895
  case AI_CLOSE_BOTTOM_LEFT:
896
- button_class = 'ai-close-button ai-close-bottom ai-close-left';
897
  break;
898
  }
899
 
@@ -2393,6 +2394,7 @@ Single pages (posts and static pages) have also additional setting for individua
2393
  <script>
2394
  <?php if (function_exists ('ai_extract_features_2')) echo ai_get_js ('ai-cookie'), ai_get_js ('ai-close'); ?>
2395
  <?php
 
2396
  if ($sticky) echo ai_get_js ('ai-sticky');
2397
  echo ai_get_js ('ai-rotate');
2398
  if (function_exists ('add_footer_inline_scripts_2')) {
195
  echo ".ai-close-show {display: block;}\n";
196
  echo ".ai-close-left {right: unset; left: -10px;}\n";
197
  echo ".ai-close-bottom {top: unset; bottom: -11px;}\n";
198
+ // echo ".ai-close-fit {width: fit-content; width: -moz-fit-content;}\n";
199
+ echo ".ai-close-none {visibility: hidden;}\n";
200
  echo "</style>\n";
201
  }
202
  $head_code = ob_get_clean ();
878
  $("#close-button-selection").show ();
879
 
880
  var selected_close_button = $("#close-button-0 option:selected").attr('value');
881
+ var button_class = 'ai-close-button ai-close-unprocessed';
882
 
883
  switch (parseInt (selected_close_button)) {
884
  case AI_CLOSE_NONE:
885
+ button_class = 'ai-close-button ai-close-unprocessed ai-close-hidden';
886
  break;
887
  case AI_CLOSE_TOP_RIGHT:
888
+ button_class = 'ai-close-button ai-close-unprocessed';
889
  break;
890
  case AI_CLOSE_TOP_LEFT:
891
+ button_class = 'ai-close-button ai-close-unprocessed ai-close-left';
892
  break;
893
  case AI_CLOSE_BOTTOM_RIGHT:
894
+ button_class = 'ai-close-button ai-close-unprocessed ai-close-bottom';
895
  break;
896
  case AI_CLOSE_BOTTOM_LEFT:
897
+ button_class = 'ai-close-button ai-close-unprocessed ai-close-bottom ai-close-left';
898
  break;
899
  }
900
 
2394
  <script>
2395
  <?php if (function_exists ('ai_extract_features_2')) echo ai_get_js ('ai-cookie'), ai_get_js ('ai-close'); ?>
2396
  <?php
2397
+ echo ai_get_js ('ai-base64');
2398
  if ($sticky) echo ai_get_js ('ai-sticky');
2399
  echo ai_get_js ('ai-rotate');
2400
  if (function_exists ('add_footer_inline_scripts_2')) {
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.6.5";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
1
+ var javascript_version = "2.6.6";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
readme.txt CHANGED
@@ -4,9 +4,9 @@ Contributors: adinserter, spacetime
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LHGZEMRTR7WB4
5
  Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection, header code, banners, adverts, sticky fixed widgets, dfp
6
  Requires at least: 4.6
7
- Tested up to: 5.3
8
  Requires PHP: 5.6
9
- Stable tag: 2.6.5
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
@@ -331,6 +331,12 @@ If you are not happy to reveal this information and you have opted in, simply di
331
 
332
  == Changelog ==
333
 
 
 
 
 
 
 
334
  = 2.6.5 =
335
  - Added support for url data shortcode
336
  - Added warning if not all exceptions were cleared
@@ -460,6 +466,12 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
460
 
461
  == Upgrade Notice ==
462
 
 
 
 
 
 
 
463
  = 2.6.5 =
464
  Added support for url data shortcode;
465
  Added warning if not all exceptions were cleared;
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LHGZEMRTR7WB4
5
  Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection, header code, banners, adverts, sticky fixed widgets, dfp
6
  Requires at least: 4.6
7
+ Tested up to: 5.4
8
  Requires PHP: 5.6
9
+ Stable tag: 2.6.6
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
331
 
332
  == Changelog ==
333
 
334
+ = 2.6.6 =
335
+ - Fix for exceptions list not showing all exceptions
336
+ - Improved ad blocking detection
337
+ - Fix for close button in preview window (Pro only)
338
+ - Few minor bug fixes, cosmetic changes and code improvements
339
+
340
  = 2.6.5 =
341
  - Added support for url data shortcode
342
  - Added warning if not all exceptions were cleared
466
 
467
  == Upgrade Notice ==
468
 
469
+ = 2.6.6 =
470
+ Fix for exceptions list not showing all exceptions;
471
+ Improved ad blocking detection;
472
+ Fix for close button in preview window (Pro only);
473
+ Few minor bug fixes, cosmetic changes and code improvements
474
+
475
  = 2.6.5 =
476
  Added support for url data shortcode;
477
  Added warning if not all exceptions were cleared;
settings.php CHANGED
@@ -114,7 +114,7 @@ function generate_settings_form (){
114
  '_builtin' => false
115
  );
116
  $custom_post_types = get_post_types ($args, 'names', 'and');
117
- $screens = array_values (array_merge (array ('post', 'page'), $custom_post_types));
118
 
119
  $args = array (
120
  'posts_per_page' => AI_LIST_EXCEPTIONS_LIMIT,
@@ -125,8 +125,13 @@ function generate_settings_form (){
125
  'order' => 'ASC',
126
  'include' => '',
127
  'exclude' => '',
128
- 'meta_key' => '_adinserter_block_exceptions',
129
- 'meta_value' => '',
 
 
 
 
 
130
  'post_type' => $screens,
131
  'post_mime_type' => '',
132
  'post_parent' => '',
114
  '_builtin' => false
115
  );
116
  $custom_post_types = get_post_types ($args, 'names', 'and');
117
+ $screens = array_unique (array_values (array_merge (array ('post', 'page'), $custom_post_types)));
118
 
119
  $args = array (
120
  'posts_per_page' => AI_LIST_EXCEPTIONS_LIMIT,
125
  'order' => 'ASC',
126
  'include' => '',
127
  'exclude' => '',
128
+ 'meta_query' => array (
129
+ array (
130
+ 'key' => '_adinserter_block_exceptions',
131
+ 'value' => '',
132
+ 'compare' => '!='
133
+ )
134
+ ),
135
  'post_type' => $screens,
136
  'post_mime_type' => '',
137
  'post_parent' => '',
strings.php CHANGED
@@ -245,13 +245,21 @@ $ai_admin_translations = array (
245
 
246
 
247
  $ai_front_translations = array (
248
- 'wp_ai' => $wp_version . '+' . AD_INSERTER_VERSION,
 
 
249
  'insertion_before' => __('BEFORE', 'ad-inserter'),
250
  'insertion_after' => __('AFTER', 'ad-inserter'),
251
  'insertion_prepend' => __('PREPEND CONTENT', 'ad-inserter'),
252
  'insertion_append' => __('APPEND CONTENT', 'ad-inserter'),
253
  'insertion_replace_content' => __('REPLACE CONTENT', 'ad-inserter'),
254
  'insertion_replace_element' => __('REPLACE ELEMENT', 'ad-inserter'),
 
 
 
 
 
 
255
  'cancel' => __('Cancel', 'ad-inserter'),
256
  'use' => __('Use', 'ad-inserter'),
257
  'add' => __('Add', 'ad-inserter'),
@@ -263,8 +271,4 @@ $ai_front_translations = array (
263
  'element' => __('ELEMENT', 'ad-inserter'),
264
  'path' => __('PATH', 'ad-inserter'),
265
  'selector' => __('SELECTOR', 'ad-inserter'),
266
- 'visible' => _x('VISIBLE', 'Block', 'ad-inserter'),
267
- 'hidden' => _x('HIDDEN', 'Block', 'ad-inserter'),
268
- 'fallback' => _x('FALLBACK', 'Scheduling', 'ad-inserter'),
269
- 'automatically_placed' => __('Automatically placed by AdSense Auto ads code', 'ad-inserter')
270
  );
245
 
246
 
247
  $ai_front_translations = array (
248
+ // 'wp_ai' => $wp_version . '+' . AD_INSERTER_VERSION,
249
+
250
+ // Debugging
251
  'insertion_before' => __('BEFORE', 'ad-inserter'),
252
  'insertion_after' => __('AFTER', 'ad-inserter'),
253
  'insertion_prepend' => __('PREPEND CONTENT', 'ad-inserter'),
254
  'insertion_append' => __('APPEND CONTENT', 'ad-inserter'),
255
  'insertion_replace_content' => __('REPLACE CONTENT', 'ad-inserter'),
256
  'insertion_replace_element' => __('REPLACE ELEMENT', 'ad-inserter'),
257
+ 'visible' => _x('VISIBLE', 'Block', 'ad-inserter'),
258
+ 'hidden' => _x('HIDDEN', 'Block', 'ad-inserter'),
259
+ 'fallback' => _x('FALLBACK', 'Scheduling', 'ad-inserter'),
260
+ 'automatically_placed' => __('Automatically placed by AdSense Auto ads code', 'ad-inserter'),
261
+
262
+ // Element selection
263
  'cancel' => __('Cancel', 'ad-inserter'),
264
  'use' => __('Use', 'ad-inserter'),
265
  'add' => __('Add', 'ad-inserter'),
271
  'element' => __('ELEMENT', 'ad-inserter'),
272
  'path' => __('PATH', 'ad-inserter'),
273
  'selector' => __('SELECTOR', 'ad-inserter'),
 
 
 
 
274
  );