Version Description
- Improved ad blocking detection
- Few minor bug fixes, cosmetic changes and code improvements
Download this release
Release Info
Developer | spacetime |
Plugin | Ad Inserter – WordPress Ads Management with AdSense Header Integration |
Version | 2.7.1 |
Comparing to | |
See all releases |
Code changes from version 2.7.0 to 2.7.1
- ad-inserter.php +56 -16
- class.php +145 -28
- constants.php +1 -1
- css/ai-settings.css +1 -1
- includes/js/ResizeSensor.min.js +0 -1
- includes/js/ai-adb.BAK +0 -791
- includes/js/ai-adb.js +57 -25
- includes/js/ai-adb.min.js +19 -20
- includes/js/ai-lists.js +13 -9
- includes/js/ai-lists.min.js +19 -19
- includes/js/theia-sticky-sidebar.min.js +0 -1
- includes/preview.php +1 -1
- js/300x250.js +1 -0
- js/ad-inserter.js +39 -27
- js/ad-inserter.min.js +258 -0
- js/banner.js +1 -0
- readme.txt +9 -1
- settings.php +6 -2
ad-inserter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
-
Version: 2.7.
|
6 |
Description: Ad management with many advanced advertising features to insert ads at optimal positions
|
7 |
Author: Igor Funa
|
8 |
Author URI: http://igorfuna.com/
|
@@ -17,6 +17,10 @@ Requires PHP: 5.6
|
|
17 |
|
18 |
Change Log
|
19 |
|
|
|
|
|
|
|
|
|
20 |
Ad Inserter 2.7.0 - 2021-05-30
|
21 |
- Added support to list range of post IDs
|
22 |
- Added support for browser language in client lists
|
@@ -1845,7 +1849,8 @@ function ai_admin_enqueue_scripts ($hook_suffix) {
|
|
1845 |
'jquery',
|
1846 |
), AD_INSERTER_VERSION , true);
|
1847 |
|
1848 |
-
|
|
|
1849 |
'jquery',
|
1850 |
'jquery-ui-tabs',
|
1851 |
'jquery-ui-button',
|
@@ -1854,13 +1859,13 @@ function ai_admin_enqueue_scripts ($hook_suffix) {
|
|
1854 |
'jquery-ui-dialog',
|
1855 |
), AD_INSERTER_VERSION, true);
|
1856 |
|
1857 |
-
wp_localize_script ('ai-admin
|
1858 |
|
1859 |
wp_enqueue_script ('ai-missed', plugins_url ('includes/js/missed.js', __FILE__), array (), AD_INSERTER_VERSION , true);
|
1860 |
}
|
1861 |
|
1862 |
wp_enqueue_style ('ai-admin-gen', plugins_url ('css/ai-admin.css', __FILE__), array (), AD_INSERTER_VERSION);
|
1863 |
-
wp_enqueue_script ('ai-admin-
|
1864 |
}
|
1865 |
|
1866 |
function ai_admin_enqueue_scripts_late ($hook_suffix) {
|
@@ -2549,17 +2554,17 @@ function add_footer_inline_scripts () {
|
|
2549 |
echo '<!-- Code for ad blocking detection -->', "\n";
|
2550 |
echo '<!--noptimize-->', "\n";
|
2551 |
|
2552 |
-
if (!defined ('
|
2553 |
-
echo '<
|
2554 |
}
|
2555 |
-
if (!defined ('
|
2556 |
-
echo '<
|
2557 |
}
|
2558 |
if (!defined ('AI_ADB_NO_GOOGLE_ANALYTICS')) {
|
2559 |
-
echo '<
|
2560 |
}
|
2561 |
if (!defined ('AI_ADB_NO_MEDIA_NET')) {
|
2562 |
-
echo '<
|
2563 |
}
|
2564 |
if (!defined ('AI_ADB_NO_ADS_JS')) {
|
2565 |
echo '<script async id="ai-adb-ads" src="', plugins_url ('js/ads.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
|
@@ -2567,6 +2572,12 @@ function add_footer_inline_scripts () {
|
|
2567 |
if (!defined ('AI_ADB_NO_SPONSORS_JS')) {
|
2568 |
echo '<script async id="ai-adb-sponsors" src="', plugins_url ('js/sponsors.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
|
2569 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2570 |
echo '<!--/noptimize-->', "\n";
|
2571 |
echo '<!-- Code for ad blocking detection END -->', "\n";
|
2572 |
}
|
@@ -4751,6 +4762,12 @@ function ai_save_options ($options, $multisite_options = null, $blocks_org = nul
|
|
4751 |
update_option (AI_INSTALL_NAME, time ());
|
4752 |
}
|
4753 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4754 |
ai_update_option (AI_OPTION_NAME, $options);
|
4755 |
|
4756 |
update_option (AI_EXTRACT_NAME, $ai_db_options_extract);
|
@@ -4780,12 +4797,12 @@ function ai_load_options () {
|
|
4780 |
}
|
4781 |
}
|
4782 |
|
4783 |
-
if (is_multisite()) {
|
4784 |
$ai_db_options_multisite = get_site_option (AI_OPTION_NAME);
|
4785 |
option_stripslashes ($ai_db_options_multisite);
|
4786 |
}
|
4787 |
|
4788 |
-
if (is_multisite() && multisite_main_for_all_blogs () && defined ('BLOG_ID_CURRENT_SITE')) {
|
4789 |
$ai_db_options = get_blog_option (BLOG_ID_CURRENT_SITE, AI_OPTION_NAME);
|
4790 |
|
4791 |
if (is_string ($ai_db_options) && substr ($ai_db_options, 0, 4) === ':AI:') {
|
@@ -4799,6 +4816,14 @@ function ai_load_options () {
|
|
4799 |
option_stripslashes ($ai_db_options);
|
4800 |
}
|
4801 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4802 |
if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0) ai_log ("LOAD OPTIONS END");
|
4803 |
}
|
4804 |
|
@@ -6857,7 +6882,22 @@ function ai_settings () {
|
|
6857 |
return;
|
6858 |
}
|
6859 |
|
6860 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6861 |
|
6862 |
check_admin_referer ('save_adinserter_settings');
|
6863 |
|
@@ -7173,7 +7213,7 @@ function ai_settings () {
|
|
7173 |
}
|
7174 |
echo '</div>';
|
7175 |
}
|
7176 |
-
} elseif (isset ($_POST [AI_FORM_CLEAR])) {
|
7177 |
|
7178 |
check_admin_referer ('save_adinserter_settings');
|
7179 |
|
@@ -7186,7 +7226,7 @@ function ai_settings () {
|
|
7186 |
}
|
7187 |
|
7188 |
echo '<div class="notice notice-warning is-dismissible" style="margin: 5px 15px 2px 0px;"><p><strong>' . __('Settings cleared.', 'ad-inserter') . '</strong></p></div>';
|
7189 |
-
} elseif (isset ($_POST [AI_FORM_CLEAR_EXCEPTIONS])) {
|
7190 |
|
7191 |
check_admin_referer ('save_adinserter_settings');
|
7192 |
|
@@ -7200,7 +7240,7 @@ function ai_settings () {
|
|
7200 |
ai_clear_exceptions ();
|
7201 |
}
|
7202 |
}
|
7203 |
-
} elseif (isset ($_POST [AI_FORM_CLEAR_STATISTICS]) && is_numeric ($_POST [AI_FORM_CLEAR_STATISTICS])) {
|
7204 |
|
7205 |
check_admin_referer ('save_adinserter_settings');
|
7206 |
|
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 |
|
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
|
23 |
+
|
24 |
Ad Inserter 2.7.0 - 2021-05-30
|
25 |
- Added support to list range of post IDs
|
26 |
- Added support for browser language in client lists
|
1849 |
'jquery',
|
1850 |
), AD_INSERTER_VERSION , true);
|
1851 |
|
1852 |
+
$admin_script = get_backend_javascript_debugging () ? 'js/ad-inserter.js' : 'js/ad-inserter.min.js';
|
1853 |
+
wp_enqueue_script ('ai-admin', plugins_url ($admin_script, __FILE__), array (
|
1854 |
'jquery',
|
1855 |
'jquery-ui-tabs',
|
1856 |
'jquery-ui-button',
|
1859 |
'jquery-ui-dialog',
|
1860 |
), AD_INSERTER_VERSION, true);
|
1861 |
|
1862 |
+
wp_localize_script ('ai-admin', 'ai_admin', $ai_admin_translations);
|
1863 |
|
1864 |
wp_enqueue_script ('ai-missed', plugins_url ('includes/js/missed.js', __FILE__), array (), AD_INSERTER_VERSION , true);
|
1865 |
}
|
1866 |
|
1867 |
wp_enqueue_style ('ai-admin-gen', plugins_url ('css/ai-admin.css', __FILE__), array (), AD_INSERTER_VERSION);
|
1868 |
+
wp_enqueue_script ('ai-admin-gen', plugins_url ('includes/js/ai-admin.js', __FILE__ ), array (), AD_INSERTER_VERSION, true);
|
1869 |
}
|
1870 |
|
1871 |
function ai_admin_enqueue_scripts_late ($hook_suffix) {
|
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";
|
2572 |
if (!defined ('AI_ADB_NO_SPONSORS_JS')) {
|
2573 |
echo '<script async id="ai-adb-sponsors" src="', plugins_url ('js/sponsors.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
|
2574 |
}
|
2575 |
+
if (!defined ('AI_ADB_NO_BANNER_JS')) {
|
2576 |
+
echo '<script async id="ai-adb-banner" src="', plugins_url ('js/banner.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
|
2577 |
+
}
|
2578 |
+
if (!defined ('AI_ADB_NO_300x260_JS')) {
|
2579 |
+
echo '<script async id="ai-adb-300x250" src="', plugins_url ('js/300x250.js', __FILE__ ), "?ver=", AD_INSERTER_VERSION, '"></script>', "\n";
|
2580 |
+
}
|
2581 |
echo '<!--/noptimize-->', "\n";
|
2582 |
echo '<!-- Code for ad blocking detection END -->', "\n";
|
2583 |
}
|
4762 |
update_option (AI_INSTALL_NAME, time ());
|
4763 |
}
|
4764 |
|
4765 |
+
if (is_multisite () && !is_main_site ()) {
|
4766 |
+
unset ($options [AI_OPTION_GLOBAL]['PLUGIN_TYPE']);
|
4767 |
+
unset ($options [AI_OPTION_GLOBAL]['PLUGIN_STATUS']);
|
4768 |
+
unset ($options [AI_OPTION_GLOBAL]['PLUGIN_STATUS_COUNTER']);
|
4769 |
+
}
|
4770 |
+
|
4771 |
ai_update_option (AI_OPTION_NAME, $options);
|
4772 |
|
4773 |
update_option (AI_EXTRACT_NAME, $ai_db_options_extract);
|
4797 |
}
|
4798 |
}
|
4799 |
|
4800 |
+
if (is_multisite ()) {
|
4801 |
$ai_db_options_multisite = get_site_option (AI_OPTION_NAME);
|
4802 |
option_stripslashes ($ai_db_options_multisite);
|
4803 |
}
|
4804 |
|
4805 |
+
if (is_multisite () && multisite_main_for_all_blogs () && defined ('BLOG_ID_CURRENT_SITE')) {
|
4806 |
$ai_db_options = get_blog_option (BLOG_ID_CURRENT_SITE, AI_OPTION_NAME);
|
4807 |
|
4808 |
if (is_string ($ai_db_options) && substr ($ai_db_options, 0, 4) === ':AI:') {
|
4816 |
option_stripslashes ($ai_db_options);
|
4817 |
}
|
4818 |
|
4819 |
+
if (is_multisite () && !is_main_site () && defined ('BLOG_ID_CURRENT_SITE')) {
|
4820 |
+
$ai_db_options_main = get_blog_option (BLOG_ID_CURRENT_SITE, AI_OPTION_NAME);
|
4821 |
+
|
4822 |
+
if (isset ($ai_db_options_main [AI_OPTION_GLOBAL]['PLUGIN_TYPE'])) $ai_db_options [AI_OPTION_GLOBAL]['PLUGIN_TYPE'] = $ai_db_options_main [AI_OPTION_GLOBAL]['PLUGIN_TYPE'];
|
4823 |
+
if (isset ($ai_db_options_main [AI_OPTION_GLOBAL]['PLUGIN_STATUS'])) $ai_db_options [AI_OPTION_GLOBAL]['PLUGIN_STATUS'] = $ai_db_options_main [AI_OPTION_GLOBAL]['PLUGIN_STATUS'];
|
4824 |
+
if (isset ($ai_db_options_main [AI_OPTION_GLOBAL]['PLUGIN_STATUS_COUNTER'])) $ai_db_options [AI_OPTION_GLOBAL]['PLUGIN_STATUS_COUNTER'] = $ai_db_options_main [AI_OPTION_GLOBAL]['PLUGIN_STATUS_COUNTER'];
|
4825 |
+
}
|
4826 |
+
|
4827 |
if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0) ai_log ("LOAD OPTIONS END");
|
4828 |
}
|
4829 |
|
6882 |
return;
|
6883 |
}
|
6884 |
|
6885 |
+
$settings_data_valid = true;
|
6886 |
+
if (function_exists ('ai_check_remote_connection')) {
|
6887 |
+
if (!ai_check_remote_connection ()) {
|
6888 |
+
if (isset ($_POST [AI_FORM_SAVE]) ||
|
6889 |
+
isset ($_POST [AI_FORM_CLEAR]) ||
|
6890 |
+
isset ($_POST [AI_FORM_CLEAR_EXCEPTIONS]) ||
|
6891 |
+
isset ($_POST [AI_FORM_CLEAR_STATISTICS])
|
6892 |
+
) {
|
6893 |
+
// translators: %s: Ad Inserter
|
6894 |
+
echo '<div class="notice notice-error is-dismissible" style="margin: 5px 15px 2px 0px;"><p>' . sprintf (__('Invalid data received - %s settings not saved.', 'ad-inserter'), AD_INSERTER_NAME) . '</p></div>';
|
6895 |
+
}
|
6896 |
+
$settings_data_valid = false;
|
6897 |
+
}
|
6898 |
+
}
|
6899 |
+
|
6900 |
+
if (isset ($_POST [AI_FORM_SAVE]) && $settings_data_valid) {
|
6901 |
|
6902 |
check_admin_referer ('save_adinserter_settings');
|
6903 |
|
7213 |
}
|
7214 |
echo '</div>';
|
7215 |
}
|
7216 |
+
} elseif (isset ($_POST [AI_FORM_CLEAR]) && $settings_data_valid) {
|
7217 |
|
7218 |
check_admin_referer ('save_adinserter_settings');
|
7219 |
|
7226 |
}
|
7227 |
|
7228 |
echo '<div class="notice notice-warning is-dismissible" style="margin: 5px 15px 2px 0px;"><p><strong>' . __('Settings cleared.', 'ad-inserter') . '</strong></p></div>';
|
7229 |
+
} elseif (isset ($_POST [AI_FORM_CLEAR_EXCEPTIONS]) && $settings_data_valid) {
|
7230 |
|
7231 |
check_admin_referer ('save_adinserter_settings');
|
7232 |
|
7240 |
ai_clear_exceptions ();
|
7241 |
}
|
7242 |
}
|
7243 |
+
} elseif (isset ($_POST [AI_FORM_CLEAR_STATISTICS]) && is_numeric ($_POST [AI_FORM_CLEAR_STATISTICS]) && $settings_data_valid) {
|
7244 |
|
7245 |
check_admin_referer ('save_adinserter_settings');
|
7246 |
|
class.php
CHANGED
@@ -28,6 +28,12 @@ abstract class ai_BaseCodeBlock {
|
|
28 |
var $head_code_written;
|
29 |
var $wrapping_div_classes;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
var $check_codes;
|
32 |
var $check_codes_index;
|
33 |
var $check_codes_data;
|
@@ -96,6 +102,12 @@ abstract class ai_BaseCodeBlock {
|
|
96 |
$this->head_code_written = false;
|
97 |
$this->wrapping_div_classes = array ();
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
$this->check_codes = null;
|
100 |
$this->check_codes_index = 0;
|
101 |
$this->check_codes_data = null;
|
@@ -3747,8 +3759,14 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3747 |
}
|
3748 |
|
3749 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3750 |
// Additional code (Ad label, close button)
|
3751 |
-
if ($dynamic_blocks == AI_DYNAMIC_BLOCKS_SERVER_SIDE_W3TC && $this->w3tc_code != '' && $additional_code != '') {
|
3752 |
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
3753 |
$this->w3tc_debug []= 'PROCESS ADDITIONAL CODE';
|
3754 |
}
|
@@ -4327,6 +4345,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4327 |
$ai_code = $this->base64_encode_w3tc (ai_strip_w3tc_markers ($processed_code), false); // Use W3TC code in case W3TC was used before and insert was specified for CHECK
|
4328 |
|
4329 |
$processed_code = "<div class='{$viewport_classes} {$class_id}' data-insertion='after' data-selector='.{$class_id}' data-insertion-no-dbg data-code='$ai_code'></div>\n";
|
|
|
4330 |
if (!get_disable_js_code ()) {
|
4331 |
$js_code = "ai_insert_list_code ('{$class_id}');";
|
4332 |
|
@@ -4548,6 +4567,9 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4548 |
if ($this->get_lazy_loading () || $this->get_manual_loading () != AI_MANUAL_LOADING_DISABLED || $ai_wp_data [AI_CLIENT_SIDE_INSERTION]) $this->needs_class = true;
|
4549 |
// if ($this->client_side_list_detection && !$ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
|
4550 |
|
|
|
|
|
|
|
4551 |
$block_class_name = get_block_class_name ($this->needs_class);
|
4552 |
|
4553 |
$block_class = get_block_class () || ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_BLOCKS) != 0;
|
@@ -4561,13 +4583,47 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4561 |
if ($this->get_client_side_action () == AI_CLIENT_SIDE_ACTION_INSERT) $include_viewport_classes = false;
|
4562 |
$viewport_classes = $include_viewport_classes ? trim ($this->get_viewport_classes ()) : "";
|
4563 |
|
|
|
4564 |
$classes = array ();
|
4565 |
if ($block_class_name != '' && ($block_class || $block_number_class || $block_name_class) || $alignment_class != '' || $size_class != '' || $viewport_classes != '') {
|
4566 |
-
|
4567 |
-
if ($
|
4568 |
-
|
4569 |
-
|
4570 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4571 |
if ($viewport_classes) $classes []= $viewport_classes;
|
4572 |
}
|
4573 |
|
@@ -4577,7 +4633,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4577 |
$sticky_parameters = $this->sticky_parameters ($classes);
|
4578 |
}
|
4579 |
|
4580 |
-
$code = $this->ai_getProcessedCode ();
|
4581 |
|
4582 |
$not_iframe_or_inside = !$this->get_iframe () || $ai_wp_data [AI_CODE_FOR_IFRAME];
|
4583 |
|
@@ -4592,25 +4648,25 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4592 |
|
4593 |
if ($hidden_widgets) return $this->hidden_viewports;
|
4594 |
|
4595 |
-
$additional_block_style = '';
|
4596 |
-
// if ($this->client_side_list_detection && !$ai_wp_data [AI_WP_AMP_PAGE]) {
|
4597 |
-
// if ($this->is_sticky ()) {
|
4598 |
-
// $additional_block_style = 'visibility: hidden; ';
|
4599 |
-
// } else {
|
4600 |
-
// $additional_block_style = 'visibility: hidden; position: absolute; ';
|
4601 |
-
// $classes [] = 'ai-remove-position';
|
4602 |
-
// }
|
4603 |
-
|
4604 |
-
// // Needed to hide blacklisted blocks
|
4605 |
-
// $classes [] = 'ai-list-block';
|
4606 |
-
// }
|
4607 |
-
|
4608 |
if (!empty ($this->wrapping_div_classes)) {
|
4609 |
$classes = array_merge ($classes, $this->wrapping_div_classes);
|
4610 |
}
|
4611 |
|
4612 |
if (($this->get_close_button () || $this->get_auto_close_time ()) && !$ai_wp_data [AI_WP_AMP_PAGE] && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
|
4613 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4614 |
}
|
4615 |
|
4616 |
$tracking_block = 0;
|
@@ -4675,10 +4731,15 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4675 |
}
|
4676 |
|
4677 |
if ($w3tc) {
|
4678 |
-
if (
|
4679 |
$wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code_pre . $tracking_code_data . $tracking_code_post . $sticky_parameters . $check_option_style . ">\n";
|
4680 |
} else {
|
4681 |
-
$
|
|
|
|
|
|
|
|
|
|
|
4682 |
}
|
4683 |
|
4684 |
|
@@ -4686,7 +4747,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4686 |
// $wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code_pre . $tracking_code_data . $tracking_code_post .
|
4687 |
|
4688 |
// if ($ai_wp_data [AI_WP_AMP_PAGE] || ($alignment_class != '' && defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ())) {
|
4689 |
-
// $wrapper_before .= " style='" . $
|
4690 |
|
4691 |
// $wrapper_before .= ">\n";
|
4692 |
|
@@ -4709,16 +4770,21 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4709 |
|
4710 |
$code = $this->generate_html_from_w3tc_code ();
|
4711 |
} else {
|
4712 |
-
if (
|
4713 |
$wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code . $sticky_parameters . $check_option_style . ">\n";
|
4714 |
} else {
|
4715 |
-
$
|
|
|
|
|
|
|
|
|
|
|
4716 |
}
|
4717 |
|
4718 |
// TO TEST
|
4719 |
// $wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code;
|
4720 |
// if ($ai_wp_data [AI_WP_AMP_PAGE] || ($alignment_class != '' && defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ()))
|
4721 |
-
// $wrapper_before .= $this->hidden_viewports . "<div" . $class . $tracking_code . " style='" . $
|
4722 |
// $wrapper_before .= "'>\n";
|
4723 |
|
4724 |
$wrapper_after = "</div>\n";
|
@@ -4770,6 +4836,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4770 |
$code .= $this->get_code_for_single_insertion ($include_viewport_classes, $hidden_widgets, $code_only);
|
4771 |
} while (is_array ($this->check_codes) && isset ($this->check_codes [$this->check_codes_index + 1]));
|
4772 |
|
|
|
4773 |
if (is_array ($this->check_codes)) {
|
4774 |
if ($this->check_code_insertions === null) {
|
4775 |
$this->no_insertion_text = 'CHECK OPTIONS FAILED';
|
@@ -4781,6 +4848,57 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4781 |
$this->check_codes_data = null;
|
4782 |
}
|
4783 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4784 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
4785 |
$code_org = $code;
|
4786 |
|
@@ -5725,7 +5843,6 @@ echo '</body>
|
|
5725 |
if ($block_class_name == null) $block_class_name = get_block_class_name (true);
|
5726 |
$block_class_name .= '-';
|
5727 |
|
5728 |
-
// return $block_class_name . strtolower (md5 ($this->size_style ()));
|
5729 |
return $block_class_name . ai_css_to_name ($size_style);
|
5730 |
}
|
5731 |
|
28 |
var $head_code_written;
|
29 |
var $wrapping_div_classes;
|
30 |
|
31 |
+
var $check_block;
|
32 |
+
var $check_block_style;
|
33 |
+
var $check_block_classes;
|
34 |
+
var $check_block_parameters;
|
35 |
+
var $check_block_additional_code;
|
36 |
+
|
37 |
var $check_codes;
|
38 |
var $check_codes_index;
|
39 |
var $check_codes_data;
|
102 |
$this->head_code_written = false;
|
103 |
$this->wrapping_div_classes = array ();
|
104 |
|
105 |
+
$this->check_block = false;
|
106 |
+
$this->check_block_style = '';
|
107 |
+
$this->check_block_classes = array ();
|
108 |
+
$this->check_block_parameters = '';
|
109 |
+
$this->check_block_additional_code = '';
|
110 |
+
|
111 |
$this->check_codes = null;
|
112 |
$this->check_codes_index = 0;
|
113 |
$this->check_codes_data = null;
|
3759 |
}
|
3760 |
|
3761 |
|
3762 |
+
if ($this->check_block) {
|
3763 |
+
$this->check_block_additional_code = $additional_code;
|
3764 |
+
$additional_code = '';
|
3765 |
+
}
|
3766 |
+
|
3767 |
+
|
3768 |
// Additional code (Ad label, close button)
|
3769 |
+
if ($dynamic_blocks == AI_DYNAMIC_BLOCKS_SERVER_SIDE_W3TC && $this->w3tc_code != '' && !defined ('AI_NO_W3TC') && $additional_code != '') {
|
3770 |
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
3771 |
$this->w3tc_debug []= 'PROCESS ADDITIONAL CODE';
|
3772 |
}
|
4345 |
$ai_code = $this->base64_encode_w3tc (ai_strip_w3tc_markers ($processed_code), false); // Use W3TC code in case W3TC was used before and insert was specified for CHECK
|
4346 |
|
4347 |
$processed_code = "<div class='{$viewport_classes} {$class_id}' data-insertion='after' data-selector='.{$class_id}' data-insertion-no-dbg data-code='$ai_code'></div>\n";
|
4348 |
+
|
4349 |
if (!get_disable_js_code ()) {
|
4350 |
$js_code = "ai_insert_list_code ('{$class_id}');";
|
4351 |
|
4567 |
if ($this->get_lazy_loading () || $this->get_manual_loading () != AI_MANUAL_LOADING_DISABLED || $ai_wp_data [AI_CLIENT_SIDE_INSERTION]) $this->needs_class = true;
|
4568 |
// if ($this->client_side_list_detection && !$ai_wp_data [AI_WP_AMP_PAGE]) $this->needs_class = true;
|
4569 |
|
4570 |
+
// Must be before $this->get_size_class () to detect CHECK options
|
4571 |
+
$code = $this->ai_getProcessedCode ();
|
4572 |
+
|
4573 |
$block_class_name = get_block_class_name ($this->needs_class);
|
4574 |
|
4575 |
$block_class = get_block_class () || ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_BLOCKS) != 0;
|
4583 |
if ($this->get_client_side_action () == AI_CLIENT_SIDE_ACTION_INSERT) $include_viewport_classes = false;
|
4584 |
$viewport_classes = $include_viewport_classes ? trim ($this->get_viewport_classes ()) : "";
|
4585 |
|
4586 |
+
$check_block_classes = array ();
|
4587 |
$classes = array ();
|
4588 |
if ($block_class_name != '' && ($block_class || $block_number_class || $block_name_class) || $alignment_class != '' || $size_class != '' || $viewport_classes != '') {
|
4589 |
+
|
4590 |
+
if ($block_class_name != '' && ($block_class || $this->needs_class)) {
|
4591 |
+
$classes []= $block_class_name;
|
4592 |
+
$check_block_classes []= $block_class_name;
|
4593 |
+
}
|
4594 |
+
|
4595 |
+
if ($alignment_class && !get_inline_styles ()) {
|
4596 |
+
if ($this->check_block) {
|
4597 |
+
$check_block_classes []= $alignment_class;
|
4598 |
+
} else {
|
4599 |
+
$classes []= $alignment_class;
|
4600 |
+
}
|
4601 |
+
}
|
4602 |
+
|
4603 |
+
if ($size_class) {
|
4604 |
+
if ($this->check_block) {
|
4605 |
+
$check_block_classes []= $size_class;
|
4606 |
+
} else {
|
4607 |
+
$classes []= $size_class;
|
4608 |
+
}
|
4609 |
+
}
|
4610 |
+
|
4611 |
+
if ($block_class_name != '' && ($block_number_class || $this->needs_class)) {
|
4612 |
+
if ($this->check_block) {
|
4613 |
+
$check_block_classes []= $block_class_name . "-" . $this->number;
|
4614 |
+
} else {
|
4615 |
+
$classes []= $block_class_name . "-" . $this->number;
|
4616 |
+
}
|
4617 |
+
}
|
4618 |
+
|
4619 |
+
if ($block_class_name != '' && $block_name_class) {
|
4620 |
+
if ($this->check_block) {
|
4621 |
+
$check_block_classes []= $block_class_name . "-" . $this->get_name_class ();
|
4622 |
+
} else {
|
4623 |
+
$classes []= $block_class_name . "-" . $this->get_name_class ();
|
4624 |
+
}
|
4625 |
+
}
|
4626 |
+
|
4627 |
if ($viewport_classes) $classes []= $viewport_classes;
|
4628 |
}
|
4629 |
|
4633 |
$sticky_parameters = $this->sticky_parameters ($classes);
|
4634 |
}
|
4635 |
|
4636 |
+
// $code = $this->ai_getProcessedCode ();
|
4637 |
|
4638 |
$not_iframe_or_inside = !$this->get_iframe () || $ai_wp_data [AI_CODE_FOR_IFRAME];
|
4639 |
|
4648 |
|
4649 |
if ($hidden_widgets) return $this->hidden_viewports;
|
4650 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4651 |
if (!empty ($this->wrapping_div_classes)) {
|
4652 |
$classes = array_merge ($classes, $this->wrapping_div_classes);
|
4653 |
}
|
4654 |
|
4655 |
if (($this->get_close_button () || $this->get_auto_close_time ()) && !$ai_wp_data [AI_WP_AMP_PAGE] && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
|
4656 |
+
if ($this->check_block) {
|
4657 |
+
$check_block_classes []= 'ai-close';
|
4658 |
+
} else {
|
4659 |
+
$classes [] = 'ai-close';
|
4660 |
+
}
|
4661 |
+
}
|
4662 |
+
|
4663 |
+
if ($this->check_block) {
|
4664 |
+
$this->check_block_style = $alignment_style;
|
4665 |
+
$this->check_block_classes = $check_block_classes;
|
4666 |
+
$this->check_block_parameters = $sticky_parameters;
|
4667 |
+
|
4668 |
+
$alignment_style = '';
|
4669 |
+
$sticky_parameters = '';
|
4670 |
}
|
4671 |
|
4672 |
$tracking_block = 0;
|
4731 |
}
|
4732 |
|
4733 |
if ($w3tc) {
|
4734 |
+
if (($alignment_class != '' && defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ())) {
|
4735 |
$wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code_pre . $tracking_code_data . $tracking_code_post . $sticky_parameters . $check_option_style . ">\n";
|
4736 |
} else {
|
4737 |
+
$css = trim ($alignment_style . $check_option_css);
|
4738 |
+
if ($css != '') {
|
4739 |
+
$style = " style='" . $css . "'";
|
4740 |
+
} else $style = "";
|
4741 |
+
|
4742 |
+
$wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code_pre . $tracking_code_data . $tracking_code_post . $sticky_parameters . $style .">\n";
|
4743 |
}
|
4744 |
|
4745 |
|
4747 |
// $wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code_pre . $tracking_code_data . $tracking_code_post .
|
4748 |
|
4749 |
// if ($ai_wp_data [AI_WP_AMP_PAGE] || ($alignment_class != '' && defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ())) {
|
4750 |
+
// $wrapper_before .= " style='" . $alignment_style;
|
4751 |
|
4752 |
// $wrapper_before .= ">\n";
|
4753 |
|
4770 |
|
4771 |
$code = $this->generate_html_from_w3tc_code ();
|
4772 |
} else {
|
4773 |
+
if (($alignment_class != '' && defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ())) {
|
4774 |
$wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code . $sticky_parameters . $check_option_style . ">\n";
|
4775 |
} else {
|
4776 |
+
$css = trim ($alignment_style . $check_option_css);
|
4777 |
+
if ($css != '') {
|
4778 |
+
$style = " style='" . $css . "'";
|
4779 |
+
} else $style = "";
|
4780 |
+
|
4781 |
+
$wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code . $sticky_parameters . $style . ">\n";
|
4782 |
}
|
4783 |
|
4784 |
// TO TEST
|
4785 |
// $wrapper_before = $this->hidden_viewports . "<div" . $class . $tracking_code;
|
4786 |
// if ($ai_wp_data [AI_WP_AMP_PAGE] || ($alignment_class != '' && defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ()))
|
4787 |
+
// $wrapper_before .= $this->hidden_viewports . "<div" . $class . $tracking_code . " style='" . $alignment_style . "'>\n";
|
4788 |
// $wrapper_before .= "'>\n";
|
4789 |
|
4790 |
$wrapper_after = "</div>\n";
|
4836 |
$code .= $this->get_code_for_single_insertion ($include_viewport_classes, $hidden_widgets, $code_only);
|
4837 |
} while (is_array ($this->check_codes) && isset ($this->check_codes [$this->check_codes_index + 1]));
|
4838 |
|
4839 |
+
|
4840 |
if (is_array ($this->check_codes)) {
|
4841 |
if ($this->check_code_insertions === null) {
|
4842 |
$this->no_insertion_text = 'CHECK OPTIONS FAILED';
|
4848 |
$this->check_codes_data = null;
|
4849 |
}
|
4850 |
|
4851 |
+
|
4852 |
+
if ($this->check_block) {
|
4853 |
+
$w3tc = get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_SERVER_SIDE_W3TC && $this->w3tc_code != '' && !defined ('AI_NO_W3TC');
|
4854 |
+
|
4855 |
+
// Additional code (ad label, close button) for a CHECK block
|
4856 |
+
if ($this->check_block_additional_code != '') {
|
4857 |
+
if ($w3tc) {
|
4858 |
+
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
4859 |
+
$this->w3tc_debug []= 'PROCESS ADDITIONAL CODE';
|
4860 |
+
}
|
4861 |
+
|
4862 |
+
$this->w3tc_code .= 'if ($ai_code != \'\') $ai_code = base64_decode (\''.base64_encode ($this->check_block_additional_code).'\') . $ai_code;';
|
4863 |
+
|
4864 |
+
$code = $this->generate_html_from_w3tc_code ();
|
4865 |
+
} else $code = $this->check_block_additional_code . $code;
|
4866 |
+
}
|
4867 |
+
|
4868 |
+
// Wrapping div for a CHECK block
|
4869 |
+
if ($this->get_alignment_type () != AI_ALIGNMENT_NO_WRAPPING) {
|
4870 |
+
$classes = array_unique ($this->check_block_classes);
|
4871 |
+
|
4872 |
+
foreach ($classes as $index => $class_name) {
|
4873 |
+
if (trim ($class_name) == '') unset ($classes [$index]);
|
4874 |
+
}
|
4875 |
+
if (count ($classes) != 0) {
|
4876 |
+
$class = " class='" . trim (implode (' ', $classes)) . "'";
|
4877 |
+
} else $class = "";
|
4878 |
+
|
4879 |
+
if ((defined ('AI_NORMAL_HEADER_STYLES') && AI_NORMAL_HEADER_STYLES && !get_inline_styles ())) {
|
4880 |
+
$wrapper_before = "<div" . $class . $this->check_block_parameters . ">\n";
|
4881 |
+
} else {
|
4882 |
+
$wrapper_before = "<div" . $class . $this->check_block_parameters . " style='" . $this->check_block_style . "'>\n";
|
4883 |
+
}
|
4884 |
+
|
4885 |
+
$wrapper_after = "</div>\n";
|
4886 |
+
|
4887 |
+
if ($w3tc) {
|
4888 |
+
$this->w3tc_code .= ' $ai_code = base64_decode (\''.base64_encode ($wrapper_before).'\') . $ai_code . base64_decode (\''.$this->base64_encode_w3tc ($wrapper_after, false).'\');';
|
4889 |
+
|
4890 |
+
// Process W3TC filter hook
|
4891 |
+
$this->w3tc_code .= ' $ai_code_org = $ai_code; if (!isset ($ai_enabled) || $ai_enabled) {$ai_code = apply_filters ("ai_block_w3tc_code_single_insertion", $ai_code_org, ' . $this->number . ');}';
|
4892 |
+
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
4893 |
+
$this->w3tc_code .= ' if ($ai_code != $ai_code_org) {$ai_code = ai_w3tc_block_end_message ("PROCESS HOOK FILTER ai_block_w3tc_code_single_insertion", $ai_code);}';
|
4894 |
+
}
|
4895 |
+
|
4896 |
+
$code = $this->generate_html_from_w3tc_code ();
|
4897 |
+
} else $code = $wrapper_before . $code . $wrapper_after;
|
4898 |
+
}
|
4899 |
+
}
|
4900 |
+
|
4901 |
+
|
4902 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
4903 |
$code_org = $code;
|
4904 |
|
5843 |
if ($block_class_name == null) $block_class_name = get_block_class_name (true);
|
5844 |
$block_class_name .= '-';
|
5845 |
|
|
|
5846 |
return $block_class_name . ai_css_to_name ($size_style);
|
5847 |
}
|
5848 |
|
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.
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
31 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
32 |
|
33 |
if (!defined( 'AD_INSERTER_VERSION'))
|
34 |
+
define ('AD_INSERTER_VERSION', '2.7.1');
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
css/ai-settings.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#ai-data {
|
2 |
-
font-family: "2.7.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
1 |
#ai-data {
|
2 |
+
font-family: "2.7.1"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
includes/js/ResizeSensor.min.js
CHANGED
@@ -1,2 +1 @@
|
|
1 |
!function(){var e=function(t,i){function s(){this.q=[],this.add=function(e){this.q.push(e)};var e,t;this.call=function(){for(e=0,t=this.q.length;e<t;e++)this.q[e].call()}}function o(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}function n(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new s,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var i="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",n="position: absolute; left: 0; top: 0; transition: 0s;";e.resizeSensor.style.cssText=i,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+i+'"><div style="'+n+'"></div></div><div class="resize-sensor-shrink" style="'+i+'"><div style="'+n+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[o(e,"position")]||(e.style.position="relative");var d,r,l=e.resizeSensor.childNodes[0],c=l.childNodes[0],h=e.resizeSensor.childNodes[1],a=(h.childNodes[0],function(){c.style.width=l.offsetWidth+10+"px",c.style.height=l.offsetHeight+10+"px",l.scrollLeft=l.scrollWidth,l.scrollTop=l.scrollHeight,h.scrollLeft=h.scrollWidth,h.scrollTop=h.scrollHeight,d=e.offsetWidth,r=e.offsetHeight});a();var f=function(){e.resizedAttached&&e.resizedAttached.call()},u=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)},p=function(){e.offsetWidth==d&&e.offsetHeight==r||f(),a()};u(l,"scroll",p),u(h,"scroll",p)}var d=Object.prototype.toString.call(t),r="[object Array]"===d||"[object NodeList]"===d||"[object HTMLCollection]"===d||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(r)for(var l=0,c=t.length;l<c;l++)n(t[l],i);else n(t,i);this.detach=function(){if(r)for(var i=0,s=t.length;i<s;i++)e.detach(t[i]);else e.detach(t)}};e.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=e:window.ResizeSensor=e}();
|
2 |
-
//# sourceMappingURL=maps/ResizeSensor.min.js.map
|
1 |
!function(){var e=function(t,i){function s(){this.q=[],this.add=function(e){this.q.push(e)};var e,t;this.call=function(){for(e=0,t=this.q.length;e<t;e++)this.q[e].call()}}function o(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}function n(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new s,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var i="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",n="position: absolute; left: 0; top: 0; transition: 0s;";e.resizeSensor.style.cssText=i,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+i+'"><div style="'+n+'"></div></div><div class="resize-sensor-shrink" style="'+i+'"><div style="'+n+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[o(e,"position")]||(e.style.position="relative");var d,r,l=e.resizeSensor.childNodes[0],c=l.childNodes[0],h=e.resizeSensor.childNodes[1],a=(h.childNodes[0],function(){c.style.width=l.offsetWidth+10+"px",c.style.height=l.offsetHeight+10+"px",l.scrollLeft=l.scrollWidth,l.scrollTop=l.scrollHeight,h.scrollLeft=h.scrollWidth,h.scrollTop=h.scrollHeight,d=e.offsetWidth,r=e.offsetHeight});a();var f=function(){e.resizedAttached&&e.resizedAttached.call()},u=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)},p=function(){e.offsetWidth==d&&e.offsetHeight==r||f(),a()};u(l,"scroll",p),u(h,"scroll",p)}var d=Object.prototype.toString.call(t),r="[object Array]"===d||"[object NodeList]"===d||"[object HTMLCollection]"===d||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(r)for(var l=0,c=t.length;l<c;l++)n(t[l],i);else n(t,i);this.detach=function(){if(r)for(var i=0,s=t.length;i<s;i++)e.detach(t[i]);else e.detach(t)}};e.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=e:window.ResizeSensor=e}();
|
|
includes/js/ai-adb.BAK
DELETED
@@ -1,791 +0,0 @@
|
|
1 |
-
var ai_adb_active = false;
|
2 |
-
var ai_adb_counter = 0;
|
3 |
-
var ai_adb_act_cookie_name = "aiADB";
|
4 |
-
var ai_adb_pgv_cookie_name = "aiADB_PV";
|
5 |
-
var ai_adb_page_redirection_cookie_name = "aiADB_PR";
|
6 |
-
|
7 |
-
var ai_adb_overlay = AI_ADB_OVERLAY_WINDOW;
|
8 |
-
var ai_adb_message_window = AI_ADB_MESSAGE_WINDOW;
|
9 |
-
var ai_adb_message_undismissible = AI_FUNCB_GET_UNDISMISSIBLE_MESSAGE;
|
10 |
-
var ai_adb_message_cookie_lifetime = AI_FUNCT_GET_NO_ACTION_PERIOD;
|
11 |
-
var ai_adb_action = AI_FUNC_GET_ADB_ACTION;
|
12 |
-
var ai_adb_page_views = "AI_FUNC_GET_DELAY_ACTION";
|
13 |
-
var ai_adb_selectors = "AI_ADB_SELECTORS";
|
14 |
-
var ai_adb_redirection_url = "AI_ADB_REDIRECTION_PAGE";
|
15 |
-
|
16 |
-
function ai_adb_process_content () {
|
17 |
-
(function ($) {
|
18 |
-
|
19 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 1
|
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 ();
|
27 |
-
|
28 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING parent", ai_adb_parent.prop ("tagName"), "id=\""+ ai_adb_parent.attr ("id")+"\"", "class=\""+ ai_adb_parent.attr ("class")+"\"");
|
29 |
-
|
30 |
-
var ai_adb_css = $(this).data ("css");
|
31 |
-
if (typeof ai_adb_css == "undefined") ai_adb_css = "display: none !important;";
|
32 |
-
|
33 |
-
var ai_adb_selectors = $(this).data ("selectors");
|
34 |
-
if (typeof ai_adb_selectors == "undefined" || ai_adb_selectors == '') ai_adb_selectors = "p";
|
35 |
-
|
36 |
-
if (ai_adb_debugging) console.log ('AI AD BLOCKING CSS, css=\'' + ai_adb_css +'\'', "selectors='" + ai_adb_selectors + "'");
|
37 |
-
|
38 |
-
var ai_adb_action = false;
|
39 |
-
$(ai_adb_parent).find ('.AI_ADB_CONTENT_CSS_BEGIN_CLASS, .AI_ADB_CONTENT_CSS_END_CLASS, ' + ai_adb_selectors).each (function () {
|
40 |
-
if ($(this).hasClass ("AI_ADB_CONTENT_CSS_BEGIN_CLASS")) {$(this).remove (); ai_adb_action = true;}
|
41 |
-
else if ($(this).hasClass ("AI_ADB_CONTENT_CSS_END_CLASS")) {$(this).remove (); ai_adb_action = false;}
|
42 |
-
else if (ai_adb_action) {
|
43 |
-
var ai_adb_style = $(this).attr ("style");
|
44 |
-
if (typeof ai_adb_style == "undefined") ai_adb_style = "";
|
45 |
-
else {
|
46 |
-
ai_adb_style = ai_adb_style.trim ();
|
47 |
-
if (ai_adb_style != '' && ai_adb_style [ai_adb_style.length - 1] != ';') {
|
48 |
-
ai_adb_style = ai_adb_style + ';';
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING CSS:", $(this).prop ("tagName"), "id=\""+ $(this).attr ("id")+"\"", "class=\""+ $(this).attr ("class")+"\"");
|
53 |
-
|
54 |
-
$(this).attr ("style", ai_adb_style + ' ' + ai_adb_css);
|
55 |
-
}
|
56 |
-
});
|
57 |
-
});
|
58 |
-
|
59 |
-
$(".AI_ADB_CONTENT_DELETE_BEGIN_CLASS").each (function () {
|
60 |
-
var ai_adb_parent = $(this).parent ();
|
61 |
-
|
62 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING DELETE, parent", ai_adb_parent.prop ("tagName"), "id=\""+ ai_adb_parent.attr ("id")+"\"", "class=\""+ ai_adb_parent.attr ("class")+"\"");
|
63 |
-
|
64 |
-
var ai_adb_selectors = $(this).data ("selectors");
|
65 |
-
if (typeof ai_adb_selectors == "undefined" || ai_adb_selectors == '') ai_adb_selectors = "p";
|
66 |
-
|
67 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING DELETE, selectors='" + ai_adb_selectors + "'");
|
68 |
-
|
69 |
-
var ai_adb_action = false;
|
70 |
-
$(ai_adb_parent).find ('.AI_ADB_CONTENT_DELETE_BEGIN_CLASS, .AI_ADB_CONTENT_DELETE_END_CLASS, ' + ai_adb_selectors).each (function () {
|
71 |
-
if ($(this).hasClass ("AI_ADB_CONTENT_DELETE_BEGIN_CLASS")) {$(this).remove (); ai_adb_action = true;}
|
72 |
-
else if ($(this).hasClass ("AI_ADB_CONTENT_DELETE_END_CLASS")) {$(this).remove (); ai_adb_action = false;}
|
73 |
-
else if (ai_adb_action) {
|
74 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING DELETE:", $(this).prop ("tagName"), "id=\""+ $(this).attr ("id")+"\"", "class=\""+ $(this).attr ("class")+"\"");
|
75 |
-
|
76 |
-
$(this).remove ();
|
77 |
-
}
|
78 |
-
});
|
79 |
-
|
80 |
-
});
|
81 |
-
|
82 |
-
$(".AI_ADB_CONTENT_REPLACE_BEGIN_CLASS").each (function () {
|
83 |
-
var ai_adb_parent = $(this).parent ();
|
84 |
-
|
85 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING REPLACE, parent", ai_adb_parent.prop ("tagName"), "id=\""+ ai_adb_parent.attr ("id")+"\"", "class=\""+ ai_adb_parent.attr ("class")+"\"");
|
86 |
-
|
87 |
-
var ai_adb_text = $(this).data ("text");
|
88 |
-
if (typeof ai_adb_text == "undefined") ai_adb_text = "";
|
89 |
-
|
90 |
-
var ai_adb_css = $(this).data ("css");
|
91 |
-
if (typeof ai_adb_css == "undefined") ai_adb_css = "";
|
92 |
-
|
93 |
-
var ai_adb_selectors = $(this).data ("selectors");
|
94 |
-
if (typeof ai_adb_selectors == "undefined" || ai_adb_selectors == '') ai_adb_selectors = "p";
|
95 |
-
|
96 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING REPLACE, text=\'" + ai_adb_text + '\'', 'css=\'' + ai_adb_css +'\'', "selectors='" + ai_adb_selectors + "'");
|
97 |
-
|
98 |
-
var ai_adb_action = false;
|
99 |
-
$(ai_adb_parent).find ('.AI_ADB_CONTENT_REPLACE_BEGIN_CLASS, .AI_ADB_CONTENT_REPLACE_END_CLASS, ' + ai_adb_selectors).each (function () {
|
100 |
-
if ($(this).hasClass ("AI_ADB_CONTENT_REPLACE_BEGIN_CLASS")) {$(this).remove (); ai_adb_action = true;}
|
101 |
-
else if ($(this).hasClass ("AI_ADB_CONTENT_REPLACE_END_CLASS")) {$(this).remove (); ai_adb_action = false;}
|
102 |
-
else if (ai_adb_action) {
|
103 |
-
if (ai_adb_text.length != 0) {
|
104 |
-
var n = Math.round ($(this).text ().length / (ai_adb_text.length + 1));
|
105 |
-
$(this).text (Array(n + 1).join(ai_adb_text + ' ').trim ());
|
106 |
-
} else $(this).text ('');
|
107 |
-
|
108 |
-
if (ai_adb_css != '') {
|
109 |
-
var ai_adb_style = $(this).attr ("style");
|
110 |
-
if (typeof ai_adb_style == "undefined") ai_adb_style = "";
|
111 |
-
else {
|
112 |
-
ai_adb_style = ai_adb_style.trim ();
|
113 |
-
if (ai_adb_style != '' && ai_adb_style [ai_adb_style.length - 1] != ';') {
|
114 |
-
ai_adb_style = ai_adb_style + ';';
|
115 |
-
}
|
116 |
-
}
|
117 |
-
if (ai_adb_css != '') {
|
118 |
-
ai_adb_css = ' ' + ai_adb_css;
|
119 |
-
}
|
120 |
-
$(this).attr ("style", ai_adb_style + ai_adb_css);
|
121 |
-
}
|
122 |
-
|
123 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING REPLACE:", $(this).prop ("tagName"), "id=\""+ $(this).attr ("id")+"\"", "class=\""+ $(this).attr ("class")+"\"");
|
124 |
-
}
|
125 |
-
});
|
126 |
-
});
|
127 |
-
|
128 |
-
}(jQuery));
|
129 |
-
}
|
130 |
-
|
131 |
-
function ai_adb_process_blocks (element) {
|
132 |
-
(function ($) {
|
133 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 2
|
134 |
-
// var ai_adb_debugging = false;
|
135 |
-
|
136 |
-
if (typeof element == 'undefined') {
|
137 |
-
element = $('body');
|
138 |
-
if (ai_adb_debugging) console.log ('');
|
139 |
-
}
|
140 |
-
|
141 |
-
var ai_adb_data = $(b64d ("Ym9keQ==")).attr (AI_ADB_ATTR_NAME);
|
142 |
-
if (typeof ai_adb_data === "string") {
|
143 |
-
var ai_adb_active = ai_adb_data == b64d ("bWFzaw==");
|
144 |
-
} else {
|
145 |
-
var ai_adb_active = null;
|
146 |
-
}
|
147 |
-
|
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;
|
154 |
-
|
155 |
-
do {
|
156 |
-
var code_insertion = false;
|
157 |
-
|
158 |
-
// Don't use data () as the value will be cached - wrong value for tracking
|
159 |
-
$(".ai-adb-hide", element).each (function () {
|
160 |
-
$(this).css ({"display": "none", "visibility": "hidden"});
|
161 |
-
|
162 |
-
$(this).removeClass ('ai-adb-hide');
|
163 |
-
|
164 |
-
// Disable tracking
|
165 |
-
var wrapping_div = $(this).closest ('div[data-ai]');
|
166 |
-
if (typeof wrapping_div.attr ("data-ai") != "undefined") {
|
167 |
-
var data = JSON.parse (b64d (wrapping_div.attr ("data-ai")));
|
168 |
-
if (typeof data !== "undefined" && data.constructor === Array) {
|
169 |
-
data [1] = "";
|
170 |
-
|
171 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING TRACKING ", b64d (wrapping_div.attr ("data-ai")), ' <= ', JSON.stringify (data));
|
172 |
-
|
173 |
-
wrapping_div.attr ("data-ai", b64e (JSON.stringify (data)));
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
ai_disable_processing ($(this));
|
178 |
-
|
179 |
-
if (ai_adb_debugging) {
|
180 |
-
var debug_info = $(this).data ("ai-debug");
|
181 |
-
console.log ("AI AD BLOCKING HIDE", typeof debug_info != "undefined" ? debug_info : "");
|
182 |
-
}
|
183 |
-
});
|
184 |
-
|
185 |
-
// after hide to update tracking data on replace
|
186 |
-
// Don't use data () as the value will be cached - wrong value for tracking
|
187 |
-
$(".ai-adb-show", element).each (function () {
|
188 |
-
$(this).css ({"display": "block", "visibility": "visible"});
|
189 |
-
|
190 |
-
$(this).removeClass ('ai-adb-show');
|
191 |
-
|
192 |
-
if (typeof $(this).data ('code') != 'undefined') {
|
193 |
-
var adb_code = b64d ($(this).data ('code'));
|
194 |
-
|
195 |
-
if (ai_adb_debugging) console.log ('AI AD BLOCKING SHOW INSERT CODE');
|
196 |
-
if (ai_adb_debugging) console.log ('');
|
197 |
-
|
198 |
-
$(this).append (adb_code);
|
199 |
-
|
200 |
-
code_insertion = true;
|
201 |
-
code_inserted = true;
|
202 |
-
|
203 |
-
// Process rotations to set versions before tracking data is set
|
204 |
-
if (typeof ai_process_elements == 'function') {
|
205 |
-
ai_process_elements ();
|
206 |
-
}
|
207 |
-
}
|
208 |
-
|
209 |
-
var tracking_data = $(this).attr ('data-ai-tracking');
|
210 |
-
if (typeof tracking_data != 'undefined') {
|
211 |
-
var wrapping_div = $(this).closest ('div[data-ai]');
|
212 |
-
if (typeof wrapping_div.attr ("data-ai") != "undefined") {
|
213 |
-
if ($(this).hasClass ('ai-no-tracking')) {
|
214 |
-
var data = JSON.parse (b64d (wrapping_div.attr ("data-ai")));
|
215 |
-
if (typeof data !== "undefined" && data.constructor === Array) {
|
216 |
-
data [1] = "";
|
217 |
-
tracking_data = b64e (JSON.stringify (data));
|
218 |
-
}
|
219 |
-
}
|
220 |
-
|
221 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING TRACKING ", b64d (wrapping_div.attr ("data-ai")), ' <= ', b64d (tracking_data));
|
222 |
-
|
223 |
-
wrapping_div.attr ("data-ai", tracking_data);
|
224 |
-
}
|
225 |
-
}
|
226 |
-
if (ai_adb_debugging) {
|
227 |
-
var debug_info = $(this).data ("ai-debug");
|
228 |
-
console.log ("AI AD BLOCKING SHOW", typeof debug_info != "undefined" ? debug_info : "");
|
229 |
-
}
|
230 |
-
});
|
231 |
-
} while (code_insertion);
|
232 |
-
|
233 |
-
setTimeout (function() {
|
234 |
-
if (typeof ai_process_impressions == 'function' && ai_tracking_finished == true) {
|
235 |
-
ai_process_impressions ();
|
236 |
-
}
|
237 |
-
if (typeof ai_install_click_trackers == 'function' && ai_tracking_finished == true) {
|
238 |
-
ai_install_click_trackers ();
|
239 |
-
}
|
240 |
-
}, 15);
|
241 |
-
|
242 |
-
setTimeout (ai_adb_process_content, 10);
|
243 |
-
} else {
|
244 |
-
// Prevent tracking if block was not displayed because of cookie
|
245 |
-
$(".ai-adb-hide", element).each (function () {
|
246 |
-
if (ai_adb_debugging) console.log ('AI ai-adb-hide', $(this), $(this).outerHeight (), $(this).closest ('.ai-adb-show').length);
|
247 |
-
|
248 |
-
$(this).removeClass ('ai-adb-hide');
|
249 |
-
|
250 |
-
if ($(this).outerHeight () == 0 && $(this).closest ('.ai-adb-show').length == 0) {
|
251 |
-
// Top level (not nested) block
|
252 |
-
var wrapper = $(this).closest ('div[data-ai]');
|
253 |
-
if (typeof wrapper.attr ("data-ai") != "undefined") {
|
254 |
-
var data = JSON.parse (b64d (wrapper.attr ("data-ai")));
|
255 |
-
if (typeof data !== "undefined" && data.constructor === Array) {
|
256 |
-
data [1] = "";
|
257 |
-
|
258 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING TRACKING DISABLED: ", b64d (wrapper.attr ("data-ai")), ' <= ', JSON.stringify (data));
|
259 |
-
|
260 |
-
wrapper.attr ("data-ai", b64e (JSON.stringify (data)));
|
261 |
-
|
262 |
-
// Hide block (wrapping div with margin)
|
263 |
-
wrapper.addClass ('ai-viewport-0').css ("display", "none");
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
}
|
268 |
-
});
|
269 |
-
|
270 |
-
$(".ai-adb-show", element).each (function () {
|
271 |
-
ai_disable_processing ($(this));
|
272 |
-
|
273 |
-
$(this).removeClass ('ai-adb-show');
|
274 |
-
|
275 |
-
if (ai_adb_debugging) console.log ('AI AD BLOCKING SHOW disable processing', $(this).prop ("tagName") + '.' + $(this).attr ('class'));
|
276 |
-
});
|
277 |
-
}
|
278 |
-
}
|
279 |
-
|
280 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING block actions END");
|
281 |
-
}(jQuery));
|
282 |
-
}
|
283 |
-
|
284 |
-
ai_adb_detection_type_log = function (n) {
|
285 |
-
var type = ai_adb_detection_type (n);
|
286 |
-
var ai_adb_events = jQuery('#ai-adb-events');
|
287 |
-
if (ai_adb_events.count != 0) {
|
288 |
-
var message = ai_adb_events.text ();
|
289 |
-
if (message != '') message = message + ', '; else message = message + ', EVENTS: ';
|
290 |
-
message = message + n;
|
291 |
-
ai_adb_events.text (message);
|
292 |
-
}
|
293 |
-
return type;
|
294 |
-
}
|
295 |
-
|
296 |
-
ai_adb_detection_type = function (n) {
|
297 |
-
|
298 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 3
|
299 |
-
// var ai_adb_debugging = false;
|
300 |
-
|
301 |
-
if (ai_adb_debugging) {
|
302 |
-
switch (n) {
|
303 |
-
case 0:
|
304 |
-
return "0 debugging";
|
305 |
-
break;
|
306 |
-
case 1:
|
307 |
-
return "1 ads create element";
|
308 |
-
break;
|
309 |
-
case 2:
|
310 |
-
return "2 sponsors window var";
|
311 |
-
break;
|
312 |
-
case 3:
|
313 |
-
return "3 banner element";
|
314 |
-
break;
|
315 |
-
case 4:
|
316 |
-
return "4 custom selectors";
|
317 |
-
break;
|
318 |
-
case 5:
|
319 |
-
return "5 ga";
|
320 |
-
break;
|
321 |
-
case 6:
|
322 |
-
return "6 media.net";
|
323 |
-
break;
|
324 |
-
case 7:
|
325 |
-
return "7 adsense";
|
326 |
-
break;
|
327 |
-
case 8:
|
328 |
-
return "8 adnxs.com";
|
329 |
-
break;
|
330 |
-
case 9:
|
331 |
-
return "9 fun adblock 3";
|
332 |
-
break;
|
333 |
-
case 10:
|
334 |
-
return "10 fun adblock 4";
|
335 |
-
break;
|
336 |
-
default:
|
337 |
-
return n;
|
338 |
-
break;
|
339 |
-
}
|
340 |
-
} else return '';
|
341 |
-
}
|
342 |
-
|
343 |
-
var ai_adb_detected = function (n) {
|
344 |
-
setTimeout (function() {
|
345 |
-
ai_adb_detected_actions (n);
|
346 |
-
}, 2);
|
347 |
-
}
|
348 |
-
|
349 |
-
var ai_disable_processing = function (element) {
|
350 |
-
jQuery(element).find ('.ai-lazy').removeClass ('ai-lazy'); // Disable lazy loading
|
351 |
-
jQuery(element).find ('.ai-manual').removeClass ('ai-manual'); // Disable manual loading
|
352 |
-
jQuery(element).find ('.ai-rotate').removeClass ('ai-unprocessed').removeAttr ('data-info'); // Disable rotations
|
353 |
-
jQuery(element).find ('.ai-list-data').removeClass ('ai-list-data'); // Disable lists
|
354 |
-
jQuery(element).find ('.ai-ip-data').removeClass ('ai-ip-data'); // Disable IP lists
|
355 |
-
jQuery(element).find ('[data-code]').removeAttr ('data-code'); // Disable insertions
|
356 |
-
}
|
357 |
-
|
358 |
-
var ai_adb_detected_actions = function(n) {
|
359 |
-
|
360 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 4
|
361 |
-
// var ai_adb_debugging = false;
|
362 |
-
|
363 |
-
if (ai_adb_debugging && n == 0) console.log ('');
|
364 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING DETECTED", ai_adb_detection_type_log (n));
|
365 |
-
|
366 |
-
if (!ai_adb_active) {
|
367 |
-
ai_adb_active = true;
|
368 |
-
|
369 |
-
jQuery(b64d ("Ym9keQ==")).attr (AI_ADB_ATTR_NAME, b64d ("bWFzaw=="));
|
370 |
-
|
371 |
-
(function ($) {
|
372 |
-
|
373 |
-
$(window).ready(function () {
|
374 |
-
ai_adb_process_blocks ();
|
375 |
-
|
376 |
-
// if (code_inserted && typeof ai_process_elements == 'function') {
|
377 |
-
// setTimeout (ai_process_elements, 20);
|
378 |
-
// }
|
379 |
-
});
|
380 |
-
|
381 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING action check");
|
382 |
-
// AiCookies.remove (ai_adb_pgv_cookie_name, {path: "/" });
|
383 |
-
|
384 |
-
// Disable action for bots
|
385 |
-
if (typeof MobileDetect !== "undefined") {
|
386 |
-
var md = new MobileDetect (window.navigator.userAgent);
|
387 |
-
|
388 |
-
if (ai_adb_debugging) console.log ('AI AD BLOCKING IS BOT:', md.is ('bot'));
|
389 |
-
|
390 |
-
if (md.is ('bot')) {
|
391 |
-
ai_adb_action = 0;
|
392 |
-
}
|
393 |
-
}
|
394 |
-
|
395 |
-
if (ai_adb_page_views != '') {
|
396 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING page views delay:", ai_adb_page_views);
|
397 |
-
if (ai_adb_page_views.includes (',')) {
|
398 |
-
var ai_adb_page_view_parts = ai_adb_page_views.split (',');
|
399 |
-
|
400 |
-
var ai_adb_page_view_delay = parseInt (ai_adb_page_view_parts [0]);
|
401 |
-
var ai_adb_page_view_repeat = parseInt (ai_adb_page_view_parts [1]);
|
402 |
-
|
403 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING page views delay:", ai_adb_page_view_delay, "repeat:", ai_adb_page_view_repeat);
|
404 |
-
} else {
|
405 |
-
var ai_adb_page_view_delay = parseInt (ai_adb_page_views);
|
406 |
-
var ai_adb_page_view_repeat = 0
|
407 |
-
|
408 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING page views delay:", ai_adb_page_view_delay);
|
409 |
-
}
|
410 |
-
|
411 |
-
var ai_adb_page_view_counter = 1;
|
412 |
-
var cookie = AiCookies.get (ai_adb_pgv_cookie_name);
|
413 |
-
if (typeof cookie != "undefined") ai_adb_page_view_counter = parseInt (cookie) + 1;
|
414 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING page views cookie:", cookie, "- page view:", ai_adb_page_view_counter);
|
415 |
-
if (ai_adb_page_view_counter <= ai_adb_page_view_delay) {
|
416 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING", ai_adb_page_view_delay, "page views not reached, no action");
|
417 |
-
AiCookies.set (ai_adb_pgv_cookie_name, ai_adb_page_view_counter, {expires: 365, path: "/"});
|
418 |
-
window.ai_d1 = ai_adb_page_view_counter;
|
419 |
-
window.AI_ADB_STATUS_MESSAGE=1;
|
420 |
-
return;
|
421 |
-
}
|
422 |
-
if (ai_adb_page_view_repeat != 0) {
|
423 |
-
AiCookies.set (ai_adb_pgv_cookie_name, ai_adb_page_view_counter, {expires: 365, path: "/"});
|
424 |
-
if ((ai_adb_page_view_counter - ai_adb_page_view_delay - 1) % ai_adb_page_view_repeat != 0) {
|
425 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING every", ai_adb_page_view_repeat, "page views, no action");
|
426 |
-
window.ai_d1 = ai_adb_page_view_counter;
|
427 |
-
window.AI_ADB_STATUS_MESSAGE=1;
|
428 |
-
return;
|
429 |
-
}
|
430 |
-
}
|
431 |
-
}
|
432 |
-
|
433 |
-
if (ai_adb_message_cookie_lifetime != 0 && (ai_adb_action != 1 || !ai_adb_message_undismissible)) {
|
434 |
-
|
435 |
-
var cookie = AiCookies.get (ai_adb_act_cookie_name);
|
436 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING cookie:", cookie);
|
437 |
-
if (typeof cookie != "undefined" && cookie == "AI_CONST_AI_ADB_COOKIE_VALUE") {
|
438 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING valid cookie detected, no action");
|
439 |
-
window.AI_ADB_STATUS_MESSAGE=2;
|
440 |
-
return;
|
441 |
-
}
|
442 |
-
|
443 |
-
else if (ai_adb_debugging) console.log ("AI AD BLOCKING invalid cookie");
|
444 |
-
AiCookies.set (ai_adb_act_cookie_name, "AI_CONST_AI_ADB_COOKIE_VALUE", {expires: ai_adb_message_cookie_lifetime, path: "/"});
|
445 |
-
} else
|
446 |
-
AiCookies.remove (ai_adb_act_cookie_name, {path: "/" });
|
447 |
-
|
448 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING action", ai_adb_action);
|
449 |
-
|
450 |
-
if (ai_adb_action == 0) {
|
451 |
-
ai_dummy = 16; // Do not remove - to prevent optimization
|
452 |
-
window.AI_ADB_STATUS_MESSAGE=6;
|
453 |
-
ai_dummy ++; // Do not remove - to prevent optimization
|
454 |
-
} else {
|
455 |
-
window.AI_ADB_STATUS_MESSAGE=3;
|
456 |
-
ai_dummy = 13; // Do not remove - to prevent optimization
|
457 |
-
}
|
458 |
-
|
459 |
-
switch (ai_adb_action) {
|
460 |
-
case 1:
|
461 |
-
if (!ai_adb_message_undismissible) {
|
462 |
-
ai_adb_overlay.click (function () {
|
463 |
-
$(this).remove();
|
464 |
-
ai_adb_message_window.remove();
|
465 |
-
});
|
466 |
-
ai_adb_message_window.click (function () {
|
467 |
-
$(this).remove();
|
468 |
-
ai_adb_overlay.remove();
|
469 |
-
});
|
470 |
-
window.onkeydown = function( event ) {
|
471 |
-
if (event.keyCode === 27 ) {
|
472 |
-
ai_adb_overlay.click ();
|
473 |
-
ai_adb_message_window.click ();
|
474 |
-
}
|
475 |
-
}
|
476 |
-
|
477 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING MESSAGE click detection installed");
|
478 |
-
|
479 |
-
} else {
|
480 |
-
// AiCookies.remove (ai_adb_act_cookie_name, {path: "/" });
|
481 |
-
|
482 |
-
ai_adb_overlay.find ('[style*="cursor"]').css ("cursor", "no-drop");
|
483 |
-
ai_adb_message_window.find ('[style*="cursor"]').css ("cursor", "no-drop");
|
484 |
-
}
|
485 |
-
|
486 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING MESSAGE");
|
487 |
-
|
488 |
-
var body_children = $(b64d ("Ym9keQ==")).children ();
|
489 |
-
body_children.eq (Math.floor (Math.random() * body_children.length)).after (ai_adb_overlay);
|
490 |
-
body_children.eq (Math.floor (Math.random() * body_children.length)).after (ai_adb_message_window);
|
491 |
-
|
492 |
-
break;
|
493 |
-
case 2:
|
494 |
-
if (ai_adb_redirection_url != "") {
|
495 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING REDIRECTION to", ai_adb_redirection_url);
|
496 |
-
|
497 |
-
var redirect = true;
|
498 |
-
if (ai_adb_redirection_url.toLowerCase().substring (0, 4) == "http") {
|
499 |
-
if (window.location.href == ai_adb_redirection_url) var redirect = false;
|
500 |
-
} else {
|
501 |
-
if (window.location.pathname == ai_adb_redirection_url) var redirect = false;
|
502 |
-
}
|
503 |
-
|
504 |
-
if (redirect) {
|
505 |
-
var cookie = AiCookies.get (ai_adb_page_redirection_cookie_name);
|
506 |
-
if (typeof cookie == "undefined") {
|
507 |
-
var date = new Date();
|
508 |
-
date.setTime (date.getTime() + (10 * 1000));
|
509 |
-
AiCookies.set (ai_adb_page_redirection_cookie_name, window.location.href, {expires: date, path: "/" });
|
510 |
-
|
511 |
-
window.location.replace (ai_adb_redirection_url)
|
512 |
-
} else {
|
513 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING no redirection, cookie:", cookie);
|
514 |
-
|
515 |
-
}
|
516 |
-
} else {
|
517 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING already on page", window.location.href);
|
518 |
-
AiCookies.remove (ai_adb_page_redirection_cookie_name, {path: "/"});
|
519 |
-
}
|
520 |
-
}
|
521 |
-
break;
|
522 |
-
}
|
523 |
-
|
524 |
-
}(jQuery));
|
525 |
-
}
|
526 |
-
}
|
527 |
-
|
528 |
-
|
529 |
-
var ai_adb_undetected = function(n) {
|
530 |
-
ai_adb_counter ++;
|
531 |
-
|
532 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 5
|
533 |
-
// var ai_adb_debugging = false;
|
534 |
-
|
535 |
-
// if (ai_adb_debugging && n == 1) console.log ('');
|
536 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING not detected:", '(' + ai_adb_counter + ')', ai_adb_detection_type (n));
|
537 |
-
|
538 |
-
if (!ai_adb_active && ai_adb_counter == 4) {
|
539 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING NOT DETECTED");
|
540 |
-
|
541 |
-
jQuery(b64d ("Ym9keQ==")).attr (AI_ADB_ATTR_NAME, b64d ("Y2xlYXI="));
|
542 |
-
|
543 |
-
ai_dummy = 11; // Do not remove - to prevent optimization
|
544 |
-
window.AI_ADB_STATUS_MESSAGE=4; // Check replacement code {}
|
545 |
-
ai_dummy = 14; // Do not remove - to prevent optimization
|
546 |
-
|
547 |
-
// // Prevent tracking if block was not displayed because of cookie
|
548 |
-
// jQuery(".ai-adb-hide").each (function () {
|
549 |
-
// if (ai_adb_debugging) console.log ('AI ai-adb-hide', jQuery(this), jQuery(this).outerHeight (), jQuery(this).closest ('.ai-adb-show').length);
|
550 |
-
|
551 |
-
// if (jQuery(this).outerHeight () == 0 && jQuery(this).closest ('.ai-adb-show').length == 0) {
|
552 |
-
// // Top level (not nested) block
|
553 |
-
// var wrapper = jQuery(this).closest ('div[data-ai]');
|
554 |
-
// if (typeof wrapper.attr ("data-ai") != "undefined") {
|
555 |
-
// var data = JSON.parse (b64d (wrapper.attr ("data-ai")));
|
556 |
-
// if (typeof data !== "undefined" && data.constructor === Array) {
|
557 |
-
// data [1] = "";
|
558 |
-
|
559 |
-
// if (ai_adb_debugging) console.log ("AI AD BLOCKING TRACKING DISABLED: ", b64d (wrapper.attr ("data-ai")), ' <= ', JSON.stringify (data));
|
560 |
-
|
561 |
-
// wrapper.attr ("data-ai", b64e (JSON.stringify (data)));
|
562 |
-
|
563 |
-
// // Hide block (wrapping div with margin)
|
564 |
-
// wrapper.addClass ('ai-viewport-0').css ("display", "none");
|
565 |
-
// }
|
566 |
-
// }
|
567 |
-
|
568 |
-
// }
|
569 |
-
// });
|
570 |
-
|
571 |
-
// jQuery(".ai-adb-show").each (function () {
|
572 |
-
// ai_disable_processing (jQuery (this));
|
573 |
-
// });
|
574 |
-
|
575 |
-
ai_adb_process_blocks ();
|
576 |
-
|
577 |
-
// var redirected_page = false;
|
578 |
-
// if (ai_adb_redirection_url.toLowerCase().substring (0, 4) == "http") {
|
579 |
-
// if (window.location.href == ai_adb_redirection_url) var redirected_page = true;
|
580 |
-
// } else {
|
581 |
-
// if (window.location.pathname == ai_adb_redirection_url) var redirected_page = true;
|
582 |
-
// }
|
583 |
-
|
584 |
-
// if (redirected_page) {
|
585 |
-
// //var cookie = jQuery.cookie (ai_adb_page_redirection_cookie_name);
|
586 |
-
// var cookie = AiCookies.get (ai_adb_page_redirection_cookie_name);
|
587 |
-
// if (typeof cookie != "undefined" && cookie.toLowerCase().substring (0, 4) == "http") {
|
588 |
-
// if (ai_adb_debugging) console.log ("AI AD BLOCKING returning to", cookie);
|
589 |
-
// //jQuery.removeCookie (ai_adb_page_redirection_cookie_name, {path: "/"});
|
590 |
-
// AiCookies.remove (ai_adb_page_redirection_cookie_name, {path: "/"});
|
591 |
-
// window.location.replace (cookie);
|
592 |
-
// }
|
593 |
-
// }
|
594 |
-
|
595 |
-
}
|
596 |
-
}
|
597 |
-
|
598 |
-
if (AI_DBG_AI_DEBUG_AD_BLOCKING) jQuery (document).ready (function () {ai_adb_detected (0)});
|
599 |
-
|
600 |
-
jQuery (document).ready (function ($) {
|
601 |
-
$(window).ready (function () {
|
602 |
-
|
603 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 6
|
604 |
-
// var ai_adb_debugging = false;
|
605 |
-
|
606 |
-
// var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
|
607 |
-
ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
|
608 |
-
|
609 |
-
setTimeout (function() {
|
610 |
-
$("#ai-adb-bar").click (function () {
|
611 |
-
AiCookies.remove (ai_adb_act_cookie_name, {path: "/" });
|
612 |
-
AiCookies.remove (ai_adb_pgv_cookie_name, {path: "/" });
|
613 |
-
window.AI_ADB_STATUS_MESSAGE=5;
|
614 |
-
ai_dummy = 15; // Do not remove - to prevent optimization
|
615 |
-
});
|
616 |
-
}, 2);
|
617 |
-
|
618 |
-
// if (jQuery("#banner-advert-container").length) {
|
619 |
-
// if ($("#banner-advert-container img").length > 0) {
|
620 |
-
// if ($("#banner-advert-container img").outerHeight() === 0) {
|
621 |
-
// if (!ai_adb_active || ai_debugging_active) ai_adb_detected (3);
|
622 |
-
// } else ai_adb_undetected (3);
|
623 |
-
// $("#banner-advert-container img").remove();
|
624 |
-
// }
|
625 |
-
// }
|
626 |
-
|
627 |
-
if ((!ai_adb_active || ai_debugging_active) && ai_adb_selectors != "") {
|
628 |
-
var ai_adb_el_counter = 0;
|
629 |
-
var ai_adb_el_zero = 0;
|
630 |
-
var ai_adb_selector = ai_adb_selectors.split (",");
|
631 |
-
$.each (ai_adb_selector, function (i) {
|
632 |
-
ai_adb_selector [i] = ai_adb_selector [i].trim ();
|
633 |
-
|
634 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING selector", ai_adb_selector [i]);
|
635 |
-
|
636 |
-
if ($(ai_adb_selector [i]).length != 0) {
|
637 |
-
$(ai_adb_selector [i]).each (function (n) {
|
638 |
-
|
639 |
-
var outer_height = $(this).outerHeight ();
|
640 |
-
|
641 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING element id=\"" + $(this).attr ("id") + "\" class=\"" + $(this).attr ("class") + "\" heights:", $(this).outerHeight (), $(this).innerHeight (), $(this).height ());
|
642 |
-
|
643 |
-
var ai_attributes = $(this).find ('.ai-attributes');
|
644 |
-
if (ai_attributes.length) {
|
645 |
-
ai_attributes.each (function (){
|
646 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING attributes height:", $(this).outerHeight ());
|
647 |
-
if (outer_height >= $(this).outerHeight ()) {
|
648 |
-
outer_height -= $(this).outerHeight ();
|
649 |
-
}
|
650 |
-
});
|
651 |
-
}
|
652 |
-
|
653 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING effective height:", outer_height);
|
654 |
-
|
655 |
-
ai_adb_el_counter ++;
|
656 |
-
if (outer_height === 0) {
|
657 |
-
$ (document).ready (function () {if (!ai_adb_active || ai_debugging_active) ai_adb_detected (4)});
|
658 |
-
ai_adb_el_zero ++;
|
659 |
-
if (!ai_debugging_active) return false;
|
660 |
-
}
|
661 |
-
|
662 |
-
});
|
663 |
-
|
664 |
-
}
|
665 |
-
});
|
666 |
-
if (ai_adb_el_counter != 0 && ai_adb_el_zero == 0) $(document).ready (function () {ai_adb_undetected (4)});
|
667 |
-
}
|
668 |
-
|
669 |
-
var img_container = b64d ("aW1nI2FpLWFkYi1hZG54cw==");
|
670 |
-
if (jQuery(img_container).length) {
|
671 |
-
jQuery (img_container)
|
672 |
-
.on ('load', function() { ai_adb_undetected (8); })
|
673 |
-
.on ('error', function() { if (!ai_adb_active || ai_debugging_active) ai_adb_detected (8); })
|
674 |
-
.attr ("src", b64d ("aHR0cHM6Ly9pYi5hZG54cy5jb20vZ2V0dWlkP2h0dHBzJTNBJTJGJTJGcm91dGVyLmluZm9saW5rcy5jb20lMkZkeW4lMkZhcG4tdXN5bmMlM0Z1c2VyX2lkJTNEJTI0VUlE"));
|
675 |
-
}
|
676 |
-
});
|
677 |
-
});
|
678 |
-
|
679 |
-
function ai_adb_get_script (ai_adb_script, ai_adb_action) {
|
680 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 7
|
681 |
-
// var ai_adb_debugging = false;
|
682 |
-
|
683 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING loading script", ai_adb_script);
|
684 |
-
|
685 |
-
var script = document.createElement ('script');
|
686 |
-
var date = new Date();
|
687 |
-
script.src = 'ai-adb-url' + ai_adb_script + '.js?ver=' + date.getTime();
|
688 |
-
|
689 |
-
var head = document.getElementsByTagName ('head')[0],
|
690 |
-
done = false;
|
691 |
-
|
692 |
-
// Attach handlers for all browsers
|
693 |
-
|
694 |
-
script.onerror = function () {
|
695 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING error loading script", ai_adb_script);
|
696 |
-
|
697 |
-
if (ai_adb_action) {
|
698 |
-
ai_adb_action ();
|
699 |
-
}
|
700 |
-
script.onerror = null;
|
701 |
-
head.removeChild (script);
|
702 |
-
}
|
703 |
-
|
704 |
-
script.onload = script.onreadystatechange = function () {
|
705 |
-
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
|
706 |
-
done = true;
|
707 |
-
|
708 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING script loaded ", ai_adb_script);
|
709 |
-
|
710 |
-
if (ai_adb_action) {
|
711 |
-
ai_adb_action ();
|
712 |
-
}
|
713 |
-
|
714 |
-
script.onload = script.onreadystatechange = null;
|
715 |
-
head.removeChild (script);
|
716 |
-
};
|
717 |
-
};
|
718 |
-
|
719 |
-
head.appendChild (script);
|
720 |
-
};
|
721 |
-
|
722 |
-
jQuery (window).on ('load', function () {
|
723 |
-
var ai_adb_debugging = typeof ai_debugging !== 'undefined'; // 8
|
724 |
-
// var ai_adb_debugging = false;
|
725 |
-
|
726 |
-
if (ai_adb_debugging) console.log ("AI AD BLOCKING window load");
|
727 |
-
|
728 |
-
function ai_adb_1 () {
|
729 |
-
if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")){
|
730 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (1);
|
731 |
-
} else {
|
732 |
-
ai_adb_undetected (1);
|
733 |
-
}
|
734 |
-
}
|
735 |
-
|
736 |
-
function ai_adb_2 () {
|
737 |
-
if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
|
738 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (2);
|
739 |
-
} else {
|
740 |
-
ai_adb_undetected (2);
|
741 |
-
}
|
742 |
-
}
|
743 |
-
|
744 |
-
setTimeout (function() {
|
745 |
-
var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
|
746 |
-
|
747 |
-
if (jQuery(b64d ("I2FpLWFkYi1hZHM=")).length) {
|
748 |
-
if (!document.getElementById ("AI_CONST_AI_ADB_1_NAME")) {
|
749 |
-
ai_adb_get_script ('ads', ai_adb_1);
|
750 |
-
} else ai_adb_1 ();
|
751 |
-
}
|
752 |
-
|
753 |
-
if (jQuery(b64d ("I2FpLWFkYi1nYQ==")).length) {
|
754 |
-
if (!(typeof ga == 'function' && ga.toString().length > 30) &&
|
755 |
-
!(typeof __gaTracker == 'function' && __gaTracker.toString ().length > 30)) {
|
756 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (5);
|
757 |
-
} else {
|
758 |
-
ai_adb_undetected (5);
|
759 |
-
}
|
760 |
-
}
|
761 |
-
|
762 |
-
if (jQuery(b64d ("I2FpLWFkYi1zcG9uc29ycw==")).length) {
|
763 |
-
if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
|
764 |
-
ai_adb_get_script ('sponsors', ai_adb_2);
|
765 |
-
} else ai_adb_2 ();
|
766 |
-
}
|
767 |
-
|
768 |
-
var banner_advert_container = b64d ("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVy");
|
769 |
-
var banner_advert_container_img = b64d ("I2Jhbm5lci1hZHZlcnQtY29udGFpbmVyIGltZw==");
|
770 |
-
if (jQuery(banner_advert_container).length) {
|
771 |
-
if (jQuery(banner_advert_container_img).length > 0) {
|
772 |
-
if (jQuery(banner_advert_container_img).outerHeight() === 0) {
|
773 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (3);
|
774 |
-
} else ai_adb_undetected (3);
|
775 |
-
jQuery(banner_advert_container_img).remove();
|
776 |
-
}
|
777 |
-
}
|
778 |
-
|
779 |
-
setTimeout (function() {
|
780 |
-
if (jQuery(b64d ("I2FpLWFkYi1tbg==")).length) {
|
781 |
-
if (!(typeof _mNDetails == 'object' && JSON.stringify (_mNDetails).length > 400)) {
|
782 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (6);
|
783 |
-
} else {
|
784 |
-
ai_adb_undetected (6);
|
785 |
-
}
|
786 |
-
}
|
787 |
-
}, 40);
|
788 |
-
|
789 |
-
}, 120);
|
790 |
-
});
|
791 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/js/ai-adb.js
CHANGED
@@ -325,7 +325,7 @@ ai_adb_detection_type = function (n) {
|
|
325 |
return "7 adsense";
|
326 |
break;
|
327 |
case 8:
|
328 |
-
return "8
|
329 |
break;
|
330 |
case 9:
|
331 |
return "9 fun adblock 3";
|
@@ -333,6 +333,12 @@ ai_adb_detection_type = function (n) {
|
|
333 |
case 10:
|
334 |
return "10 fun adblock 4";
|
335 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
default:
|
337 |
return n;
|
338 |
break;
|
@@ -666,13 +672,15 @@ jQuery (document).ready (function ($) {
|
|
666 |
if (ai_adb_el_counter != 0 && ai_adb_el_zero == 0) $(document).ready (function () {ai_adb_undetected (4)});
|
667 |
}
|
668 |
|
669 |
-
var
|
670 |
-
if (
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
|
|
675 |
}
|
|
|
676 |
});
|
677 |
});
|
678 |
|
@@ -741,6 +749,42 @@ jQuery (window).on ('load', function () {
|
|
741 |
}
|
742 |
}
|
743 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
setTimeout (function() {
|
745 |
var ai_debugging_active = typeof ai_adb_fe_dbg !== 'undefined';
|
746 |
|
@@ -750,15 +794,6 @@ jQuery (window).on ('load', function () {
|
|
750 |
} else ai_adb_1 ();
|
751 |
}
|
752 |
|
753 |
-
if (jQuery(b64d ("I2FpLWFkYi1nYQ==")).length) {
|
754 |
-
if (!(typeof ga == 'function' && ga.toString().length > 30) &&
|
755 |
-
!(typeof __gaTracker == 'function' && __gaTracker.toString ().length > 30)) {
|
756 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (5);
|
757 |
-
} else {
|
758 |
-
ai_adb_undetected (5);
|
759 |
-
}
|
760 |
-
}
|
761 |
-
|
762 |
if (jQuery(b64d ("I2FpLWFkYi1zcG9uc29ycw==")).length) {
|
763 |
if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
|
764 |
ai_adb_get_script ('sponsors', ai_adb_2);
|
@@ -776,16 +811,13 @@ jQuery (window).on ('load', function () {
|
|
776 |
}
|
777 |
}
|
778 |
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (6);
|
783 |
-
} else {
|
784 |
-
ai_adb_undetected (6);
|
785 |
-
}
|
786 |
-
}
|
787 |
-
}, 80);
|
788 |
|
|
|
|
|
|
|
789 |
}, 120);
|
790 |
});
|
791 |
|
325 |
return "7 adsense";
|
326 |
break;
|
327 |
case 8:
|
328 |
+
return "8 doubleclick.net";
|
329 |
break;
|
330 |
case 9:
|
331 |
return "9 fun adblock 3";
|
333 |
case 10:
|
334 |
return "10 fun adblock 4";
|
335 |
break;
|
336 |
+
case 11:
|
337 |
+
return "11 banner js";
|
338 |
+
break;
|
339 |
+
case 12:
|
340 |
+
return "12 300x250 js";
|
341 |
+
break;
|
342 |
default:
|
343 |
return n;
|
344 |
break;
|
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 |
|
749 |
}
|
750 |
}
|
751 |
|
752 |
+
function ai_adb_11 () {
|
753 |
+
if (typeof window.ai_banner == "undefined") {
|
754 |
+
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (11);
|
755 |
+
} else {
|
756 |
+
ai_adb_undetected (11);
|
757 |
+
}
|
758 |
+
}
|
759 |
+
|
760 |
+
function ai_adb_12 () {
|
761 |
+
if (typeof window.ai_300x250 == "undefined") {
|
762 |
+
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (12);
|
763 |
+
} else {
|
764 |
+
ai_adb_undetected (12);
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
setTimeout (function() {
|
769 |
+
var element = jQuery (b64d ("I2FpLWFkYi1nYQ=="));
|
770 |
+
if (element.length) {
|
771 |
+
if (!!(element.width () * element.height ())) {
|
772 |
+
ai_adb_undetected (5);
|
773 |
+
} else {
|
774 |
+
if (!ai_adb_active || ai_debugging_active) ai_adb_detected (5);
|
775 |
+
}
|
776 |
+
}
|
777 |
+
|
778 |
+
var element = jQuery (b64d ("I2FpLWFkYi1tbg=="));
|
779 |
+
if (element.length) {
|
780 |
+
if (!!(element.width () * element.height ())) {
|
781 |
+
ai_adb_undetected (6);
|
782 |
+
} else {
|
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 |
|
794 |
} else ai_adb_1 ();
|
795 |
}
|
796 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
if (jQuery(b64d ("I2FpLWFkYi1zcG9uc29ycw==")).length) {
|
798 |
if (typeof window.AI_CONST_AI_ADB_2_NAME == "undefined") {
|
799 |
ai_adb_get_script ('sponsors', ai_adb_2);
|
811 |
}
|
812 |
}
|
813 |
|
814 |
+
if (jQuery(b64d ("I2FpLWFkYi1iYW5uZXI=")).length) {
|
815 |
+
ai_adb_11 ();
|
816 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
|
818 |
+
if (jQuery(b64d ("I2FpLWFkYi0zMDB4MjUw")).length) {
|
819 |
+
ai_adb_12 ();
|
820 |
+
}
|
821 |
}, 120);
|
822 |
});
|
823 |
|
includes/js/ai-adb.min.js
CHANGED
@@ -1,24 +1,23 @@
|
|
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
|
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+" "+
|
4 |
-
(a(this).remove(),
|
5 |
-
e=!1;else if(e){if(0!=
|
6 |
-
function ai_adb_process_blocks(a){(function(
|
7 |
-
f.constructor===Array&&(f[1]="",e.attr("data-ai",b64e(JSON.stringify(f))))}ai_disable_processing(
|
8 |
-
typeof f.attr("data-ai")){if(
|
9 |
-
a).each(function(){
|
10 |
-
ai_adb_detection_type_log=function(a){var
|
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(
|
13 |
-
"undefined"!=typeof e&&(g=parseInt(e)+1);if(g<=
|
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(){
|
16 |
-
4)?window.location.href==ai_adb_redirection_url&&(
|
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
|
19 |
-
a(this).outerHeight();f=a(this).find(".ai-attributes");f.length&&f.each(function(){h>=a(this).outerHeight()&&(h-=a(this).outerHeight())});
|
20 |
-
|
21 |
-
function
|
22 |
-
|
23 |
-
|
24 |
-
(!ai_adb_active||d)&&ai_adb_detected(3):ai_adb_undetected(3),jQuery(g).remove());setTimeout(function(){jQuery(b64d("I2FpLWFkYi1tbg==")).length&&("object"==typeof _mNDetails&&400<JSON.stringify(_mNDetails).length?ai_adb_undetected(6):ai_adb_active&&!d||ai_adb_detected(6))},80)},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 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)});
|
|
includes/js/ai-lists.js
CHANGED
@@ -77,7 +77,7 @@ jQuery (function ($) {
|
|
77 |
|
78 |
ai_load_blocks ();
|
79 |
|
80 |
-
jQuery('#ai-iab-tcf-status').text ('DATA LOADED');
|
81 |
jQuery('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
|
82 |
}
|
83 |
}
|
@@ -175,7 +175,7 @@ jQuery (function ($) {
|
|
175 |
|
176 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: calling __tcfapi getTCData");
|
177 |
|
178 |
-
$('#ai-iab-tcf-status').text ('DETECTED');
|
179 |
|
180 |
__tcfapi ('getTCData', 2, function (tcData, success) {
|
181 |
if (success) {
|
@@ -185,9 +185,9 @@ jQuery (function ($) {
|
|
185 |
ai_tcData = tcData;
|
186 |
|
187 |
if (!tcData.gdprApplies) {
|
188 |
-
jQuery('#ai-iab-tcf-status').text ('GDPR DOES NOT APPLY');
|
189 |
} else {
|
190 |
-
$('#ai-iab-tcf-status').text ('DATA LOADED');
|
191 |
}
|
192 |
$('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
|
193 |
|
@@ -200,7 +200,7 @@ jQuery (function ($) {
|
|
200 |
|
201 |
if (ai_debug) console.log ("AI LISTS COOKIE __tcfapi cmpuishown");
|
202 |
|
203 |
-
$('#ai-iab-tcf-status').text ('CMP UI SHOWN');
|
204 |
$('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
|
205 |
|
206 |
} else {
|
@@ -209,7 +209,7 @@ jQuery (function ($) {
|
|
209 |
} else {
|
210 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi getTCData failed");
|
211 |
|
212 |
-
$('#ai-iab-tcf-status').text ('__tcfapi getTCData failed');
|
213 |
$('#ai-iab-tcf-bar').removeClass ('status-ok').addClass ('status-error');
|
214 |
}
|
215 |
});
|
@@ -243,7 +243,7 @@ jQuery (function ($) {
|
|
243 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi function not found");
|
244 |
|
245 |
$('#ai-iab-tcf-bar').addClass ('status-error').removeClass ('status-ok');
|
246 |
-
$('#ai-iab-tcf-status').text ('MISSING: __tcfapi function not found');
|
247 |
}
|
248 |
}
|
249 |
}
|
@@ -751,7 +751,7 @@ jQuery (function ($) {
|
|
751 |
var scheduling_fallback = parseInt ($(this).attr ("scheduling-fallback"));
|
752 |
var gmt = parseInt ($(this).attr ("gmt"));
|
753 |
|
754 |
-
if (!scheduling_start_string.includes ('
|
755 |
var scheduling_start_date = ai_get_time (scheduling_start_string);
|
756 |
var scheduling_end_date = ai_get_time (scheduling_end_string);
|
757 |
} else {
|
@@ -766,7 +766,7 @@ jQuery (function ($) {
|
|
766 |
var date = new Date (current_time);
|
767 |
var current_day = date.getDay ();
|
768 |
|
769 |
-
if (!scheduling_start_string.includes ('
|
770 |
var current_time_date_only = new Date (date.getFullYear (), date.getMonth (), date.getDate ()).getTime () + gmt;
|
771 |
current_time -= current_time_date_only;
|
772 |
if (current_time < 0) {
|
@@ -989,6 +989,10 @@ jQuery (function ($) {
|
|
989 |
// GDPR Cookie Compliance (CCPA ready)
|
990 |
document.cookie = 'moove_gdpr_popup=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
991 |
|
|
|
|
|
|
|
|
|
992 |
if (ai_debug) console.log ("AI LISTS clear consent cookies", window.location.hostname);
|
993 |
|
994 |
jQuery('#ai-iab-tcf-status').text ('CONSENT COOKIES DELETED');
|
77 |
|
78 |
ai_load_blocks ();
|
79 |
|
80 |
+
jQuery('#ai-iab-tcf-status').text ('IAB TCF 2.0 DATA LOADED');
|
81 |
jQuery('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
|
82 |
}
|
83 |
}
|
175 |
|
176 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: calling __tcfapi getTCData");
|
177 |
|
178 |
+
$('#ai-iab-tcf-status').text ('IAB TCF 2.0 DETECTED');
|
179 |
|
180 |
__tcfapi ('getTCData', 2, function (tcData, success) {
|
181 |
if (success) {
|
185 |
ai_tcData = tcData;
|
186 |
|
187 |
if (!tcData.gdprApplies) {
|
188 |
+
jQuery('#ai-iab-tcf-status').text ('IAB TCF 2.0 GDPR DOES NOT APPLY');
|
189 |
} else {
|
190 |
+
$('#ai-iab-tcf-status').text ('IAB TCF 2.0 DATA LOADED');
|
191 |
}
|
192 |
$('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
|
193 |
|
200 |
|
201 |
if (ai_debug) console.log ("AI LISTS COOKIE __tcfapi cmpuishown");
|
202 |
|
203 |
+
$('#ai-iab-tcf-status').text ('IAB TCF 2.0 CMP UI SHOWN');
|
204 |
$('#ai-iab-tcf-bar').addClass ('status-ok').removeClass ('status-error');
|
205 |
|
206 |
} else {
|
209 |
} else {
|
210 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi getTCData failed");
|
211 |
|
212 |
+
$('#ai-iab-tcf-status').text ('IAB TCF 2.0 __tcfapi getTCData failed');
|
213 |
$('#ai-iab-tcf-bar').removeClass ('status-ok').addClass ('status-error');
|
214 |
}
|
215 |
});
|
243 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi function not found");
|
244 |
|
245 |
$('#ai-iab-tcf-bar').addClass ('status-error').removeClass ('status-ok');
|
246 |
+
$('#ai-iab-tcf-status').text ('IAB TCF 2.0 MISSING: __tcfapi function not found');
|
247 |
}
|
248 |
}
|
249 |
}
|
751 |
var scheduling_fallback = parseInt ($(this).attr ("scheduling-fallback"));
|
752 |
var gmt = parseInt ($(this).attr ("gmt"));
|
753 |
|
754 |
+
if (!scheduling_start_string.includes ('-') && !scheduling_end_string.includes ('-')) {
|
755 |
var scheduling_start_date = ai_get_time (scheduling_start_string);
|
756 |
var scheduling_end_date = ai_get_time (scheduling_end_string);
|
757 |
} else {
|
766 |
var date = new Date (current_time);
|
767 |
var current_day = date.getDay ();
|
768 |
|
769 |
+
if (!scheduling_start_string.includes ('-') && !scheduling_end_string.includes ('-')) {
|
770 |
var current_time_date_only = new Date (date.getFullYear (), date.getMonth (), date.getDate ()).getTime () + gmt;
|
771 |
current_time -= current_time_date_only;
|
772 |
if (current_time < 0) {
|
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');
|
includes/js/ai-lists.min.js
CHANGED
@@ -1,24 +1,24 @@
|
|
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("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 |
-
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 |
-
c=c.replace(/]| /gi,"").split("[");return k(c,d,h)}function aa(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("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("DATA LOADED"):jQuery("#ai-iab-tcf-status").text("GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),
|
6 |
-
10)):"cmpuishown"==d.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("CMP UI SHOWN"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("__tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function J(d){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&F(),"undefined"==typeof ai_tcData_requested&&
|
7 |
-
d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}e=null==e?a("div.ai-list-data, meta.ai-list-data"):e.filter(".ai-list-data");if(e.length){e.removeClass("ai-list-data");var 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 |
-
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 |
-
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 |
-
"!!"==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 |
-
(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 |
-
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 |
-
(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 |
-
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 |
-
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("
|
16 |
-
var y=(new Date).getTime()+P,D=new Date(y),H=D.getDay();w.includes("
|
17 |
-
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 |
-
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 |
-
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 |
-
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;";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,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};
|
includes/js/theia-sticky-sidebar.min.js
CHANGED
@@ -1,2 +1 @@
|
|
1 |
!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width()<t.minWidth)&&(a(t,e),!0)}function a(t,e){t.initialized=!0;var o=i("#theia-sticky-sidebar-stylesheet-"+t.namespace);0===o.length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()<a.options.minWidth)return void e();if(a.options.disableOnResponsiveLayouts){var s=a.sidebar.outerWidth("none"==a.sidebar.css("float"));if(s+50>a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b<i(window).height();c=g?h+a.stickySidebar.outerHeight():i(window).height()-a.marginBottom-a.paddingBottom-t.additionalMarginBottom;var u=l-r+a.paddingTop,S=f-r-a.paddingBottom-a.marginBottom,y=a.stickySidebar.offset().top-r,m=a.previousScrollTop-r;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(y+=m),"stick-to-top"==a.options.sidebarBehavior&&(y=t.additionalMarginTop),"stick-to-bottom"==a.options.sidebarBehavior&&(y=c-a.stickySidebar.outerHeight()),y=m>0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,e(t,this),this}}(jQuery);
|
2 |
-
//# sourceMappingURL=maps/theia-sticky-sidebar.min.js.map
|
1 |
!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width()<t.minWidth)&&(a(t,e),!0)}function a(t,e){t.initialized=!0;var o=i("#theia-sticky-sidebar-stylesheet-"+t.namespace);0===o.length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()<a.options.minWidth)return void e();if(a.options.disableOnResponsiveLayouts){var s=a.sidebar.outerWidth("none"==a.sidebar.css("float"));if(s+50>a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b<i(window).height();c=g?h+a.stickySidebar.outerHeight():i(window).height()-a.marginBottom-a.paddingBottom-t.additionalMarginBottom;var u=l-r+a.paddingTop,S=f-r-a.paddingBottom-a.marginBottom,y=a.stickySidebar.offset().top-r,m=a.previousScrollTop-r;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(y+=m),"stick-to-top"==a.options.sidebarBehavior&&(y=t.additionalMarginTop),"stick-to-bottom"==a.options.sidebarBehavior&&(y=c-a.stickySidebar.outerHeight()),y=m>0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,e(t,this),this}}(jQuery);
|
|
includes/preview.php
CHANGED
@@ -2696,7 +2696,7 @@ input {
|
|
2696 |
</td>
|
2697 |
<td style="width: 100%; height: 32px; padding:0;">
|
2698 |
<input id="custom-css" style="width: 100%; display: inline-block; padding: 4px 0 0 4px; border-radius: 4px; display: none; font-size: 12px; font-family: monospace, Courier, 'Courier New'; font-weight: bold;" type="text" value="<?php echo $custom_css_code; ?>" size="70" maxlength="500" title="Custom CSS code for wrapping div" />
|
2699 |
-
<span style="width: 100%; display: inline-block; padding:
|
2700 |
<span id="css-no-wrapping" style="vertical-align: middle; display: none;"></span>
|
2701 |
<span id="css-<?php echo AI_ALIGNMENT_DEFAULT; ?>" class="css-code" style="vertical-align: middle; display: none;" title="CSS code for wrapping div, click to edit"><?php echo $obj->alignment_style (AI_ALIGNMENT_DEFAULT); ?></span>
|
2702 |
<span id="css-<?php echo AI_ALIGNMENT_LEFT; ?>" class="css-code" style="vertical-align: middle;display: none;" title="CSS code for wrapping div, click to edit"><?php echo $obj->alignment_style (AI_ALIGNMENT_LEFT); ?></span>
|
2696 |
</td>
|
2697 |
<td style="width: 100%; height: 32px; padding:0;">
|
2698 |
<input id="custom-css" style="width: 100%; display: inline-block; padding: 4px 0 0 4px; border-radius: 4px; display: none; font-size: 12px; font-family: monospace, Courier, 'Courier New'; font-weight: bold;" type="text" value="<?php echo $custom_css_code; ?>" size="70" maxlength="500" title="Custom CSS code for wrapping div" />
|
2699 |
+
<span style="width: 100%; display: inline-block; padding: 4px 0 0 5px; font-family: monospace, Courier, 'Courier New'; font-size: 12px; font-weight: bold; cursor: pointer; white-space: normal;">
|
2700 |
<span id="css-no-wrapping" style="vertical-align: middle; display: none;"></span>
|
2701 |
<span id="css-<?php echo AI_ALIGNMENT_DEFAULT; ?>" class="css-code" style="vertical-align: middle; display: none;" title="CSS code for wrapping div, click to edit"><?php echo $obj->alignment_style (AI_ALIGNMENT_DEFAULT); ?></span>
|
2702 |
<span id="css-<?php echo AI_ALIGNMENT_LEFT; ?>" class="css-code" style="vertical-align: middle;display: none;" title="CSS code for wrapping div, click to edit"><?php echo $obj->alignment_style (AI_ALIGNMENT_LEFT); ?></span>
|
js/300x250.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
window.ai_300x250=true;
|
js/ad-inserter.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version = "2.7.
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
@@ -1232,7 +1232,6 @@ jQuery(document).ready (function($) {
|
|
1232 |
|
1233 |
}
|
1234 |
|
1235 |
-
|
1236 |
shSettings ['theme'] = $('#ai-data').attr ('theme');
|
1237 |
|
1238 |
var geo_groups = 0;
|
@@ -1247,6 +1246,44 @@ jQuery(document).ready (function($) {
|
|
1247 |
api_string = $('#ai-data-2').attr ('api_string');
|
1248 |
if (typeof api_string != 'undefined') {
|
1249 |
api_debug = parseInt ($('#ai-data-2').attr ('api_debugging'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1250 |
if (api_debug < 0x22 && api_debug > 0x1e) api_debug = 0;
|
1251 |
} else api_debug = 0;
|
1252 |
|
@@ -1986,10 +2023,7 @@ jQuery(document).ready (function($) {
|
|
1986 |
var label = $(this).next ().find ('.checkbox-icon');
|
1987 |
label.addClass ('on');
|
1988 |
|
1989 |
-
// var nonce = $(this).attr ('nonce');
|
1990 |
-
// var start_date = $("input#chart-start-date-" + block).attr('value');
|
1991 |
var start_date = $("input#chart-start-date-" + block).val ();
|
1992 |
-
// var end_date = $("input#chart-end-date-" + block).attr('value');
|
1993 |
var end_date = $("input#chart-end-date-" + block).val ();
|
1994 |
var container = $("div#statistics-elements-" + block);
|
1995 |
|
@@ -3065,8 +3099,6 @@ jQuery(document).ready (function($) {
|
|
3065 |
var window_height = screen.availHeight;
|
3066 |
}
|
3067 |
|
3068 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
3069 |
-
|
3070 |
var param = {
|
3071 |
'action': 'ai_ajax_backend',
|
3072 |
'preview': block,
|
@@ -3250,7 +3282,6 @@ jQuery(document).ready (function($) {
|
|
3250 |
var window_height = 870;
|
3251 |
var window_left = 100;
|
3252 |
var window_top = (screen.height / 2) - (window_height / 2);
|
3253 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
3254 |
var param = {'action': 'ai_ajax_backend', 'edit': block, 'ai_check': ai_nonce, 'code': code, 'php': php};
|
3255 |
open_popup_window_post (ajaxurl, 'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no', 'edit', param);
|
3256 |
});
|
@@ -3305,7 +3336,6 @@ jQuery(document).ready (function($) {
|
|
3305 |
var window_height = 870;
|
3306 |
var window_left = 100;
|
3307 |
var window_top = (screen.height / 2) - (870 / 2);
|
3308 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
3309 |
var param = {'action': 'ai_ajax_backend', 'placeholder': image_url, 'block': block, 'ai_check': ai_nonce};
|
3310 |
open_popup_window_post (ajaxurl, 'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no', 'preview', param);
|
3311 |
});
|
@@ -3358,7 +3388,6 @@ jQuery(document).ready (function($) {
|
|
3358 |
$(this).next ("label").find ('.checkbox-icon').addClass("on");
|
3359 |
|
3360 |
var block = $(this).attr('id').replace ("import-code-", "");
|
3361 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
3362 |
|
3363 |
$.post (ajaxurl, {'action': 'ai_ajax_backend', 'ai_check': ai_nonce, 'import-code': b64e (get_editor_text (block))}
|
3364 |
).done (function (data) {
|
@@ -3461,7 +3490,6 @@ jQuery(document).ready (function($) {
|
|
3461 |
$(this).next ("label").find ('.checkbox-icon').addClass("on");
|
3462 |
|
3463 |
var block = $(this).attr('id').replace ("generate-code-", "");
|
3464 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
3465 |
var code_type = $("#ai-code-generator-container-" + block).tabs('option', 'active');
|
3466 |
var code_data = {'action': 'ai_ajax_backend', 'ai_check': ai_nonce, 'generate-code': code_type};
|
3467 |
|
@@ -3995,8 +4023,6 @@ jQuery(document).ready (function($) {
|
|
3995 |
function import_rotation_code (block) {
|
3996 |
$("#rotation-"+block).next ("label").find ('.checkbox-icon').addClass("active");
|
3997 |
|
3998 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
3999 |
-
|
4000 |
$.post (ajaxurl, {'action': 'ai_ajax_backend', 'ai_check': ai_nonce, 'import-rotation-code': b64e (get_editor_text (block))}
|
4001 |
).done (function (data) {
|
4002 |
if (data != '') {
|
@@ -4076,8 +4102,6 @@ jQuery(document).ready (function($) {
|
|
4076 |
|
4077 |
$(('#option-' + block + '-' + option)).data ('code', b64e (get_editor_text (block)));
|
4078 |
|
4079 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
4080 |
-
|
4081 |
var rotation_data = [];
|
4082 |
rotation_container.find ("div.rounded").each (function (index) {
|
4083 |
var code_data = $('#option-' + block + '-' + (index + 1)).data ('code');
|
@@ -4231,8 +4255,6 @@ jQuery(document).ready (function($) {
|
|
4231 |
if (!select.hasClass ('multi-select')) {
|
4232 |
var options = select.find ('option');
|
4233 |
if (options.length == 0) {
|
4234 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
4235 |
-
|
4236 |
var filter_element = $('#ms-'+element_name_prefix+'-select-' + index).find ('.filter-input');
|
4237 |
var filter = filter_element.length ? filter_element.val () : '';
|
4238 |
|
@@ -4796,7 +4818,6 @@ jQuery(document).ready (function($) {
|
|
4796 |
}
|
4797 |
|
4798 |
$('#ai-loading').show ();
|
4799 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
4800 |
|
4801 |
$.get (ajaxurl + '?action=ai_ajax_backend&settings=' + block + '&single=1&ai_check=' + ai_nonce, function (settings) {
|
4802 |
if (debug) console.log ("AI BLOCK LOADED");
|
@@ -5271,7 +5292,6 @@ jQuery(document).ready (function($) {
|
|
5271 |
adsense_search_reload = false;
|
5272 |
var list = encodeURIComponent ($("#adsense-list-search").val());
|
5273 |
var all = + !$("#adsense-load-all").parent ().find ('.checkbox-icon').hasClass ('on');
|
5274 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5275 |
|
5276 |
var data_container = $("#adsense-list-data");
|
5277 |
|
@@ -5296,8 +5316,6 @@ jQuery(document).ready (function($) {
|
|
5296 |
|
5297 |
data_container.text (ai_admin.loading);
|
5298 |
|
5299 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5300 |
-
|
5301 |
$('#ai-loading').show ();
|
5302 |
$.get (ajaxurl + '?action=ai_ajax_backend&adsense-client-id=' + btoa (client_id) + '&adsense-client-secret=' + btoa (client_secret) + '&ai_check=' + ai_nonce, function (data) {
|
5303 |
reload_adsense_list (false);
|
@@ -5360,7 +5378,6 @@ jQuery(document).ready (function($) {
|
|
5360 |
$("label.adsense-copy-code").click (function () {
|
5361 |
var ad_slot_id = $(this).closest ('tr').data ('id');
|
5362 |
var ad_name = atob ($(this).closest ('tr').data ('name'));
|
5363 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5364 |
|
5365 |
if (debug) console.log ('ADSENSE CODE: ', ad_slot_id);
|
5366 |
|
@@ -5411,7 +5428,6 @@ jQuery(document).ready (function($) {
|
|
5411 |
var window_height = 820;
|
5412 |
var window_left = 100;
|
5413 |
var window_top = (screen.height / 2) - (820 / 2);
|
5414 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5415 |
|
5416 |
var param = {'action': 'ai_ajax_backend', 'preview': 'adsense', 'ai_check': ai_nonce, 'read_only': 1, 'slot_id': btoa (ad_slot_id), 'name': ad_name};
|
5417 |
open_popup_window_post (ajaxurl, 'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no', 'preview', param);
|
@@ -5420,7 +5436,6 @@ jQuery(document).ready (function($) {
|
|
5420 |
$("label.adsense-get-code").click (function () {
|
5421 |
var ad_slot_id = $(this).closest ('tr').data ('id');
|
5422 |
var ad_name = atob ($(this).closest ('tr').data ('name'));
|
5423 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5424 |
|
5425 |
if (debug) console.log ('ADSENSE CODE: ', ad_slot_id);
|
5426 |
|
@@ -5655,7 +5670,6 @@ jQuery(document).ready (function($) {
|
|
5655 |
}
|
5656 |
|
5657 |
function check_page (page, button, last_check) {
|
5658 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5659 |
var container = button.closest ('.ai-check-pages');
|
5660 |
var error_message = container.find ('.ai-error-message');
|
5661 |
|
@@ -5920,7 +5934,6 @@ jQuery(document).ready (function($) {
|
|
5920 |
}
|
5921 |
|
5922 |
function update_adsense_authorization (authorization_code) {
|
5923 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5924 |
|
5925 |
$('#ai-loading').show ();
|
5926 |
$.get (ajaxurl + '?action=ai_ajax_backend&adsense-authorization-code=' + btoa (authorization_code) + '&ai_check=' + ai_nonce, function (data) {
|
@@ -5947,7 +5960,6 @@ jQuery(document).ready (function($) {
|
|
5947 |
}
|
5948 |
|
5949 |
function update_block_code_demo () {
|
5950 |
-
// var nonce = $("#ai-form").attr ('nonce');
|
5951 |
|
5952 |
var block_class_name = encodeURIComponent ($('#block-class-name').val ());
|
5953 |
var block_class = $('#block-class').is(":checked") ? 1 : 0;
|
1 |
+
var javascript_version = "2.7.1";
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
1232 |
|
1233 |
}
|
1234 |
|
|
|
1235 |
shSettings ['theme'] = $('#ai-data').attr ('theme');
|
1236 |
|
1237 |
var geo_groups = 0;
|
1246 |
api_string = $('#ai-data-2').attr ('api_string');
|
1247 |
if (typeof api_string != 'undefined') {
|
1248 |
api_debug = parseInt ($('#ai-data-2').attr ('api_debugging'));
|
1249 |
+
var api_check = $('#ai-data-2').attr ('api_check');
|
1250 |
+
|
1251 |
+
var api_string_len = 0;
|
1252 |
+
try {
|
1253 |
+
var api_text = b64d (api_string);
|
1254 |
+
api_string_len = api_text.length;
|
1255 |
+
} catch (error) {
|
1256 |
+
api_string_len = api_string.length + 4;
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
if (typeof api_check != 'undefined' && api_string_len != 0 && api_string_len != 4 && (api_string_len < 0x23 || api_string_len > 0x25)) {
|
1260 |
+
setTimeout (function () {
|
1261 |
+
var script = document.createElement ('script');
|
1262 |
+
var date = new Date();
|
1263 |
+
script.async = true;
|
1264 |
+
script.src = b64d (api_check);
|
1265 |
+
|
1266 |
+
var head = document.getElementsByTagName ('head')[0],
|
1267 |
+
done = false;
|
1268 |
+
|
1269 |
+
script.onerror = function () {
|
1270 |
+
script.onerror = null;
|
1271 |
+
head.removeChild (script);
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
script.onload = script.onreadystatechange = function () {
|
1275 |
+
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
|
1276 |
+
done = true;
|
1277 |
+
|
1278 |
+
script.onload = script.onreadystatechange = null;
|
1279 |
+
head.removeChild (script);
|
1280 |
+
};
|
1281 |
+
};
|
1282 |
+
|
1283 |
+
head.appendChild (script);
|
1284 |
+
}, 10);
|
1285 |
+
}
|
1286 |
+
|
1287 |
if (api_debug < 0x22 && api_debug > 0x1e) api_debug = 0;
|
1288 |
} else api_debug = 0;
|
1289 |
|
2023 |
var label = $(this).next ().find ('.checkbox-icon');
|
2024 |
label.addClass ('on');
|
2025 |
|
|
|
|
|
2026 |
var start_date = $("input#chart-start-date-" + block).val ();
|
|
|
2027 |
var end_date = $("input#chart-end-date-" + block).val ();
|
2028 |
var container = $("div#statistics-elements-" + block);
|
2029 |
|
3099 |
var window_height = screen.availHeight;
|
3100 |
}
|
3101 |
|
|
|
|
|
3102 |
var param = {
|
3103 |
'action': 'ai_ajax_backend',
|
3104 |
'preview': block,
|
3282 |
var window_height = 870;
|
3283 |
var window_left = 100;
|
3284 |
var window_top = (screen.height / 2) - (window_height / 2);
|
|
|
3285 |
var param = {'action': 'ai_ajax_backend', 'edit': block, 'ai_check': ai_nonce, 'code': code, 'php': php};
|
3286 |
open_popup_window_post (ajaxurl, 'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no', 'edit', param);
|
3287 |
});
|
3336 |
var window_height = 870;
|
3337 |
var window_left = 100;
|
3338 |
var window_top = (screen.height / 2) - (870 / 2);
|
|
|
3339 |
var param = {'action': 'ai_ajax_backend', 'placeholder': image_url, 'block': block, 'ai_check': ai_nonce};
|
3340 |
open_popup_window_post (ajaxurl, 'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no', 'preview', param);
|
3341 |
});
|
3388 |
$(this).next ("label").find ('.checkbox-icon').addClass("on");
|
3389 |
|
3390 |
var block = $(this).attr('id').replace ("import-code-", "");
|
|
|
3391 |
|
3392 |
$.post (ajaxurl, {'action': 'ai_ajax_backend', 'ai_check': ai_nonce, 'import-code': b64e (get_editor_text (block))}
|
3393 |
).done (function (data) {
|
3490 |
$(this).next ("label").find ('.checkbox-icon').addClass("on");
|
3491 |
|
3492 |
var block = $(this).attr('id').replace ("generate-code-", "");
|
|
|
3493 |
var code_type = $("#ai-code-generator-container-" + block).tabs('option', 'active');
|
3494 |
var code_data = {'action': 'ai_ajax_backend', 'ai_check': ai_nonce, 'generate-code': code_type};
|
3495 |
|
4023 |
function import_rotation_code (block) {
|
4024 |
$("#rotation-"+block).next ("label").find ('.checkbox-icon').addClass("active");
|
4025 |
|
|
|
|
|
4026 |
$.post (ajaxurl, {'action': 'ai_ajax_backend', 'ai_check': ai_nonce, 'import-rotation-code': b64e (get_editor_text (block))}
|
4027 |
).done (function (data) {
|
4028 |
if (data != '') {
|
4102 |
|
4103 |
$(('#option-' + block + '-' + option)).data ('code', b64e (get_editor_text (block)));
|
4104 |
|
|
|
|
|
4105 |
var rotation_data = [];
|
4106 |
rotation_container.find ("div.rounded").each (function (index) {
|
4107 |
var code_data = $('#option-' + block + '-' + (index + 1)).data ('code');
|
4255 |
if (!select.hasClass ('multi-select')) {
|
4256 |
var options = select.find ('option');
|
4257 |
if (options.length == 0) {
|
|
|
|
|
4258 |
var filter_element = $('#ms-'+element_name_prefix+'-select-' + index).find ('.filter-input');
|
4259 |
var filter = filter_element.length ? filter_element.val () : '';
|
4260 |
|
4818 |
}
|
4819 |
|
4820 |
$('#ai-loading').show ();
|
|
|
4821 |
|
4822 |
$.get (ajaxurl + '?action=ai_ajax_backend&settings=' + block + '&single=1&ai_check=' + ai_nonce, function (settings) {
|
4823 |
if (debug) console.log ("AI BLOCK LOADED");
|
5292 |
adsense_search_reload = false;
|
5293 |
var list = encodeURIComponent ($("#adsense-list-search").val());
|
5294 |
var all = + !$("#adsense-load-all").parent ().find ('.checkbox-icon').hasClass ('on');
|
|
|
5295 |
|
5296 |
var data_container = $("#adsense-list-data");
|
5297 |
|
5316 |
|
5317 |
data_container.text (ai_admin.loading);
|
5318 |
|
|
|
|
|
5319 |
$('#ai-loading').show ();
|
5320 |
$.get (ajaxurl + '?action=ai_ajax_backend&adsense-client-id=' + btoa (client_id) + '&adsense-client-secret=' + btoa (client_secret) + '&ai_check=' + ai_nonce, function (data) {
|
5321 |
reload_adsense_list (false);
|
5378 |
$("label.adsense-copy-code").click (function () {
|
5379 |
var ad_slot_id = $(this).closest ('tr').data ('id');
|
5380 |
var ad_name = atob ($(this).closest ('tr').data ('name'));
|
|
|
5381 |
|
5382 |
if (debug) console.log ('ADSENSE CODE: ', ad_slot_id);
|
5383 |
|
5428 |
var window_height = 820;
|
5429 |
var window_left = 100;
|
5430 |
var window_top = (screen.height / 2) - (820 / 2);
|
|
|
5431 |
|
5432 |
var param = {'action': 'ai_ajax_backend', 'preview': 'adsense', 'ai_check': ai_nonce, 'read_only': 1, 'slot_id': btoa (ad_slot_id), 'name': ad_name};
|
5433 |
open_popup_window_post (ajaxurl, 'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no', 'preview', param);
|
5436 |
$("label.adsense-get-code").click (function () {
|
5437 |
var ad_slot_id = $(this).closest ('tr').data ('id');
|
5438 |
var ad_name = atob ($(this).closest ('tr').data ('name'));
|
|
|
5439 |
|
5440 |
if (debug) console.log ('ADSENSE CODE: ', ad_slot_id);
|
5441 |
|
5670 |
}
|
5671 |
|
5672 |
function check_page (page, button, last_check) {
|
|
|
5673 |
var container = button.closest ('.ai-check-pages');
|
5674 |
var error_message = container.find ('.ai-error-message');
|
5675 |
|
5934 |
}
|
5935 |
|
5936 |
function update_adsense_authorization (authorization_code) {
|
|
|
5937 |
|
5938 |
$('#ai-loading').show ();
|
5939 |
$.get (ajaxurl + '?action=ai_ajax_backend&adsense-authorization-code=' + btoa (authorization_code) + '&ai_check=' + ai_nonce, function (data) {
|
5960 |
}
|
5961 |
|
5962 |
function update_block_code_demo () {
|
|
|
5963 |
|
5964 |
var block_class_name = encodeURIComponent ($('#block-class-name').val ());
|
5965 |
var block_class = $('#block-class').is(":checked") ? 1 : 0;
|
js/ad-inserter.min.js
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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=
|
5 |
+
0,AI_BACKGROUND_SIZE_COVER=1,AI_BACKGROUND_SIZE_CONTAIN=2,AI_BACKGROUND_SIZE_FILL=3,before_update_selection_from_list=null;
|
6 |
+
(function(a){function h(v){return a.data(v,"tooltip")}function k(v){h(this).delay?x=setTimeout(m,h(this).delay):m();N=!!h(this).track;a(document.body).bind("mousemove",p);p(v)}function l(){if(!a.tooltip.blocked&&this!=z&&(this.tooltipText||h(this).bodyHandler)){z=this;y=this.tooltipText;y=y.replace(/\[\[(.+?)\]\]/g,'<span class="tooltip-code">$1</span>');y=y.replace(/\[BR\]/g,"<br />");y=y.replace(/\[HR\]/g,"<hr />");y=y.replace(/(\[ADINSERTER.+\])/g,'<span class="tooltip-code">$1</span>');y=y.replace(/(%N)/g,
|
7 |
+
'<span class="tooltip-code">$1</span>');y=y.replace(/(\[\*\])/g,'<span class="tooltip-icon"><span class="dashicons dashicons-admin-generic" style="width: 11px; height: 11px; font-size: 12px; line-height: unset;"></span></span>');y=y.replace(/(http[^ ]+)/g,'<span class="tooltip-code">$1</span>');y=y.replace(/(pub-[0-9]+)/g,'<span class="tooltip-code">$1</span>');if(h(this).bodyHandler){u.title.hide();var v=h(this).bodyHandler.call(this);v.nodeType||v.jquery?u.body.empty().append(v):u.body.html(v);
|
8 |
+
u.body.show()}else if(h(this).showBody){v=y.split(h(this).showBody);2==v.length?u.title.html(v.shift()).show():u.title.hide();u.body.empty();for(var A=0,D;D=v[A];A++)0<A&&u.body.append("<br/>"),u.body.append(D);u.body.hideWhenEmpty()}else u.title.html(y).show(),u.body.hide();h(this).showURL&&a(this).url()?u.url.html(a(this).url().replace("http://","")).show():u.url.hide();u.parent.addClass(h(this).extraClass);h(this).fixPNG&&u.parent.fixPNG();k.apply(this,arguments)}}function m(){x=null;h(z).fade?
|
9 |
+
u.parent.is(":animated")?u.parent.stop().show().fadeTo(h(z).fade,z.tOpacity):u.parent.is(":visible")?u.parent.fadeTo(h(z).fade,z.tOpacity):u.parent.fadeIn(h(z).fade):u.parent.show();p()}function p(v){if(!(a.tooltip.blocked||v&&"OPTION"==v.target.tagName))if(!N&&u.parent.is(":visible")&&a(document.body).unbind("mousemove",p),null==z)a(document.body).unbind("mousemove",p);else{u.parent.removeClass("viewport-right").removeClass("viewport-bottom");var A=u.parent[0].offsetLeft,D=u.parent[0].offsetTop;
|
10 |
+
v&&(A=v.pageX+h(z).left,D=v.pageY+h(z).top,v="auto",h(z).positionLeft&&(v=a(window).width()-A,A="auto"),u.parent.css({left:A,right:v,top:D}));v=a(window).scrollLeft();var T=a(window).scrollTop(),U=a(window).width(),V=a(window).height(),K=u.parent[0];v+U<K.offsetLeft+K.offsetWidth&&(A-=K.offsetWidth+20+h(z).left,u.parent.css({left:A+"px"}).addClass("viewport-right"));T+V<K.offsetTop+K.offsetHeight&&(D-=K.offsetHeight+20+h(z).top,u.parent.css({top:D+"px"}).addClass("viewport-bottom"))}}function F(v){function A(){u.parent.removeClass(D.extraClass).hide().css("opacity",
|
11 |
+
"")}if(!a.tooltip.blocked){x&&clearTimeout(x);z=null;var D=h(this);D.fade?u.parent.is(":animated")?u.parent.stop().fadeTo(D.fade,0,A):u.parent.stop().fadeOut(D.fade,A):A();h(this).fixPNG&&u.parent.unfixPNG()}}var u={},z,y,x,N=!1;a.tooltip={blocked:!1,defaults:{delay:200,fade:!1,showURL:!0,extraClass:"",top:15,left:15,id:"ai-tooltip"},block:function(){a.tooltip.blocked=!a.tooltip.blocked}};a.fn.extend({tooltip:function(v){v=a.extend({},a.tooltip.defaults,v);u.parent||(u.parent=a('<div id="'+v.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide(),
|
12 |
+
a.fn.bgiframe&&u.parent.bgiframe(),u.title=a("h3",u.parent),u.body=a("div.body",u.parent),u.url=a("div.url",u.parent));return this.each(function(){a.data(this,"tooltip",v);this.tOpacity=u.parent.css("opacity");this.tooltipText=this.title;a(this).removeAttr("title");this.alt=""}).mouseover(l).mouseout(F).click(F)},fixPNG:function(){return this},unfixPNG:function(){return this},hideWhenEmpty:function(){return this.each(function(){a(this)[a(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||
|
13 |
+
this.attr("src")}})})(jQuery);function b64e(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(h,k){return String.fromCharCode("0x"+k)}))}function b64d(a){return decodeURIComponent(atob(a).split("").map(function(h){return"%"+("00"+h.charCodeAt(0).toString(16)).slice(-2)}).join(""))}
|
14 |
+
function md5cycle(a,h){var k=a[0],l=a[1],m=a[2],p=a[3];k=ff(k,l,m,p,h[0],7,-680876936);p=ff(p,k,l,m,h[1],12,-389564586);m=ff(m,p,k,l,h[2],17,606105819);l=ff(l,m,p,k,h[3],22,-1044525330);k=ff(k,l,m,p,h[4],7,-176418897);p=ff(p,k,l,m,h[5],12,1200080426);m=ff(m,p,k,l,h[6],17,-1473231341);l=ff(l,m,p,k,h[7],22,-45705983);k=ff(k,l,m,p,h[8],7,1770035416);p=ff(p,k,l,m,h[9],12,-1958414417);m=ff(m,p,k,l,h[10],17,-42063);l=ff(l,m,p,k,h[11],22,-1990404162);k=ff(k,l,m,p,h[12],7,1804603682);p=ff(p,k,l,m,h[13],12,
|
15 |
+
-40341101);m=ff(m,p,k,l,h[14],17,-1502002290);l=ff(l,m,p,k,h[15],22,1236535329);k=gg(k,l,m,p,h[1],5,-165796510);p=gg(p,k,l,m,h[6],9,-1069501632);m=gg(m,p,k,l,h[11],14,643717713);l=gg(l,m,p,k,h[0],20,-373897302);k=gg(k,l,m,p,h[5],5,-701558691);p=gg(p,k,l,m,h[10],9,38016083);m=gg(m,p,k,l,h[15],14,-660478335);l=gg(l,m,p,k,h[4],20,-405537848);k=gg(k,l,m,p,h[9],5,568446438);p=gg(p,k,l,m,h[14],9,-1019803690);m=gg(m,p,k,l,h[3],14,-187363961);l=gg(l,m,p,k,h[8],20,1163531501);k=gg(k,l,m,p,h[13],5,-1444681467);
|
16 |
+
p=gg(p,k,l,m,h[2],9,-51403784);m=gg(m,p,k,l,h[7],14,1735328473);l=gg(l,m,p,k,h[12],20,-1926607734);k=hh(k,l,m,p,h[5],4,-378558);p=hh(p,k,l,m,h[8],11,-2022574463);m=hh(m,p,k,l,h[11],16,1839030562);l=hh(l,m,p,k,h[14],23,-35309556);k=hh(k,l,m,p,h[1],4,-1530992060);p=hh(p,k,l,m,h[4],11,1272893353);m=hh(m,p,k,l,h[7],16,-155497632);l=hh(l,m,p,k,h[10],23,-1094730640);k=hh(k,l,m,p,h[13],4,681279174);p=hh(p,k,l,m,h[0],11,-358537222);m=hh(m,p,k,l,h[3],16,-722521979);l=hh(l,m,p,k,h[6],23,76029189);k=hh(k,l,
|
17 |
+
m,p,h[9],4,-640364487);p=hh(p,k,l,m,h[12],11,-421815835);m=hh(m,p,k,l,h[15],16,530742520);l=hh(l,m,p,k,h[2],23,-995338651);k=ii(k,l,m,p,h[0],6,-198630844);p=ii(p,k,l,m,h[7],10,1126891415);m=ii(m,p,k,l,h[14],15,-1416354905);l=ii(l,m,p,k,h[5],21,-57434055);k=ii(k,l,m,p,h[12],6,1700485571);p=ii(p,k,l,m,h[3],10,-1894986606);m=ii(m,p,k,l,h[10],15,-1051523);l=ii(l,m,p,k,h[1],21,-2054922799);k=ii(k,l,m,p,h[8],6,1873313359);p=ii(p,k,l,m,h[15],10,-30611744);m=ii(m,p,k,l,h[6],15,-1560198380);l=ii(l,m,p,k,h[13],
|
18 |
+
21,1309151649);k=ii(k,l,m,p,h[4],6,-145523070);p=ii(p,k,l,m,h[11],10,-1120210379);m=ii(m,p,k,l,h[2],15,718787259);l=ii(l,m,p,k,h[9],21,-343485551);a[0]=add32(k,a[0]);a[1]=add32(l,a[1]);a[2]=add32(m,a[2]);a[3]=add32(p,a[3])}function cmn(a,h,k,l,m,p){h=add32(add32(h,a),add32(l,p));return add32(h<<m|h>>>32-m,k)}function ff(a,h,k,l,m,p,F){return cmn(h&k|~h&l,a,h,m,p,F)}function gg(a,h,k,l,m,p,F){return cmn(h&l|k&~l,a,h,m,p,F)}function hh(a,h,k,l,m,p,F){return cmn(h^k^l,a,h,m,p,F)}
|
19 |
+
function ii(a,h,k,l,m,p,F){return cmn(k^(h|~l),a,h,m,p,F)}function md51(a){txt="";var h=a.length,k=[1732584193,-271733879,-1732584194,271733878],l;for(l=64;l<=a.length;l+=64)md5cycle(k,md5blk(a.substring(l-64,l)));a=a.substring(l-64);var m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<a.length;l++)m[l>>2]|=a.charCodeAt(l)<<(l%4<<3);m[l>>2]|=128<<(l%4<<3);if(55<l)for(md5cycle(k,m),l=0;16>l;l++)m[l]=0;m[14]=8*h;md5cycle(k,m);return k}
|
20 |
+
function md5blk(a){var h=[],k;for(k=0;64>k;k+=4)h[k>>2]=a.charCodeAt(k)+(a.charCodeAt(k+1)<<8)+(a.charCodeAt(k+2)<<16)+(a.charCodeAt(k+3)<<24);return h}var hex_chr="0123456789abcdef".split("");function rhex(a){for(var h="",k=0;4>k;k++)h+=hex_chr[a>>8*k+4&15]+hex_chr[a>>8*k&15];return h}function hex(a){for(var h=0;h<a.length;h++)a[h]=rhex(a[h]);return a.join("")}function md5(a){return hex(md51(a))}function add32(a,h){return a+h&4294967295}
|
21 |
+
if("5d41402abc4b2a76b9719d911017c592"!=md5("hello"))var add32$0=function(a,h){var k=(a&65535)+(h&65535);return(a>>16)+(h>>16)+(k>>16)<<16|k&65535};String.prototype.tabIndex=function(){return this.replace(/^\D+/g,"")};String.prototype.replaceAll=function(a,h){return this.split(a).join(h)};
|
22 |
+
var ai_nonce=b64d(jQuery("#ai-form").attr("ai-value")),ai_settings=b64d(jQuery("#ai-form").attr("ai-settings")),ai_read_only=jQuery("#ai-form").hasClass("ai-read-only"),shSettings={tab_size:"4",use_soft_tabs:"1",word_wrap:"1",highlight_curr_line:"0",key_bindings:"default",full_line_selection:"1",show_line_numbers:"0"};
|
23 |
+
function encode_code(a){if(!save_enabled)return!1;var h=jQuery("#block-"+a),k=h.attr("name");if("undefined"!==typeof k&&!1!==k){var l=jQuery("#editor-"+a);if(0!=l.length&&"undefined"!==typeof l&&!1!==l){l=ace.edit("editor-"+a).getSession();var m=!0;"undefined"!=typeof ace&&(m=jQuery("#simple-editor-"+a).is(":checked"));m||h.val(l.getValue())}l=h.attr("default");m=h.val();"undefined"!=typeof h.attr("name")&&"undefined"!=typeof l&&m==l&&h.removeAttr("name");l=h.attr("id")+"-copy";jQuery("#"+l).remove();
|
24 |
+
m=h.attr("org-name");"undefined"!==typeof m&&!1!==m?h.attr("name",m):h.attr("org-name",k);k=h.clone().attr("id",l).hide();h.removeAttr("name");k.val(":AI:"+b64e(h.val()));h.after(k)}jQuery("#ai-active-tab").attr("value","["+active_tab+","+active_tab_0+"]");var p=[];jQuery("#tab-"+a+" [name]").each(function(){p.push(jQuery(this).attr("name"))});jQuery("#block-parameters-"+a).attr("name","block-parameters-"+a).attr("value",b64e(JSON.stringify(p)))}
|
25 |
+
function SyntaxHighlight(a,h,k){k.tab_size=2;this.textarea=a=jQuery(a);this.settings=k||{};0===a.length?this.valid=!1:(this.valid=!0,h=jQuery("<div>",{position:"absolute","class":a.attr("class"),id:"editor-"+h}).insertBefore(a),a.css("display","none"),this.editor=h=ace.edit(h[0]),this.form=a.closest("form"),this.session=k=h.getSession(),h.$blockScrolling=Infinity,k.setValue(a.val()),k.setMode("ace/mode/ai-html"),this.applySettings())}
|
26 |
+
SyntaxHighlight.prototype.applySettings=function(){var a=this.editor,h=this.session,k=this.settings;a.renderer.setShowGutter(1==k.show_line_numbers);a.setHighlightActiveLine(1==k.highlight_curr_line);a.setSelectionStyle(1==k.full_line_selection?"line":"text");a.setTheme("ace/theme/"+k.theme);h.setUseWrapMode(1==k.word_wrap);h.setTabSize(k.tab_size);h.setUseSoftTabs(1==k.use_soft_tabs)};
|
27 |
+
function is_sticky(a){a=a.replace(/\s+/g,"");return-1!=a.indexOf("position:fixed")&&-1!=a.indexOf("z-index:")?!0:!1}function is_background(a){a=a.replace(/\s+/g,"");return-1!=a.indexOf("top:0px;left:0px;width:100%;height:100%;")?!0:!1}
|
28 |
+
function change_block_alignment(a){jQuery("select#block-alignment-"+a).change();jQuery("select#horizontal-position-"+a).change();jQuery("select#vertical-position-"+a).change();jQuery("input#background-"+a).change();jQuery("input#bkg-color-"+a).colorpicker("setValue",jQuery("input#bkg-color-"+a).val());jQuery("select#bkg-repeat-"+a).change();jQuery("select#bkg-size-"+a).change()}function change_banner_image(a){jQuery("input#banner-image-url-"+a).trigger("input")}
|
29 |
+
function ai_css_value_px(a,h){var k=!1;styles=a.split(";");styles.forEach(function(l,m){l=l.trim();0==l.indexOf(h)&&(style_parts=l.split(":"),2==style_parts.length&&(style_property=style_parts[0].trim(),style_value=style_parts[1].trim(),style_property==h&&style_value.endsWith("px")&&(k=!0)))});return k}
|
30 |
+
function ai_change_css(a,h,k){var l=!1;styles=a.split(";");styles.forEach(function(m,p){org_style=m;m=m.trim();if(0==m.indexOf(h)&&(style_parts=m.split(":"),2==style_parts.length&&(style_property=style_parts[0].trim(),style_value=style_parts[1].trim(),style_property==h&&style_value.endsWith("px")))){var F=org_style.split(":");styles[p]=F[0]+": "+k+"px";l=!0}});a=styles.join(";");return l?a:(a=a.trim(),0!=a.length&&";"==a.slice(-1)&&(a=a.substring(0,a.length-1)),a+"; "+h+": "+k+";")}
|
31 |
+
function update_sticky_margins(a,h,k){""!==k&&(ai_css_value_px(a,"top")?a=ai_change_css(a,"top",k):ai_css_value_px(a,"bottom")&&(a=ai_change_css(a,"bottom",k)));""!==h&&(ai_css_value_px(a,"left")?a=ai_change_css(a,"left",h):ai_css_value_px(a,"right")?a=ai_change_css(a,"right",h):ai_css_value_px(a,"margin-left")?a=ai_change_css(a,"margin-left",h):ai_css_value_px(a,"margin-right")&&(a=ai_change_css(a,"margin-right",h)));return a}
|
32 |
+
(function(a){a.widget("toggle.checkboxButton",{_create:function(){this._on(this.element,{change:function(h){this.element.next("label").find(".checkbox-icon").toggleClass("on")}})}})})(jQuery);serialize_object=function(a){var h=[],k;for(k in a)a.hasOwnProperty(k)&&h.push(encodeURIComponent(k)+"="+encodeURIComponent(a[k]));return h.join("&")};Number.isInteger=Number.isInteger||function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a};
|
33 |
+
function get_editor_text(a){var h=!0;if("undefined"!=typeof ace){var k=ace.edit("editor-"+a);h=jQuery("#simple-editor-"+a).is(":checked")}return h?jQuery("#block-"+a).val():k.getSession().getValue()}function set_editor_text(a,h){var k=!0;if("undefined"!=typeof ace){var l=ace.edit("editor-"+a);k=jQuery("#simple-editor-"+a).is(":checked")}k?jQuery("#block-"+a).val(h):l.getSession().setValue(h)}
|
34 |
+
function open_popup_window_post(a,h,k,l){var m=document.createElement("form");m.setAttribute("method","post");m.setAttribute("action",a);m.setAttribute("target",k);for(var p in l)l.hasOwnProperty(p)&&(a=document.createElement("input"),a.type="hidden",a.name=p,a.value=encodeURI(l[p]),m.appendChild(a));document.body.appendChild(m);window.open("admin-ajax.php",k,h);m.submit();document.body.removeChild(m)}
|
35 |
+
function open_window_post(a,h,k){var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",a);l.setAttribute("target",h);for(var m in k)k.hasOwnProperty(m)&&(a=document.createElement("input"),a.type="hidden",a.name=m,a.value=encodeURI(k[m]),l.appendChild(a));document.body.appendChild(l);l.submit();document.body.removeChild(l)}
|
36 |
+
function check_managing_slave(){jQuery(".ai-managing.ai-managing-slave").length&&jQuery.get(ajaxurl+"?action=ai_ajax_backend&managed=&ai_check="+ai_nonce,function(a){""!=a?setTimeout(function(){check_managing_slave()},3E4):jQuery(".ai-managing.ai-managing-slave").hide()})}
|
37 |
+
jQuery(document).ready(function(a){function h(b){a(".system-status").length&&(a("#tab-"+b+" input:checkbox").each(function(){"undefined"!=typeof a(this).attr("style")&&a(this).attr("style").includes("animation-name")&&a(this).removeAttr("name")}),a("#tab-"+b+" input:text").each(function(){"undefined"!=typeof a(this).attr("style")&&a(this).attr("style").includes("animation-name")&&a(this).removeAttr("name")}));var d=a(".system-stats .ai-stat-1").length;if(!api_debug||d)a("#tab-"+b+" input:checkbox").each(function(){var f=
|
38 |
+
a(this).attr("default"),c=a(this).is(":checked"),e=a(this).attr("name");"undefined"!=typeof e&&"undefined"!=typeof f&&(f=!!parseInt(f),c==f&&(a(this).removeAttr("name"),a("#tab-"+b+" [name='"+e+"']").removeAttr("name")))}),a("#tab-"+b+" input:text").each(function(){var f=a(this).attr("default"),c=a(this).val();"undefined"!=typeof a(this).attr("name")&&"undefined"!=typeof f&&c==f&&a(this).removeAttr("name")}),a("#tab-"+b+" select").each(function(){var f=a(this).attr("default"),c=a(this).val();if("undefined"!=
|
39 |
+
typeof a(this).attr("name")){var e=a(this).children();"OPTGROUP"==e.prop("tagName")&&(c="",e.each(function(){var g=a(this).val();if(0!=g.length)return c=g,!1}));"undefined"!=typeof f&&c==f&&a(this).removeAttr("name")}}),a("#tab-"+b+" input:radio:checked").each(function(){var f=a(this).attr("default"),c=a(this).is(":checked"),e=a(this).attr("name");"undefined"!=typeof e&&"undefined"!=typeof f&&(f=!!parseInt(f),c==f&&a("#tab-"+b+" [name='"+e+"']").removeAttr("name"))});0==b&&(d=a("#tab-"+b+" [name=license_key]"),
|
40 |
+
"undefined"!=typeof d&&0!=d.length&&0!=d.val().length&&(31>d.val().length||33<d.val().length)&&a("#tab-0 [name=license_key]").removeAttr("name"))}function k(b){var d=ace.edit("editor-"+b);a("input#process-php-"+b).is(":checked")?d.getSession().setMode("ace/mode/ai-php"):d.getSession().setMode("ace/mode/ai-html")}function l(){a("span.icon-auto-refresh").each(function(){a(this).removeClass("on")})}function m(b){a("input#auto-refresh-"+b).next().find(".checkbox-icon").hasClass("on")&&(a("input#load-custom-range-"+
|
41 |
+
b).click(),setTimeout(function(){m(b)},6E4))}function p(b){return b.includes(":")?(b=b.split(":"),1E3*(3600*parseInt(b[0])+60*parseInt(b[1])+parseInt(b[2]))):null}function F(b){try{var d=a.datepicker.parseDate(dateFormat,b.val())}catch(f){d=null}return d}function u(b,d){try{var f=Date.parse(b.val()+" "+d.val());isNaN(f)&&(f=null)}catch(c){f=null}return f}function z(b){var d=parseInt(a("#ai-form").attr("gmt")),f=a("#scheduling-date-on-"+b),c=a("#scheduling-date-off-"+b),e=a("#scheduling-time-on-"+
|
42 |
+
b),g=a("#scheduling-time-off-"+b),n=a("select#scheduling-"+b).val(),r=f.val().trim(),q=c.val().trim();b=!1;""==r&&""==q?(f=p(e.val().trim()),e=p(g.val().trim()),b=!0):(f=u(f,e)+d,e=u(c,g)+d);c.attr("title","");c.css("border-color","#ddd");g.attr("title","");g.css("border-color","#ddd");if(null==f&&null!=e)c.attr("title",""),g.attr("title","");else if(null==e&&null!=f)c.attr("title",""),g.attr("title","");else if(e>f){if("2"==n)if(n=(new Date).getTime()+d,b&&(r=new Date(n),d=(new Date(r.getFullYear(),
|
43 |
+
r.getMonth(),r.getDate())).getTime()+d,n-=d,0>n&&(n+=864E5)),e<=n)c.attr("title",ai_admin.insertion_expired),c.css("border-color","#d00"),g.attr("title",ai_admin.insertion_expired),g.css("border-color","#d00");else{if(b)d=(e-f)/1E3,b=Math.floor(d/3600),d-=3600*b,n=Math.floor(d/60),d-=60*n,b=" "+ai_admin.duration+": "+("0"+b).slice(-2)+":"+("0"+n).slice(-2)+":"+("0"+d).slice(-2);else switch(d=Math.floor((e-f)/1E3/3600/24),b=" "+ai_admin.duration+": "+d+" ",d){case 0:b+=ai_admin.days_0;break;case 1:b+=
|
44 |
+
ai_admin.days_1;break;case 2:b+=ai_admin.days_2;break;case 3:b+=ai_admin.days_3;break;case 4:b+=ai_admin.days_4;break;default:b+=ai_admin.days_5}c.attr("title",b);g.attr("title",b)}}else c.attr("title",ai_admin.invalid_end_date),c.css("border-color","#d00"),g.attr("title",ai_admin.invalid_end_date),g.css("border-color","#d00");c.tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});g.tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})}function y(b){var d=a("input#chart-start-date-"+
|
45 |
+
b);b=a("input#chart-end-date-"+b);var f=F(d),c=F(b);d.attr("title","");d.css("border-color","rgb(221, 221, 221)");b.attr("title","");b.css("border-color","rgb(221, 221, 221)");if(null==f)b.attr("title","");else if(null==c)b.attr("title","");else if(c>=f){var e=new Date;316224E5<new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)-f&&(d.attr("title",ai_admin.invalid_start_date),d.css("border-color","#d00"));316224E5<c-f&&(b.attr("title",ai_admin.invalid_date_range),b.css("border-color","#d00"))}else b.attr("title",
|
46 |
+
ai_admin.invalid_end_date),b.css("border-color","#d00")}function x(b){a("#paragraph-settings-"+b).hide();a("#paragraph-buttons-"+b).hide();a("#image-settings-"+b).hide();var d=a("#filter-settings-"+b).attr("data-filter");d="undefined"!==typeof d&&!1!==d;a("#filter-settings-"+b).removeAttr("data-filter").hide();a("#filter-buttons-"+b).hide();a("#html-element-settings-"+b).hide();a("#inside-element-"+b).hide();var f=a("select#insertion-type-"+b+" option:selected").attr("value");if(f==AI_BEFORE_PARAGRAPH||
|
47 |
+
f==AI_AFTER_PARAGRAPH)a("#paragraph-buttons-"+b).show(),a("#paragraph-settings-"+b+" input").attr("title",a("#paragraph-settings-"+b+" input").attr("data-title-paragraphs")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}),a("#paragraph-settings-"+b).show();else{if(f==AI_BEFORE_IMAGE||f==AI_AFTER_IMAGE)a("#paragraph-buttons-"+b).hide(),a("#paragraph-settings-"+b+" input").attr("title",a("#paragraph-settings-"+b+" input").attr("data-title-images")).tooltip({track:!0,delay:700,showURL:!1,
|
48 |
+
showBody:" | ",fade:250}),a("#paragraph-settings-"+b).show();else if(f==AI_BEFORE_EXCERPT||f==AI_AFTER_EXCERPT||f==AI_BETWEEN_POSTS||f==AI_BETWEEN_COMMENTS){a("#filter-buttons-"+b).show();var c="";f==AI_BEFORE_EXCERPT||f==AI_AFTER_EXCERPT?c=a("#filter-settings-"+b+" input").attr("data-title-excerpts"):f==AI_BETWEEN_POSTS?c=a("#filter-settings-"+b+" input").attr("data-title-posts"):f==AI_BETWEEN_COMMENTS&&(c=a("#filter-settings-"+b+" input").attr("data-title-comments"));a("#filter-settings-"+b+" input").attr("title",
|
49 |
+
c).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});a("#filter-settings-"+b).attr("data-filter","1").show()}a("#paragraph-counting-"+b).hide();a("#paragraph-clearance-"+b).hide()}c=a("#filter-settings-"+b).attr("data-filter");!d||"undefined"!==typeof c&&!1!==c||(a("#filter-settings-"+b+" input").val(""),a("input#filter-numbers-"+b).val(""),a("select#filter-type-"+b).val(0),a("input#invert-filter-"+b).removeAttr("checked"));if(f==AI_BEFORE_HTML_ELEMENT||f==AI_AFTER_HTML_ELEMENT||f==
|
50 |
+
AI_INSIDE_HTML_ELEMENT)a("#html-element-settings-"+b).show(),f==AI_INSIDE_HTML_ELEMENT&&a("#inside-element-"+b).css("display","table-cell");a("#css-label-"+b).css("display","table-cell");a("#edit-css-button-"+b).css("display","table-cell");a("#css-none-"+b).hide();a("#custom-css-"+b).hide();a("#css-left-"+b).hide();a("#css-right-"+b).hide();a("#css-center-"+b).hide();a("#css-float-left-"+b).hide();a("#css-float-right-"+b).hide();a("#css-sticky-left-"+b).hide();a("#css-sticky-right-"+b).hide();a("#css-sticky-top-"+
|
51 |
+
b).hide();a("#css-sticky-bottom-"+b).hide();a("#css-sticky-"+b).hide();a("#css-no-wrapping-"+b).hide();a("#no-wrapping-warning-"+b).hide();a("#sticky-position-"+b).hide();a("#sticky-animation-"+b).hide();a("#sticky-background-"+b).hide();a("#sticky-background-"+b).find(".bkg-parameters").hide();a("#tracking-wrapping-warning-"+b).hide();d=a("select#block-alignment-"+b+" option:selected").attr("value");d==AI_ALIGNMENT_NO_WRAPPING?(a("#css-no-wrapping-"+b).css("display","table-cell"),a("#css-label-"+
|
52 |
+
b).hide(),a("#edit-css-button-"+b).hide(),a("#client-side-detection-"+b).is(":checked")&&a("#no-wrapping-warning-"+b).show(),a("#tracking-"+b).next().find(".checkbox-icon").hasClass("on")&&a("#tracking-wrapping-warning-"+b).show()):d==AI_ALIGNMENT_DEFAULT?a("#css-none-"+b).css("display","table-cell"):d==AI_ALIGNMENT_CUSTOM_CSS?(a("#icons-css-code-"+b).show(),a("#custom-css-"+b).show(),aa(b),is_sticky(a("#custom-css-"+b).val())&&(a("#sticky-position-"+b).show(),a("#sticky-animation-"+b).show(),a("#sticky-background-"+
|
53 |
+
b).show(),a("select#animation-"+b).change(),is_background(a("#custom-css-"+b).val())&&a("input#background-"+b).is(":checked")&&a("#sticky-background-"+b).find(".bkg-parameters").show())):d==AI_ALIGNMENT_LEFT?a("#css-left-"+b).css("display","table-cell"):d==AI_ALIGNMENT_RIGHT?a("#css-right-"+b).css("display","table-cell"):d==AI_ALIGNMENT_CENTER?a("#css-center-"+b).css("display","table-cell"):d==AI_ALIGNMENT_FLOAT_LEFT?a("#css-float-left-"+b).css("display","table-cell"):d==AI_ALIGNMENT_FLOAT_RIGHT?
|
54 |
+
a("#css-float-right-"+b).css("display","table-cell"):d==AI_ALIGNMENT_STICKY_LEFT?a("#css-sticky-left-"+b).css("display","table-cell"):d==AI_ALIGNMENT_STICKY_RIGHT&&a("#css-sticky-right-"+b).css("display","table-cell");d==AI_ALIGNMENT_STICKY_TOP?a("#css-sticky-top-"+b).css("display","table-cell"):d==AI_ALIGNMENT_STICKY_BOTTOM?a("#css-sticky-bottom-"+b).css("display","table-cell"):d==AI_ALIGNMENT_STICKY&&(a("#icons-css-code-"+b).show(),a("#sticky-position-"+b).show(),a("#sticky-animation-"+b).show(),
|
55 |
+
a("#sticky-background-"+b).show(),a("select#animation-"+b).change(),a("select#horizontal-position-"+b+" option:selected").attr("value")==AI_STICK_HORIZONTAL_CENTER&&a("input#background-"+b).is(":checked")&&a("#sticky-background-"+b).find(".bkg-parameters").show(),a("#css-sticky-"+b).css("display","table-cell"),aa(b));a("#icons-css-code-"+b).css("display");"do not insert"==a("select#avoid-action-"+b+" option:selected").text()?a("#check-up-to-"+b).hide():a("#check-up-to-"+b).show();a("#scheduling-delay-"+
|
56 |
+
b).hide();a("#scheduling-between-dates-1-"+b).hide();a("#scheduling-between-dates-2-"+b).hide();a("#scheduling-delay-warning-"+b).hide();d=a("select#scheduling-"+b).val();if("1"==d||"3"==d)a("#scheduling-delay-"+b).show();else if("2"==d||"4"==d||"5"==d||"6"==d)a("#scheduling-between-dates-1-"+b).show(),a("#scheduling-between-dates-2-"+b).show(),z(b);a("#adb-block-replacement-"+b).hide();a("select#adb-block-action-"+b).val()==AI_ADB_BLOCK_ACTION_REPLACE&&a("#adb-block-replacement-"+b).show();a("#exceptions-enabled-"+
|
57 |
+
b).is(":checked")?a("#default-insertion-"+b).show():a("#default-insertion-"+b).hide();syntax_highlighting&&k(b);W(b)}function N(b){var d=parseInt(a("select#adsense-type-"+b+" option:selected").attr("value")),f=parseInt(a("select#adsense-size-"+b+" option:selected").attr("value"));d!=AI_ADSENSE_STANDARD&&d!=AI_ADSENSE_LINK||f!=AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT?(a("#adsense-layout-"+b).show(),a("#adsense-viewports-"+b).hide()):(a("#adsense-layout-"+b).hide(),a("#adsense-viewports-"+b).show());a("#tab-adsense-"+
|
58 |
+
b+" .adsense-layout").css("visibility","hidden");a("#tab-adsense-"+b+" .adsense-fixed-size").show();a("#tab-adsense-"+b+" .adsense-fixed-size").css("visibility","hidden");a("#tab-adsense-"+b+" .adsense-size").css("visibility","hidden");a("#tab-adsense-"+b+" .adsense-full-width-responsive").hide();switch(d){case AI_ADSENSE_STANDARD:a("#tab-adsense-"+b+" .adsense-size").css("visibility","visible");f==AI_ADSENSE_SIZE_FIXED&&a("#tab-adsense-"+b+" .adsense-fixed-size").css("visibility","visible");f==AI_ADSENSE_SIZE_RESPONSIVE&&
|
59 |
+
(a("#tab-adsense-"+b+" .adsense-fixed-size").hide(),a("#tab-adsense-"+b+" .adsense-full-width-responsive").show());break;case AI_ADSENSE_LINK:a("#tab-adsense-"+b+" .adsense-size").css("visibility","visible");f==AI_ADSENSE_SIZE_FIXED&&a("#tab-adsense-"+b+" .adsense-fixed-size").css("visibility","visible");f==AI_ADSENSE_SIZE_RESPONSIVE&&(a("#tab-adsense-"+b+" .adsense-fixed-size").hide(),a("#tab-adsense-"+b+" .adsense-full-width-responsive").show());break;case AI_ADSENSE_IN_FEED:a("#tab-adsense-"+b+
|
60 |
+
" .adsense-layout").css("visibility","visible")}}function v(b){a("#tab-amazon-"+b+" .amazon-amp-data").hide();1==parseInt(a("select#amazon-amp-"+b+" option:selected").attr("value"))&&a("#tab-amazon-"+b+" .amazon-amp-data").show()}function A(b,d){var f=ace.edit("editor-"+b),c=a("#block-"+b),e=a("#editor-"+b);d?(c.val(f.session.getValue()),c.css("display","block"),e.css("display","none")):(f.session.setValue(c.val()),f.renderer.updateFull(),e.css("display","block"),c.css("display","none"))}function D(b){debug&&
|
61 |
+
console.log("configure_editor:",b);if(syntax_highlighting){var d=new SyntaxHighlight("#block-"+b,b,shSettings);setTimeout(function(){d.editor.setPrintMarginColumn(1E3)},50);a("input#simple-editor-"+b).change(function(){var f=a(this).attr("id").replace("simple-editor-",""),c=a(this).is(":checked");A(f,c)})}}function T(){a("#adb-message").hide();a("#adb-page-redirection").hide();var b=a("select#adb-action option:selected").attr("value");b==AI_ADB_ACTION_MESSAGE?a("#adb-message").show():b==AI_ADB_ACTION_REDIRECTION&&
|
62 |
+
a("#adb-page-redirection").show()}function U(b){b=a("<section>"+a("div#statistics-elements-"+b).html()+"</section>");a('div[style*="display: none"], div[style*="display:none"]',b).remove();a(".ai-toolbar-button",b).remove();a(".ai-chart-container",b).css("font-size","10px");a(".ai-chart-container.versions",b).css("text-align","center");a(".ai-statistics-legend",b).after(a(".ai-chart-container.legend",b).html());var d={action:"ai_ajax_backend",pdf:"block",ai_check:ai_nonce,code:b64e(a(b).html())};
|
63 |
+
a("#ai-loading").show();setTimeout(function(){open_window_post(ajaxurl,"_blank",d)},5);setTimeout(function(){a("#ai-loading").hide()},1E3)}function V(b){a("#ai-loading").show();a("span#export-csv-button-"+b).addClass("on");setTimeout(function(){a("input#load-custom-range-"+b).click()},5);setTimeout(function(){a("#ai-loading").hide()},1E3)}function K(b){a("input#load-custom-range-"+b).click(function(){var d=a(this).attr("id");d=d.replace("load-custom-range-","");var f=a(this).next().find(".checkbox-icon");
|
64 |
+
f.addClass("on");var c=a("input#chart-start-date-"+d).val(),e=a("input#chart-end-date-"+d).val(),g=a("div#statistics-elements-"+d),n=a("div#ai-version-charts-"+d).is(":visible"),r="";a("input#clear-range-"+d).hasClass("delete")&&(r="&delete=1");var q="";a("input#adb-statistics-button-"+d).next().find(".icon-adb").hasClass("on")&&(q="&adb=1");if(a("span#export-csv-button-"+d).hasClass("on")){a("span#export-csv-button-"+d).removeClass("on");c={action:"ai_ajax_backend",statistics:d,"start-date":c,"end-date":e,
|
65 |
+
delete_range:""==r?"":1,adb:""==q?"":1,csv:1,ai_check:ai_nonce};e=document.createElement("form");e.setAttribute("method","get");e.setAttribute("action",ajaxurl);for(var t in c)c.hasOwnProperty(t)&&(r=document.createElement("input"),r.type="hidden",r.name=t,r.value=encodeURI(c[t]),e.appendChild(r));document.body.appendChild(e);e.submit();document.body.removeChild(e);f.removeClass("on")}else g.load(ajaxurl+"?action=ai_ajax_backend&statistics="+d+"&start-date="+c+"&end-date="+e+r+q+"&ai_check="+ai_nonce,
|
66 |
+
function(w,B,H){f.removeClass("on");"error"==B?(w="Error downloading data: "+H.status+" "+H.statusText,a("div#load-error-"+d).html(w),debug&&console.log(w)):(a("span#export-pdf-button-"+d).show(),a("span#export-csv-button-"+d).show(),w=a("#ai-main-toolbar-"+d+" .public-report-button"),w.show(),B=g.find("span.ai-statistics-export-data.ai-public-report"),w.attr("report-data",JSON.stringify(B.data("report"))),B.remove(),a("div#load-error-"+d).html(""),debug&&console.log("Custom statistics loaded: "+
|
67 |
+
d),ba(g),g.find("label.ai-version-charts-button.not-configured").click(function(){var G=a(this).hasClass("no-version-charts-delay");a(this).removeClass("not-configured");var P=a(this).closest(".ai-charts").find("div.ai-version-charts");P.toggle();var X=P.find(".ai-chart.not-configured.hidden");X.length&&(X.each(function(){a(this).removeClass("hidden")}),G?ba(P):setTimeout(function(){ba(P)},10))}),n&&g.find("label.ai-version-charts-button.not-configured").addClass("no-version-charts-delay").click(),
|
68 |
+
a("input#chart-start-date-"+d).css("color","#32373c"),a("input#chart-end-date-"+d).css("color","#32373c"))})});a("input#auto-refresh-"+b).click(function(){var d=a(this).attr("id");d=d.replace("auto-refresh-","");var f=a(this).next().find(".checkbox-icon");f.toggleClass("on");f.hasClass("on")&&m(d)});a("input#clear-range-"+b).click(function(){var d=a(this).attr("id");d=d.replace("clear-range-","");var f=this,c=a("input#chart-start-date-"+d).val(),e=a("input#chart-end-date-"+d).val(),g="";""==c&&""==
|
69 |
+
e?g=ai_admin.delete_all_statistics:""!=c&&""!=e&&(g=ai_admin.delete_statistics_between.replace("{start_date}",c).replace("{end_date}",e));""!=g&&a("<div />").html(g).attr("title",ai_admin.warning).dialog({bgiframe:!0,draggable:!1,resizable:!1,modal:!0,height:"auto",width:400,position:{my:"center",at:"center",of:"#ai-settings"},buttons:[{text:ai_admin["delete"],click:function(){a(this).dialog("close");a(f).addClass("delete");a("input#load-custom-range-"+d).click();a(f).removeClass("delete")}},{text:ai_admin.cancel,
|
70 |
+
click:function(){a(this).dialog("close")}}],open:function(){a(this).parent().find("button:nth-child(2)").focus()}})});a("input#chart-start-date-"+b).datepicker({dateFormat:dateFormat,autoSize:!0});a("input#chart-end-date-"+b).datepicker({dateFormat:dateFormat,autoSize:!0});a("input#chart-start-date-"+b).change(function(){a(this).closest(".custom-range-controls").find(".data-range").removeClass("selected");a(this).closest(".custom-range-controls").attr("range-name","----");l();var d=a(this).attr("id").replace("chart-start-date-",
|
71 |
+
"");a(this).css("color","red");y(d)});a("input#chart-end-date-"+b).change(function(){a(this).closest(".custom-range-controls").find(".data-range").removeClass("selected");a(this).closest(".custom-range-controls").attr("range-name","----");l();var d=a(this).attr("id").replace("chart-end-date-","");a(this).css("color","red");y(d)});a("div#custom-range-controls-"+b+" span.data-range").click(function(){var d=a(this).closest(".custom-range-controls");d.find(".data-range").removeClass("selected");a(this).addClass("selected");
|
72 |
+
d.attr("range-name",a(this).data("range-name"));l();block=a(this).closest(".custom-range-controls").attr("id").replace("custom-range-controls-","");a("input#chart-start-date-"+block).attr("value",a(this).data("start-date")).val(a(this).data("start-date"));a("input#chart-end-date-"+block).attr("value",a(this).data("end-date")).val(a(this).data("end-date"));y(block);a("input#load-custom-range-"+block).click()})}function ja(){debug&&console.log("Configure tab: 0");a("#tab-0").addClass("configured");
|
73 |
+
a("#tab-0 input[type=submit], #tab-0 button.ai-button").button().show();D("h");D("f");a("#block-a").length&&D("a");a("#ai-plugin-settings-tab-container").tabs();a("#ai-plugin-settings-tabs").show();a("#export-switch-0").checkboxButton().click(function(){a("#export-container-0").toggle();a("#export-container-0").is(":visible")&&!a(this).hasClass("loaded")&&a("#export_settings_0").load(ajaxurl+"?action=ai_ajax_backend&export=0&ai_check="+ai_nonce,function(d,f,c){"error"==f?a("#ai-error-container").text(ai_admin.error+
|
74 |
+
" "+c.status+": "+c.statusText).show():(a("#export_settings_0").attr("name","export_settings_0"),a("#export-switch-0").addClass("loaded"))})});a("input#process-php-h").change(function(){syntax_highlighting&&k("h")});a("input#process-php-f").change(function(){syntax_highlighting&&k("f")});a("input#process-php-a").change(function(){syntax_highlighting&&k("a")});syntax_highlighting&&k("h");syntax_highlighting&&k("f");a("#block-a").length&&syntax_highlighting&&k("a");for(var b=1;b<=ka;b++)L("group-country",
|
75 |
+
b);a("#enable-header").checkboxButton();a("#enable-header-404").checkboxButton();a("#simple-editor-h").checkboxButton().click(function(){var d=a("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");0!=active_tab||"tab-header"!=d||a(this).hasClass("clicked")||(a(this).addClass("clicked"),a("#ai-tab-container .simple-editor-button").click(),a(this).removeClass("clicked"))});a("#simple-editor-h").is(":checked")&&(A("h",!0),a("#simple-editor-h").next("label").find(".checkbox-icon").addClass("on"));
|
76 |
+
a("#process-php-h").checkboxButton();a("#enable-footer").checkboxButton();a("#enable-footer-404").checkboxButton();a("#simple-editor-f").checkboxButton().click(function(){var d=a("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");0!=active_tab||"tab-footer"!=d||a(this).hasClass("clicked")||(a(this).addClass("clicked"),a("#ai-tab-container .simple-editor-button").click(),a(this).removeClass("clicked"))});a("#simple-editor-f").is(":checked")&&(A("f",!0),a("#simple-editor-f").next("label").find(".checkbox-icon").addClass("on"));
|
77 |
+
a("#process-php-f").checkboxButton();a("#tracking").checkboxButton();K(0);a("input#statistics-button-0").checkboxButton().click(function(){a("div#statistics-container-0").toggle();a("span#export-pdf-button-0").toggle();a("span#export-csv-button-0").toggle();a("div#tab-tracking-settings").toggle();a("div#statistics-container-0").is(":visible")&&!a(this).hasClass("loaded")&&(a("input#load-custom-range-0").click(),a(this).addClass("loaded"))});a("#export-pdf-button-0").click(function(){U(0)});a("#export-csv-button-0").click(function(){V(0)});
|
78 |
+
a("#enable-adb-detection").checkboxButton();a("#simple-editor-a").checkboxButton().click(function(){var d=a("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");0!=active_tab||"tab-adblocking"!=d||a(this).hasClass("clicked")||(a(this).addClass("clicked"),a("#ai-tab-container .simple-editor-button").click(),a(this).removeClass("clicked"))});a("#simple-editor-a").is(":checked")&&(A("a",!0),a("#simple-editor-a").next("label").find(".checkbox-icon").addClass("on"));a("#process-php-a").checkboxButton();
|
79 |
+
T();a("select#adb-action").change(function(){T()});a("#preview-button-adb").button({}).show().click(function(){a(this).blur();var d=b64e(get_editor_text("a")),f=a("input#process-php-a").is(":checked")?1:0;open_popup_window_post(ajaxurl,"width=820,height=870,top="+(screen.height/2-435)+",left=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","preview",{action:"ai_ajax_backend",preview:"adb",ai_check:ai_nonce,code:d,php:f})});a("#main-content-element-button").click(function(){var d=
|
80 |
+
a("input#main-content-element").val(),f=a("#ai-settings").data("home-relative-url");open_popup_window_post(f,"width="+(screen.availWidth-15)+",height="+(screen.availHeight-65)+",top="+screen.availTop+",left="+screen.availLeft+",resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","ai-selector",{html_element_selection:"main",selector:d,input:"input#main-content-element"})});a("#custom-selectors-button").click(function(){var d=a("input#custom-selectors").val(),f=
|
81 |
+
a("#ai-settings").data("home-relative-url");open_popup_window_post(f,"width="+(screen.availWidth-15)+",height="+(screen.availHeight-65)+",top="+screen.availTop+",left="+screen.availLeft+",resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","ai-selector",{html_element_selection:"adb",selector:d,input:"input#custom-selectors"})});a("#disable-header-code").checkboxButton();a("#disable-footer-code").checkboxButton();a("#disable-js-code").checkboxButton();a("#disable-css-code").checkboxButton();
|
82 |
+
a("#disable-html-code").checkboxButton();a("#disable-php-processing").checkboxButton();a("#disable-blocks").checkboxButton();a("input#disable-header-code").change(function(){a("#ai-page-header").toggleClass("ai-page-code-disabled")});a("input#disable-footer-code").change(function(){a("#ai-page-footer").toggleClass("ai-page-code-disabled")});a("input#disable-js-code").change(function(){a("#ai-page-js").toggleClass("ai-page-code-disabled")});a("input#disable-css-code").change(function(){a("#ai-page-css").toggleClass("ai-page-code-disabled")});
|
83 |
+
a("input#disable-html-code").change(function(){a("#ai-page-html").toggleClass("ai-page-code-disabled")});a("input#disable-php-processing").change(function(){a("#ai-page-php").toggleClass("ai-page-code-disabled")});a("input#disable-blocks").change(function(){a("#ai-page-block").toggleClass("ai-page-code-disabled")});a("#report-header-image-button").click(function(d){a(this).blur();d.preventDefault();if(!f){var f=wp.media({title:ai_admin.select_header_image,button:{text:ai_admin.use_this_image},multiple:!1});
|
84 |
+
f.on("select",function(){var c=f.state().get("selection").first().toJSON();a("#report-header-image").val(c.url)})}f.open()});a("#tab-0 .adsense-list").click(function(){a(this).blur();ca()});a("#ai-blocked-ip-addresses").click(function(){ip_address=a("#ai-blocked-ip-addresses").attr("delete");a("#ai-blocked-ip-addresses").removeAttr("delete");null==ip_address&&(ip_address="");a("#ai-blocked-ip-addresses-list").load(ajaxurl+"?action=ai_ajax_backend&cfp-ip-address-list="+ip_address+"&ai_check="+ai_nonce,
|
85 |
+
function(d,f,c){"error"==f?console.log("Error loading CFP IP addresses: "+c.status+" "+c.statusText):(d=a("#ai-blocked-ip-addresses-list table").data("count-text"),null==d&&(d=""),a("#ai-blocked-ip-addresses").text(d),a(".cfp-ip-address").click(function(){var e=a(this).closest("tr").data("ip-address");setTimeout(function(){a("#ai-blocked-ip-addresses").attr("delete",e).click()},10)}))})})}function da(b){debug&&console.log("Configure tab:",b);a("#tab-"+b).addClass("configured");a("#tab-"+b+" input[type=submit], #tab-"+
|
86 |
+
b+" button.ai-button").button().show();D(b);a("select#insertion-type-"+b).change(function(){var c=a(this).attr("id").tabIndex();x(c);la(c)});a("select#block-alignment-"+b).change(function(){var c=a(this).attr("id").replace("block-alignment-",""),e=a("select#block-alignment-"+c+" option:selected").attr("value");a("select#insertion-type-"+c+" option:selected").attr("value")==AI_ABOVE_HEADER||e!=AI_ALIGNMENT_STICKY_LEFT&&e!=AI_ALIGNMENT_STICKY_RIGHT&&e!=AI_ALIGNMENT_STICKY_TOP&&e!=AI_ALIGNMENT_STICKY_BOTTOM&&
|
87 |
+
e!=AI_ALIGNMENT_STICKY||a("select#insertion-type-"+c).val(AI_FOOTER).change();x(c)});a("select#vertical-position-"+b).change(function(){var c=a(this).attr("id").replace("vertical-position-","");M(c)});a("select#horizontal-position-"+b).change(function(){var c=a(this).attr("id").replace("horizontal-position-","");M(c);x(c)});a("input#background-"+b).change(function(){var c=a(this).attr("id").replace("background-","");W(c);M(c);x(c)});a("input#body-background-"+b).change(function(){var c=a(this).attr("id").replace("body-background-",
|
88 |
+
"");W(c)});0!=a("input#bkg-color-"+b).length&&(a("input#bkg-color-"+b).colorpicker({useAlpha:!1,useHashPrefix:!0,format:"hex",fallbackColor:"#fffffe"}).on("colorpickerChange colorpickerCreate colorpickerUpdate",function(c){c=a(this).attr("id").replace("bkg-color-","");M(c);a("#sticky-background-"+c).find(".banner-preview").css("background",a(this).val())}).on("input",function(){var c=a(this).attr("id").replace("bkg-color-","");M(c);a("#sticky-background-"+c).find(".banner-preview").css("background",
|
89 |
+
a(this).val())}),a("input#bkg-color-"+b).colorpicker("setValue",a("input#bkg-color-"+b).attr("value")));a("select#bkg-repeat-"+b).change(function(){var c=a(this).attr("id").replace("bkg-repeat-","");M(c);x(c)});a("select#bkg-size-"+b).change(function(){var c=a(this).attr("id").replace("bkg-size-","");M(c);x(c)});a("input#exceptions-enabled-"+b).change(function(){var c=a(this).attr("id").replace("exceptions-enabled-","");x(c)});a("input#process-php-"+b).change(function(){var c=a(this).attr("id").replace("process-php-",
|
90 |
+
"");x(c)});a("input#show-label-"+b).change(function(){a(this).attr("id").replace("show-label-","")});a("#enable-shortcode-"+b).change(function(){var c=a(this).attr("id").replace("enable-shortcode-","");x(c)});a("#enable-php-call-"+b).change(function(){var c=a(this).attr("id").replace("enable-php-call-","");x(c)});a("select#display-for-devices-"+b).change(function(){var c=a(this).attr("id").replace("display-for-devices-","");x(c)});a("select#scheduling-"+b).change(function(){var c=a(this).attr("id").replace("scheduling-",
|
91 |
+
"");x(c)});a("select#adb-block-action-"+b).change(function(){var c=a(this).attr("id").replace("adb-block-action-","");x(c)});a("#display-homepage-"+b).change(function(){var c=a(this).attr("id").replace("display-homepage-","");x(c)});a("#display-category-"+b).change(function(){var c=a(this).attr("id").replace("display-category-","");x(c)});a("#display-search-"+b).change(function(){var c=a(this).attr("id").replace("display-search-","");x(c)});a("#display-archive-"+b).change(function(){var c=a(this).attr("id").replace("display-archive-",
|
92 |
+
"");x(c)});a("#client-side-detection-"+b).change(function(){var c=a(this).attr("id").replace("client-side-detection-","");x(c)});a("#scheduling-date-on-"+b).change(function(){var c=a(this).attr("id").replace("scheduling-date-on-","");z(c)});a("#scheduling-date-off-"+b).change(function(){var c=a(this).attr("id").replace("scheduling-date-off-","");z(c)});a("#scheduling-time-on-"+b).change(function(){var c=a(this).attr("id").replace("scheduling-time-on-","");z(c)});a("#scheduling-time-off-"+b).change(function(){var c=
|
93 |
+
a(this).attr("id").replace("scheduling-time-off-","");z(c)});a("#scheduling-weekdays-"+b).click(function(){a(this).attr("id").replace("scheduling-weekdays-","");a(this).selectedIndexes();days=[];a.each(a(this).selectedIndexes(),function(c,e){days[c]=parseInt(e)});a("#scheduling-weekdays-value-"+b).attr("value",days.join(","))});a("select#avoid-action-"+b).change(function(){var c=a(this).attr("id").replace("avoid-action-","");x(c)});a("#tab-"+b+" .page-checker-button").click(function(){a("#page-checker-button").click()});
|
94 |
+
x(b);a("#exceptions-button-"+b).click(function(){var c=a(this).attr("id").replace("exceptions-button-","");a("#block-exceptions-"+c).toggle()});a("#show-css-button-"+b).click(function(){var c=a(this).attr("id").replace("show-css-button-","");a("#icons-css-code-"+c).toggle();a("#icons-css-code-"+c).is(":visible")?(aa(c),x(c)):(a("#sticky-animation-"+c).hide(),a("#sticky-background-"+c).hide())});a("#counting-button-"+b).click(function(){var c=a(this).attr("id").replace("counting-button-","");a("#paragraph-counting-"+
|
95 |
+
c).toggle()});a("#clearance-button-"+b).click(function(){var c=a(this).attr("id").replace("clearance-button-","");a("#paragraph-clearance-"+c).toggle()});a("#filter-button-"+b).click(function(){var c=a(this).attr("id").tabIndex();a("#misc-settings-"+c).toggle();a("#misc-settings-"+c).is(":visible")&&(a("#ai-misc-container-"+c).tabs({active:1}),a("#ai-misc-filter-"+c).click())});a("#scheduling-date-on-"+b).datepicker({dateFormat:dateFormat,autoSize:!0});a("#scheduling-date-off-"+b).datepicker({dateFormat:dateFormat,
|
96 |
+
autoSize:!0});0!=a("#scheduling-weekdays-value-"+b).length&&(a("#scheduling-time-on-"+b).timepicker({timeFormat:timeFormat,minTime:"00:00:00",maxTime:"23:00:00",step:60}),a("#scheduling-time-off-"+b).timepicker({timeFormat:timeFormat,minTime:"00:00:00",maxTime:"23:00:00",step:60}),days=[],a.each(a("#scheduling-weekdays-value-"+b).val().split(","),function(c,e){days[c]=parseInt(e)}),a("#scheduling-weekdays-"+b).weekdays({days:[ai_admin.day_mo,ai_admin.day_tu,ai_admin.day_we,ai_admin.day_th,ai_admin.day_fr,
|
97 |
+
ai_admin.day_sa,ai_admin.day_su],selectedIndexes:days}));a(".css-code-"+b).click(function(){var c=a(this).attr("class").replace("css-code-","");a("#custom-css-"+c).is(":visible")||a("#edit-css-button-"+c).click()});a("#edit-css-button-"+b).button({}).click(function(){var c=a(this).attr("id").replace("edit-css-button-","");a("#css-left-"+c).hide();a("#css-right-"+c).hide();a("#css-center-"+c).hide();a("#css-float-left-"+c).hide();a("#css-float-right-"+c).hide();a("#css-sticky-left-"+c).hide();a("#css-sticky-right-"+
|
98 |
+
c).hide();a("#css-sticky-top-"+c).hide();a("#css-sticky-bottom-"+c).hide();a("#css-sticky-"+c).hide();var e=a("select#block-alignment-"+c+" option:selected").attr("value");e==AI_ALIGNMENT_DEFAULT?(a("#css-none-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-none-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_LEFT?(a("#css-left-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-left-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):
|
99 |
+
e==AI_ALIGNMENT_RIGHT?(a("#css-right-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-right-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_CENTER?(a("#css-center-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-center-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_FLOAT_LEFT?(a("#css-float-left-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-float-left-"+c).text()),a("select#block-alignment-"+
|
100 |
+
c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_FLOAT_RIGHT?(a("#css-float-right-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-float-right-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_STICKY_LEFT?(a("#css-sticky-left-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-sticky-left-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_STICKY_RIGHT&&(a("#css-sticky-right-"+c).hide(),a("#custom-css-"+
|
101 |
+
c).show().val(a("#css-sticky-right-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change());e==AI_ALIGNMENT_STICKY_TOP?(a("#css-sticky-top-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-sticky-top-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):e==AI_ALIGNMENT_STICKY_BOTTOM?(a("#css-sticky-bottom-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-sticky-bottom-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change()):
|
102 |
+
e==AI_ALIGNMENT_STICKY&&(a("#css-sticky-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-sticky-"+c).text()),a("select#block-alignment-"+c).val(AI_ALIGNMENT_CUSTOM_CSS).change())});a("#name-label-"+b).click(function(){var c=a(this).attr("id").replace("name-label-","");a("div#settings-"+c).is(":visible")&&!a("#name-edit-"+c).is(":visible")&&(a("#name-edit-"+c).css("display","table-cell").val(a("#name-label-"+c).text()).focus(),a("#name-label-"+c).hide())});a("#name-label-container-"+b).click(function(){var c=
|
103 |
+
a(this).attr("id").replace("name-label-container-","");a("div#settings-"+c).is(":visible")&&!a("#name-edit-"+c).is(":visible")&&(a("#name-edit-"+c).css("display","table-cell").val(a("#name-label-"+c).text()).focus(),a("#name-label-"+c).hide())});a("#name-edit-"+b).on("keyup keypress",function(c){var e=c.keyCode||c.which;ignore_key=!0;if(27==e)e=a(this).attr("id").replace("name-edit-",""),a("#name-label-"+e).show(),a("#name-edit-"+e).hide(),ignore_key=!1;else if(13==e)return e=a(this).attr("id").replace("name-edit-",
|
104 |
+
""),a("#name-label-"+e).show().text(a("#name-edit-"+e).val()),a("#name-edit-"+e).hide(),ignore_key=!1,c.preventDefault(),!1}).focusout(function(){if(ignore_key){var c=a(this).attr("id").replace("name-edit-","");a("#name-label-"+c).show().text(a("#name-edit-"+c).val());a("#name-edit-"+c).hide()}ignore_key=!0});a("#export-switch-"+b).checkboxButton().click(function(){var c=a(this).attr("id");c=c.replace("export-switch-","");a("#export-container-"+c).toggle();a("#export-container-"+c).is(":visible")&&
|
105 |
+
!a(this).hasClass("loaded")&&a("#export_settings_"+c).load(ajaxurl+"?action=ai_ajax_backend&export="+c+"&ai_check="+ai_nonce,function(e,g,n){"error"==g?a("#ai-error-container").text(ai_admin.error+" "+n.status+": "+n.statusText).show():(a("#export_settings_"+c).attr("name","export_settings_"+c),a("#export-switch-"+c).addClass("loaded"))})});a("input#statistics-button-"+b).checkboxButton().click(function(){l();var c=a(this).attr("id");c=c.replace("statistics-button-","");a("div#statistics-container-"+
|
106 |
+
c).toggle();a("div#settings-"+c).toggle();a("#tab-"+c+" .ai-toolbars .ai-settings").toggle();a("#ai-main-toolbar-"+c+" .ai-statistics").toggle();a("div#statistics-container-"+c).is(":visible")?(a("#name-label-container-"+c).css("cursor","default"),a(this).hasClass("loaded")||(a("input#load-custom-range-"+c).click(),a(this).addClass("loaded"))):a("#name-label-container-"+c).css("cursor","pointer")});a("#export-pdf-button-"+b).click(function(){var c=a(this).attr("id").tabIndex();U(c)});a("#export-csv-button-"+
|
107 |
+
b).click(function(){var c=a(this).attr("id").tabIndex();V(c)});a("input#adb-statistics-button-"+b).checkboxButton().click(function(){var c=a(this).attr("id");c=c.replace("adb-statistics-button-","");setTimeout(function(){a("input#load-custom-range-"+c).click()},2)});K(b);a("#device-detection-button-"+b).button({}).show().click(function(){var c=a(this).attr("id");c=c.replace("device-detection-button-","");a("#device-detection-settings-"+c).toggle()});a("#lists-button-"+b).button({}).show().click(function(){var c=
|
108 |
+
a(this).attr("id");c=c.replace("lists-button-","");if(a("#list-settings-"+c).is(":visible"))if(a("#list-settings-"+c).hasClass("ai-expaned"))a("#list-settings-"+c).hide(),a("#list-settings-"+c).removeClass("ai-expaned");else{var e=a("#list-settings-"+c+" tr"),g=a("#list-settings-"+c+" tr.list-items");g.length!=e.length?(a("#list-settings-"+c+" tr").show(),a("#list-settings-"+c).addClass("ai-expaned")):(a("#list-settings-"+c).hide(),a("#list-settings-"+c).removeClass("ai-expaned"))}else a("#list-settings-"+
|
109 |
+
c).show(),a("#list-settings-"+c).removeClass("ai-expaned"),a("#list-settings-"+c+" tr").hide(),g=a("#list-settings-"+c+" tr.list-items"),g.length?g.show():(a("#list-settings-"+c+" tr").show(),a("#list-settings-"+c).addClass("ai-expaned"))});a("#list-settings-"+b+" span.checkbox-list-button").click(function(){a(this).hasClass("dashicons-yes")?(a(this).removeClass("dashicons-yes").addClass("dashicons-no"),a(this).prev().removeAttr("checked")):(a(this).removeClass("dashicons-no").addClass("dashicons-yes"),
|
110 |
+
a(this).prev().attr("checked","1"))});a("#manual-button-"+b).button({}).show().click(function(){var c=a(this).attr("id");c=c.replace("manual-button-","");a("#manual-settings-"+c).toggle()});a("#misc-button-"+b).button({}).show().click(function(){var c=a(this).attr("id");c=c.replace("misc-button-","");a("#misc-settings-"+c).toggle()});a("#preview-button-"+b).button({}).show().click(function(){var c=a(this).attr("id");c=c.replace("preview-button-","");a(this).blur();var e=!1,g="1"==a(this).attr("iframe")?
|
111 |
+
1:0;a(this).attr("iframe","");var n=a("select#block-alignment-"+c+" option:selected").attr("value"),r=a("select#horizontal-position-"+c+" option:selected").attr("value"),q=a("select#vertical-position-"+c+" option:selected").attr("value"),t=a("#horizontal-margin-"+c).val(),w=a("#vertical-margin-"+c).val(),B=a("select#animation-"+c+" option:selected").attr("value"),H=a("#custom-css-"+c).val(),G="";n==AI_ALIGNMENT_DEFAULT?G=a("#css-none-"+c).text():n==AI_ALIGNMENT_CUSTOM_CSS?(G=H,e=is_sticky(H)):n==
|
112 |
+
AI_ALIGNMENT_LEFT?G=a("#css-left-"+c).text():n==AI_ALIGNMENT_RIGHT?G=a("#css-right-"+c).text():n==AI_ALIGNMENT_CENTER?G=a("#css-center-"+c).text():n==AI_ALIGNMENT_FLOAT_LEFT?G=a("#css-float-left-"+c).text():n==AI_ALIGNMENT_FLOAT_RIGHT?G=a("#css-float-right-"+c).text():n==AI_ALIGNMENT_STICKY_LEFT?G=a("#css-sticky-left-"+c).text():n==AI_ALIGNMENT_STICKY_RIGHT&&(G=a("#css-sticky-right-"+c).text());n==AI_ALIGNMENT_STICKY_TOP?G=a("#css-sticky-top-"+c).text():n==AI_ALIGNMENT_STICKY_BOTTOM?G=a("#css-sticky-bottom-"+
|
113 |
+
c).text():n==AI_ALIGNMENT_STICKY&&(G=update_sticky_margins(a("#css-sticky-"+c).text(),t,w),e=!0);var P=a("#name-label-"+c).text(),X=get_editor_text(c),Da=a("input#process-php-"+c).is(":checked")?1:0,Ea=a("input#show-label-"+c).is(":checked")?1:0,Fa=a("#close-button-"+c+" option:selected").attr("value"),Ga=a("input#background-"+c).is(":checked")?1:0,Ha=a("input#body-background-"+c).is(":checked")?1:0,Ia=a("#bkg-image-url-"+c).val(),Ja=a("input#bkg-color-"+c).val(),Ka=a("select#bkg-size-"+c+" option:selected").attr("value"),
|
114 |
+
La=a("select#bkg-repeat-"+c+" option:selected").attr("value");if(e)e=screen.availTop,ma=screen.availLeft,na=screen.availWidth,oa=screen.availHeight;else{e=screen.height/2-410;var ma=100,na=820,oa=820}c={action:"ai_ajax_backend",preview:c,ai_check:ai_nonce,name:b64e(P),code:b64e(X),alignment:btoa(n),horizontal:btoa(r),vertical:btoa(q),horizontal_margin:btoa(t),vertical_margin:btoa(w),animation:btoa(B),alignment_css:btoa(G),custom_css:btoa(H),php:Da,label:Ea,close:Fa,background:Ga,body_background:Ha,
|
115 |
+
background_image:btoa(Ia),background_color:btoa(Ja),background_size:btoa(Ka),background_repeat:btoa(La),iframe:g};open_popup_window_post(ajaxurl,"width="+na+",height="+oa+",top="+e+",left="+ma+",resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","preview",c)});a("select#animation-"+b).change(function(){var c=a(this).attr("id").tabIndex(),e=a(this).find("option:selected").attr("value"),g=a(this).closest(".sticky-animation").find(".animation-parameters");e==AI_ANIMATION_NONE||
|
116 |
+
a("input#background-"+c).is(":checked")?g.hide():g.show()});a("#iframe-preview-button-"+b).button({}).show().click(function(){var c=a(this).attr("id");c=c.replace("iframe-preview-button-","");a("#preview-button-"+c).attr("iframe","1").click()});L("category",b);L("tag",b);L("taxonomy",b);L("id",b);Y("url",b);Y("url-parameter",b);Y("referer",b);L("client",b);Y("ip-address",b);L("country",b);L("city",b);var d=function(c){a("#ms-country-select-"+c).toggle();before_update_selection_from_list=null},f=function(c){a("#ms-city-select-"+
|
117 |
+
c).toggle();before_update_selection_from_list=null};a("#country-city-"+b).click(function(){var c=a(this).attr("id").tabIndex();a(this).find("span").toggle();a(this).next().find("span").toggle();var e=a("#country-button-"+c),g=a("#city-button-"+c),n=a("#ms-country-select-"+c);country_selection_container_visible=n.length&&n.is(":visible");c=a("#ms-city-select-"+c);city_selection_container_visible=c.length&&c.is(":visible");country_selection_container_visible&&(before_update_selection_from_list=d,g.click());
|
118 |
+
city_selection_container_visible&&(before_update_selection_from_list=f,e.click())});a("#tracking-"+b).checkboxButton().click(function(){var c=a(this).attr("id").replace("tracking-",""),e=a("select#block-alignment-"+c+" option:selected").attr("value");a("#tracking-"+c).next().find(".checkbox-icon").hasClass("on")||e!=AI_ALIGNMENT_NO_WRAPPING?a("#tracking-wrapping-warning-"+c).hide():a("#tracking-wrapping-warning-"+c).show()});a("#simple-editor-"+b).checkboxButton().click(function(){a(this).attr("id").replace("simple-editor-",
|
119 |
+
"")!=active_tab||a(this).hasClass("clicked")||(a(this).addClass("clicked"),a("#ai-tab-container .simple-editor-button").click(),a(this).removeClass("clicked"))});a("#simple-editor-"+b).is(":checked")&&(A(b,!0),a("#simple-editor-"+b).next("label").find(".checkbox-icon").addClass("on"));a("#process-php-"+b).checkboxButton();a("#disable-insertion-"+b).checkboxButton();a("#ai-misc-container-"+b).tabs();a("#ai-misc-tabs-"+b).show();a("#ai-devices-container-"+b).tabs();a("#ai-devices-tabs-"+b).show();a("#tools-button-"+
|
120 |
+
b).click(function(){a(this).find(".checkbox-icon").hasClass("on")||(a("label.rotation-button").each(function(){a(this).find(".checkbox-icon").hasClass("on")&&a(this).prev().click()}),a("label.code-generator-button").each(function(){a(this).find(".checkbox-icon").hasClass("on")&&a(this).prev().click()}),a("code-generator").hide());a(".ai-tools-toolbar").toggle();a("label.tools-button").find(".checkbox-icon").toggleClass("on")});a("#ai-code-generator-container-"+b).tabs();a("select#adsense-type-"+b).change(function(){var c=
|
121 |
+
a(this).attr("id").replace("adsense-type-","");N(c)});a("select#adsense-size-"+b).change(function(){var c=a(this).attr("id").replace("adsense-size-","");N(c)});a("select#amazon-amp-"+b).change(function(){var c=a(this).attr("id").replace("amazon-amp-","");console.log("block",c);v(c)});N(b);v(b);a("#code-generator-"+b).click(function(){var c=a(this).attr("id").replace("code-generator-","");a("#ai-code-generator-container-"+c).toggle();a(this).next("label").find(".checkbox-icon").toggleClass("on")});
|
122 |
+
a("#visual-editor-"+b).click(function(){var c=a(this).attr("id").replace("visual-editor-",""),e=b64e(get_editor_text(c)),g=a("input#process-php-"+c).is(":checked")?1:0;open_popup_window_post(ajaxurl,"width=820,height=870,top="+(screen.height/2-435)+",left=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","edit",{action:"ai_ajax_backend",edit:c,ai_check:ai_nonce,code:e,php:g})});a("#select-image-button-"+b).click(function(c){a(this).blur();var e=a(this).attr("id").replace("select-image-button-",
|
123 |
+
"");c.preventDefault();if(!g){var g=wp.media({title:ai_admin.select_banner_image,button:{text:ai_admin.use_this_image},multiple:!1});g.on("select",function(){var n=g.state().get("selection").first().toJSON();a("#banner-image-"+e).attr("src",n.url);a("#banner-image-url-"+e).val(n.url).trigger("input")})}g.open()});a("#select-placeholder-button-"+b).click(function(c){a(this).blur();c=a(this).attr("id").replace("select-placeholder-button-","");var e=a("#banner-image-"+c).attr("src");open_popup_window_post(ajaxurl,
|
124 |
+
"width=820,height=870,top="+(screen.height/2-435)+",left=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","preview",{action:"ai_ajax_backend",placeholder:e,block:c,ai_check:ai_nonce})});a("#banner-image-url-"+b).on("input",function(){var c=a(this).attr("id").replace("banner-image-url-",""),e=a("#banner-image-"+c),g=a(this).val();""==g&&(e.hide(),a("div#tab-banner-"+c+" table.ai-settings-table").css("position","relative"));e.attr("src",g).on("load",function(){e.show();
|
125 |
+
a("div#tab-banner-"+c+" table.ai-settings-table").css("position","inherit");a(this).closest(".ai-banner").removeClass("ai-banner-top");var n=this.naturalWidth;2<n/this.naturalHeight&&300<n&&a(this).closest(".ai-banner").addClass("ai-banner-top")}).on("error",function(){e.is(":visible")&&(e.hide().attr("src",""),a("div#tab-banner-"+c+" table.ai-settings-table").css("position","relative"))})});a("#banner-url-"+b).on("input",function(){var c=a(this).attr("id").replace("banner-url-","");""==a(this).val().trim()?
|
126 |
+
a("#banner-link-"+c).removeAttr("href"):a("#banner-link-"+c).attr("href",a(this).val())});a("#import-code-"+b).click(function(){a(this).next("label").find(".checkbox-icon").addClass("on");var c=a(this).attr("id").replace("import-code-","");a.post(ajaxurl,{action:"ai_ajax_backend",ai_check:ai_nonce,"import-code":b64e(get_editor_text(c))}).done(function(e){if(""!=e){a("#ai-error-container").hide();try{var g=JSON.parse(e)}catch(n){console.log("AI IMPORT CODE ERROR:",e),a("#ai-error-container").text(e).show()}if("undefined"!==
|
127 |
+
typeof g&&"undefined"!==typeof g.type)switch(debug&&console.log("AI IMPORT CODE:",g),e=g.type,a("#ai-code-generator-container-"+c).tabs({active:e==AI_CODE_UNKNOWN?AI_CODE_BANNER:e}),e){case AI_CODE_BANNER:a("#banner-image-url-"+c).val(g.image).trigger("input");a("#image-alt-text-"+c).val(g.alt);a("#lazy-load-image-"+c).prop("checked","lazy"==g.loading);a("#banner-url-"+c).val(g.link).trigger("input");a("#open-new-tab-"+c).prop("checked","_blank"==g.target);break;case AI_CODE_ADSENSE:a("#adsense-comment-"+
|
128 |
+
c).val(g["adsense-comment"]);a("#adsense-publisher-id-"+c).val(g["adsense-publisher-id"]);a("#adsense-ad-slot-id-"+c).val(g["adsense-ad-slot-id"]);a("#adsense-type-"+c).val(g["adsense-type"]);a("#adsense-size-"+c).val(g["adsense-size"]);e="";""!=g["adsense-width"]&&""!=g["adsense-height"]&&(e=g["adsense-width"]+"x"+g["adsense-height"]);a("#tab-adsense-"+c+" .adsense-ad-size.fixed").parent().find(".scombobox-display").val(e);a("#adsense-amp-"+c).val(g["adsense-amp"]);a("#adsense-amp-block-on-consent-"+
|
129 |
+
c).prop("checked","#"!=g["adsense-amp-block-on-consent"]);a("#adsense-layout-"+c).val(g["adsense-layout"]);a("#adsense-layout-key-"+c).val(decodeURIComponent(g["adsense-layout-key"]));"false"==decodeURIComponent(g["adsense-full-width-responsive"])?a("#adsense-layout-"+c+" select.adsense-full-width").val("disabled"):a("#adsense-layout-"+c+" select.adsense-full-width").val("enabled");a("#adsense-size-"+c).val()==AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT&&a("#tab-adsense-"+c+" tr.adsense-viewport").each(function(n){var r=
|
130 |
+
g["adsense-sizes"][n][0];n=g["adsense-sizes"][n][1];var q="";""!=r&&""!=n&&(q=r+"x"+n);a(this).find(".adsense-ad-size").parent().find(".scombobox-display").val(q)});N(c);break;case AI_CODE_AMAZON:a("#amazon-data-"+c).val(g["amazon-data"]),a("#amazon-amp-"+c).val(g["amazon-amp"]),a("#amazon-width-"+c).val(g["amazon-width"]),a("#amazon-height-"+c).val(g["amazon-height"]),a("#amazon-amp-block-on-consent-"+c).prop("checked","#"!=g["amazon-amp-block-on-consent"]),v(c)}}}).fail(function(e,g,n){console.log("AI IMPORT CODE ERROR:",
|
131 |
+
e.status,e.statusText);a("#ai-error-container").text(ai_admin.error+" "+e.status+": "+e.statusText).show()}).always(function(){a("#import-code-"+c).next("label").find(".checkbox-icon").removeClass("on")})});a("#generate-code-"+b).click(function(){a("#ai-error-container").hide();a(this).next("label").find(".checkbox-icon").addClass("on");var c=a(this).attr("id").replace("generate-code-",""),e=a("#ai-code-generator-container-"+c).tabs("option","active"),g={action:"ai_ajax_backend",ai_check:ai_nonce,
|
132 |
+
"generate-code":e};switch(e){case AI_CODE_BANNER:g.image=a("#banner-image-url-"+c).val();g.alt=a("#image-alt-text-"+c).val();a("#lazy-load-image-"+c).is(":checked")&&(g.loading="lazy");g.link=a("#banner-url-"+c).val();a("#open-new-tab-"+c).is(":checked")&&(g.target="_blank");break;case AI_CODE_ADSENSE:g.block=c;g["adsense-comment"]=a("#adsense-comment-"+c).val();g["adsense-publisher-id"]=a("#adsense-publisher-id-"+c).val();g["adsense-ad-slot-id"]=a("#adsense-ad-slot-id-"+c).val();g["adsense-type"]=
|
133 |
+
parseInt(a("select#adsense-type-"+c+" option:selected").attr("value"));g["adsense-size"]=parseInt(a("select#adsense-size-"+c+" option:selected").attr("value"));var n=a("#tab-adsense-"+c+" .adsense-ad-size.fixed").parent().find(".scombobox-display").val().trim().toLowerCase().split("x");g["adsense-width"]="";g["adsense-height"]="";2==n.length&&(g["adsense-width"]=parseInt(n[0]),g["adsense-height"]=parseInt(n[1]));g["adsense-amp"]=parseInt(a("select#adsense-amp-"+c+" option:selected").attr("value"));
|
134 |
+
g["adsense-amp-block-on-consent"]=a("#adsense-amp-block-on-consent-"+c).is(":checked")?"":"#";g["adsense-layout"]=a("#adsense-layout-"+c).val();g["adsense-layout-key"]=a("#adsense-layout-key-"+c).val();g["adsense-full-width-responsive"]="true";"disabled"==a("#adsense-layout-"+c+" select.adsense-full-width").val()&&(g["adsense-full-width-responsive"]="false");if(g["adsense-size"]==AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT){var r=[];a("#tab-adsense-"+c+" tr.adsense-viewport").each(function(q){q=a(this).find(".adsense-ad-size").parent().find(".scombobox-display").val().trim().toLowerCase().split("x");
|
135 |
+
var t={width:"",height:""};2==q.length&&(t={width:parseInt(q[0]),height:parseInt(q[1])});r.push(t)});g["adsense-viewports"]=r}break;case AI_CODE_AMAZON:g["amazon-data"]=a("#amazon-data-"+c).val(),g["amazon-amp"]=a("select#amazon-amp-"+c+" option:selected").attr("value"),g["amazon-width"]=a("#amazon-width-"+c).val(),g["amazon-height"]=a("#amazon-height-"+c).val(),g["amazon-amp-block-on-consent"]=a("#amazon-amp-block-on-consent-"+c).is(":checked")?"":"#"}debug&&(console.log("AI GENERATE CODE:",e),console.log(g));
|
136 |
+
a.post(ajaxurl,g).done(function(q){""!=q&&(q=JSON.parse(q),"undefined"!==typeof q&&set_editor_text(c,q))}).fail(function(q,t,w){console.log("AI GENERATE CODE ERROR:",q.status,q.statusText);a("#ai-error-container").text(ai_admin.error+" "+q.status+": "+q.statusText).show()}).always(function(){a("#generate-code-"+c).next("label").find(".checkbox-icon").removeClass("on")})});a("#clear-block-"+b).click(function(){S(!0,!0,!0,!0)});a("#copy-block-"+b).click(function(){Ma()});a("#paste-name-"+b).click(function(){S(!0,
|
137 |
+
!1,!1,!1)});a("#paste-code-"+b).click(function(){S(!1,!0,!1,!1)});a("#paste-settings-"+b).click(function(){S(!1,!1,!0,!1)});a("#paste-block-"+b).click(function(){S(!0,!0,!0,!1)});a("#rotation-"+b).click(function(){var c=a(this).attr("id").replace("rotation-",""),e=a("#ai-rotation-container-"+c);a(this).next("label").find(".checkbox-icon").toggleClass("on");e.toggle();var g=e.tabs(),n=g.find("ul");e.is(":visible")?(e.data("code",b64e(get_editor_text(c))),e.data("option",1),ea(c,1),g.tabs("option",
|
138 |
+
"active",0),a("input[name=ai_save]").css("color","#f00"),setTimeout(function(){Na(c)},5)):(Oa(c),n.find("li").remove(),g.find("div.rounded").remove())});a("#add-option-"+b).click(function(){var c=a(this).attr("id").replace("add-option-","");ea(c,1);a("#ai-rotation-container-"+c).find("ul").find("li").slice(-1).click()});a("#remove-option-"+b).click(function(){var c=a(this).attr("id").replace("remove-option-","");Pa(c,a("#ai-rotation-container-"+c).tabs("option","active"))});a("#rotation-groups-"+
|
139 |
+
b).click(function(){var c=a(this).attr("id").tabIndex(),e=a(this).next().find("span");e.toggleClass("on");c=a("#ai-rotation-container-"+c);e.hasClass("on")?(c.find("span.group-name-label").show(),c.find("span.option-name-label").hide(),c.find("td.option-parameters").hide()):(c.find("span.group-name-label").hide(),c.find("span.option-name-label").show(),c.find("td.option-parameters").show())});a("#tab-"+b+" .adsense-list").click(function(){a(this).blur();ca()});a("select#html-element-insertion-"+b).change(function(){a("select#html-element-insertion-"+
|
140 |
+
b+" option:selected").attr("value")==AI_HTML_INSERTION_SEREVR_SIDE?a("#server-side-insertion-"+b).hide():a("#server-side-insertion-"+b).show()});a("#tab-"+b+" .adsense-ad-size").scombobox({showDropDown:!1,invalidAsValue:!0,animation:{duration:50}});a("select#close-button-"+b).change(function(){var c=a(this).attr("id").replace("close-button-","");a("select#close-button-sticky-"+c).val(a("select#close-button-"+c+" option:selected").attr("value"))});a("select#close-button-sticky-"+b).change(function(){var c=
|
141 |
+
a(this).attr("id").replace("close-button-sticky-","");a("select#close-button-"+c).val(a("select#close-button-sticky-"+c+" option:selected").attr("value"))});a("input#filter-numbers-insertions-"+b).on("keyup",function(){var c=a(this).attr("id").tabIndex();a("input#filter-numbers-"+c).val(a(this).val());a("select#filter-type-"+c).val(0);a("input#invert-filter-"+c).removeAttr("checked")});a("input#filter-numbers-"+b).on("keyup",function(){var c=a(this).attr("id").tabIndex();a("input#filter-numbers-insertions-"+
|
142 |
+
c).val(a(this).val())});a("#html-elements-button-"+b).click(function(){var c=a(this).attr("id").replace("html-elements-button-",""),e=a("input#html-elements-"+c).val(),g=a("#ai-settings").data("home-relative-url");open_popup_window_post(g,"width="+(screen.availWidth-15)+",height="+(screen.availHeight-65)+",top="+screen.availTop+",left="+screen.availLeft+",resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","ai-selector",{html_element_selection:c,selector:e,input:"input#html-elements-"+
|
143 |
+
c})});a("#wait-for-button-"+b).click(function(){var c=a(this).attr("id").replace("wait-for-button-",""),e=a("input#wait-for-"+c).val(),g=a("#ai-settings").data("home-relative-url");open_popup_window_post(g,"width="+(screen.availWidth-15)+",height="+(screen.availHeight-65)+",top="+screen.availTop+",left="+screen.availLeft+",resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","ai-selector",{html_element_selection:c,selector:e,input:"input#wait-for-"+c})});a("#select-bkg-image-button-"+
|
144 |
+
b).click(function(c){a(this).blur();var e=a(this).attr("id").replace("select-bkg-image-button-","");c.preventDefault();if(!g){var g=wp.media({title:ai_admin.select_background_image,button:{text:ai_admin.use_this_image},multiple:!1});g.on("select",function(){var n=g.state().get("selection").first().toJSON();a("#bkg-image-"+e).attr("src",n.url);a("#bkg-image-url-"+e).val(n.url).trigger("input")})}g.open()});a("#bkg-image-url-"+b).on("input",function(){var c=a(this).attr("id").replace("bkg-image-url-",
|
145 |
+
""),e=a("#bkg-image-"+c),g=a(this).val();""==g&&(e.hide(),a("div#sticky-background-"+c+" table.ai-settings-table").css("position","relative"));M(c);e.attr("src",g).on("load",function(){e.show();a("div#sticky-background-"+c+" table.ai-settings-table").css("position","inherit");a(this).closest(".ai-banner").removeClass("ai-banner-top");var n=this.naturalWidth;2<n/this.naturalHeight&&300<n&&a(this).closest(".ai-banner").addClass("ai-banner-top")}).on("error",function(){e.is(":visible")&&(e.hide().attr("src",
|
146 |
+
""),a("div#sticky-background-"+c+" table.ai-settings-table").css("position","relative"))})})}function M(b){var d=a("select#horizontal-position-"+b+" option:selected").attr("value"),f=a("select#horizontal-position-"+b+" option:selected"),c=a("select#vertical-position-"+b+" option:selected").attr("value"),e=a("select#vertical-position-"+b+" option:selected"),g=a("input#background-"+b).is(":checked"),n=d==AI_STICK_HORIZONTAL_CENTER&&a("input#body-background-"+b).is(":checked");g?a("#sticky-position-"+
|
147 |
+
b).addClass("ai-background"):a("#sticky-position-"+b).removeClass("ai-background");var r=e.data("css-bkg");g&&"undefined"!=typeof r?e=n?a("select#vertical-position-"+b).data("css-body-bkg"):r:(r=e.data("css-"+d),e="undefined"!=typeof r?r:e.data("css"));n=f.data("css-bkg");g&&"undefined"!=typeof n?f=n:(n=f.data("css-"+c),f="undefined"!=typeof n?n:f.data("css"));c="";if(d==AI_STICK_HORIZONTAL_CENTER&&g){d=a("input#bkg-color-"+b).val().trim();""!=d&&(c=c+" background-color: "+d+";");d=a("input#bkg-image-url-"+
|
148 |
+
b).val().trim();""!=d&&(c=c+" background-image: url("+d+");");d=parseInt(a("select#bkg-size-"+b+" option:selected").attr("value"));if(d!=AI_BACKGROUND_SIZE_DEFAULT)switch(d){case AI_BACKGROUND_SIZE_COVER:c+=" background-size: cover;";break;case AI_BACKGROUND_SIZE_CONTAIN:c+=" background-size: contain;";break;case AI_BACKGROUND_SIZE_FILL:c+=" background-size: 100% 100%;"}d=parseInt(a("select#bkg-repeat-"+b+" option:selected").attr("value"));if(d!=AI_BACKGROUND_REPEAT_DEFAULT)switch(d){case AI_BACKGROUND_REPEAT_NO:c+=
|
149 |
+
" background-repeat: no-repeat;";break;case AI_BACKGROUND_REPEAT_YES:c+=" background-repeat: repeat;";break;case AI_BACKGROUND_REPEAT_HORIZONTALY:c+=" background-repeat: repeat-x;";break;case AI_BACKGROUND_REPEAT_VERTICALLY:c+=" background-repeat: repeat-y;";break;case AI_BACKGROUND_REPEAT_SPACE:c+=" background-repeat: space;";break;case AI_BACKGROUND_REPEAT_ROUND:c+=" background-repeat: round;"}}a("#css-sticky-"+b+" .ai-sticky-css").text(e+f+c);W(b)}function W(b){a("#sticky-scroll-warning-"+b).hide();
|
150 |
+
var d=a("select#insertion-type-"+b+" option:selected").attr("value"),f=a("select#block-alignment-"+b+" option:selected").attr("value"),c=a("select#vertical-position-"+b+" option:selected").attr("value"),e=a("input#background-"+b).is(":checked")?1:0,g=a("input#body-background-"+b).is(":checked")?1:0;f!=AI_ALIGNMENT_STICKY||c!=AI_SCROLL_WITH_THE_CONTENT||d==AI_ABOVE_HEADER||d==AI_DISABLED||e&&g||a("#sticky-scroll-warning-"+b).show()}function aa(b){var d=a("#icons-css-code-"+b);if(!d.hasClass("configured")){var f=
|
151 |
+
[];a("select#insertion-type-"+b).imagepicker({hide_select:!1}).find("option").each(function(c){f.push(a(this).data("title"))});a("select#insertion-type-"+b+" + ul").appendTo("#automatic-insertion-"+b).css("padding-top","10px").find("li").each(function(c){a(this).attr("title",f[c]).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})});f=[];a("select#block-alignment-"+b).imagepicker({hide_select:!1}).find("option").each(function(c){f.push(a(this).data("title"))});a("select#block-alignment-"+
|
152 |
+
b+" + ul").appendTo("#alignment-style-"+b).css("padding-top","10px").find("li").each(function(c){a(this).attr("title",f[c]).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})});f=[];a("select#horizontal-position-"+b).imagepicker({hide_select:!1}).find("option").each(function(c){f.push(a(this).data("title"))});a("select#horizontal-position-"+b+" + ul").appendTo("#horizontal-positions-"+b).css("padding-top","10px").find("li").each(function(c){a(this).attr("title",f[c]).tooltip({track:!0,
|
153 |
+
delay:700,showURL:!1,showBody:" | ",fade:250})});f=[];a("select#vertical-position-"+b).imagepicker({hide_select:!1}).find("option").each(function(c){f.push(a(this).data("title"))});a("select#vertical-position-"+b+" + ul").appendTo("#vertical-positions-"+b).css("padding-top","10px").find("li").each(function(c){a(this).attr("title",f[c]).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})});d.addClass("configured")}}function Na(b){a("#rotation-"+b).next("label").find(".checkbox-icon").addClass("active");
|
154 |
+
a.post(ajaxurl,{action:"ai_ajax_backend",ai_check:ai_nonce,"import-rotation-code":b64e(get_editor_text(b))}).done(function(d){if(""!=d){var f=JSON.parse(d);if("undefined"!==typeof f&&"undefined"!==typeof f.options){a("#ai-error-container").hide();var c=f.options.length;debug&&(console.log("AI IMPORT ROTATION CODE:",c),console.log(" OPTIONS:",f.options));d=a("#ai-rotation-container-"+b);d.find("ul").find("li").remove();d.find("div.rounded").remove();var e=c;1>e&&(e=1);17<e&&(e=17);ea(b,e);d.find("ul li").each(function(g){g<
|
155 |
+
c?a(this).data("code",b64e(f.options[g].code)):a(this).data("code",b64e(""))});d.tabs("option","active",0);set_editor_text(b,f.options[0].code);d.find("input.option-name").each(function(g){g<c&&a(this).val(f.options[g].name)});d.find("input.option-share").each(function(g){g<c&&a(this).val(f.options[g].share)});d.find("input.option-time").each(function(g){g<c&&a(this).val(f.options[g].time)});d.find("input.option-scheduling").each(function(g){g<c&&a(this).val(f.options[g].scheduling)});d=a("#rotation-groups-"+
|
156 |
+
b).next().find("span");f.options[0].groups?d.removeClass("on"):d.addClass("on");a("#rotation-groups-"+b).click()}}}).fail(function(d,f,c){console.log("AI IMPORT ROTATION CODE ERROR:",d.status,d.statusText);a("#ai-error-container").text(ai_admin.error+" "+d.status+": "+d.statusText).show();d=a("#ai-rotation-container-"+b);set_editor_text(b,b64d(d.data("code")));d.hide();a("#rotation-"+b).next("label").find(".checkbox-icon").removeClass("on");d.find("ul").find("li").remove();d.find("div.rounded").remove()}).always(function(){a("#rotation-"+
|
157 |
+
b).next("label").find(".checkbox-icon").removeClass("active")})}function Oa(b){a("#rotation-"+b).next("label").find(".checkbox-icon").addClass("active");var d=a("#ai-rotation-container-"+b),f=d.tabs("option","active")+1;a("#option-"+b+"-"+f).data("code",b64e(get_editor_text(b)));var c=[];d.find("div.rounded").each(function(e){e=a("#option-"+b+"-"+(e+1)).data("code");e="undefined"==typeof e?"":b64d(e);var g=a("#rotation-groups-"+b).next().find("span").hasClass("on");e={name:a(this).find("input.option-name").val(),
|
158 |
+
share:a(this).find("input.option-share").val(),scheduling:a(this).find("input.option-scheduling").val(),time:a(this).find("input.option-time").val(),code:e,groups:g};c.push(e)});debug&&console.log("ROTATION DATA:",c);a.post(ajaxurl,{action:"ai_ajax_backend",ai_check:ai_nonce,"generate-rotation-code":b64e(JSON.stringify(c))}).done(function(e){a("#ai-error-container").hide();""!=e&&(e=JSON.parse(e),"undefined"!==typeof e&&(debug&&console.log("ROTATION CODE:",e),set_editor_text(b,e)))}).fail(function(e,
|
159 |
+
g,n){console.log("AI GENERATE ROTATION CODE ERROR:",e.status,e.statusText);a("#ai-error-container").text(ai_admin.error+" "+e.status+": "+e.statusText).show();e=a("#ai-rotation-container-"+b);set_editor_text(b,b64d(e.data("code")));e.hide();a("#rotation-"+b).next("label").find(".checkbox-icon").removeClass("on");e.find("ul").find("li").remove();e.find("div.rounded").remove()}).always(function(){a("#rotation-"+b).next("label").find(".checkbox-icon").removeClass("active");a("input[name=ai_save]").css("color",
|
160 |
+
"#555")})}function ea(b,d){var f=a("#ai-rotation-container-"+b),c=f.find("ul"),e=f.find("ul >li").length,g=a("#rotation-tabs"),n=g.find("li");g=g.find("div.rounded");for(option=e+1;option<=e+d&&!(17<option);option++){var r=n.clone().show();r.find("a").attr("href","#tab-option-"+b+"-"+option).text(String.fromCharCode(64+option));r.attr("id","option-"+b+"-"+option).appendTo(c).data("code",b64e(""));r.click(function(){var q=a(this).closest(".ai-rotate"),t=q.attr("id").replace("ai-rotation-container-",
|
161 |
+
""),w=q.data("option"),B=a(this).attr("id").replace("option-"+t+"-","");q.data("option",B);debug&&console.log("OPTION CHANGE:",w,"=>",B);a("#option-"+t+"-"+w).data("code",b64e(get_editor_text(t)));set_editor_text(t,b64d(a(this).data("code")))});g.clone().show().attr("id","tab-option-"+b+"-"+option).appendTo(f);f.tabs("refresh")}f.find("[data-title]").each(function(){a(this).attr("title",a(this).data("title"))});f.find("[title]").tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});f.tabs("option",
|
162 |
+
"active",option-2)}function Pa(b,d){var f=a("#ai-rotation-container-"+b);if(1!=f.find("ul >li").length){var c=f.find("ul");c.find("li").slice(d,d+1).remove();f.find("div.rounded").slice(d,d+1).remove();f.find("ul li").each(function(e){e+=1;a(this).attr("id","option-"+b+"-"+e).find("a").attr("href","#tab-option-"+b+"-"+e).text(String.fromCharCode(64+e))});f.find("div.rounded").each(function(e){e+=1;a(this).attr("id","tab-option-"+b+"-"+e)});f.tabs("refresh");f=0==d?0:d-1;active_li=a("#option-"+b+"-"+
|
163 |
+
(f+1));set_editor_text(b,b64d(active_li.data("code")));c.closest(".ai-rotate").data("option",f+1)}}function L(b,d){var f=a("#"+b+"-select-"+d);if(0!==f.length){var c=function(n,r){"function"==typeof before_update_selection_from_list&&before_update_selection_from_list(d);e.find("span.ui-button-text").addClass("ai-button-updating");setTimeout(function(){Qa(n,r)},5)},e=a("#"+b+"-button-"+d),g=e.data("list");null==g&&(g=b);e.click(function(){if(f.hasClass("multi-select"))c(a("#"+g+"-list-"+d),b),a("#ms-"+
|
164 |
+
b+"-select-"+d).toggle();else if(0==f.find("option").length){var n=a("#ms-"+b+"-select-"+d).find(".filter-input");n=n.length?n.val():"";var r=f.data("parameters");r="undefined"==typeof r?"":r;a("#ai-loading").show();e.find("span.ui-button-text").addClass("ai-button-active").show();a.get(ajaxurl+"?action=ai_ajax_backend&list-options="+b+"¶meters="+r+"&filter="+n+"&ai_check="+ai_nonce,function(q){if(""!=q){var t="";q=a("option","<div>"+q+"</div>");0!=q.length&&0==a(q[0]).attr("value").length&&(t=
|
165 |
+
a(q[0]).text(),q=q.splice(1));f.attr("data-message",t);f.html(q);pa(f,b,g,d);a("#ms-"+b+"-select-"+d).find(".filter-message").text(t);c(a("#"+g+"-list-"+d),b)}}).fail(function(q,t,w){a("input.filter-input",selection_container).remove();console.log("Error loading "+b+" options: "+q.status+" "+q.statusText)}).always(function(){a("#ai-loading").hide();e.find("span.ui-button-text").removeClass("ai-button-active")})}else pa(f,b,g,d)});a("#"+g+"-list-"+d).focusout(function(){var n=a("#ms-"+b+"-select-"+
|
166 |
+
d);n.length&&n.is(":visible")&&c(a(this),b)})}}function qa(b,d,f){var c=b.$element,e=c.val();null!=e&&(""==e[0]&&(e=e.splice(1)),e=e.join(", ").trim(","));d=c.attr("id").replace(d+"-select-","");f=a("#"+f+"-list-"+d);d=f.attr("data-custom");"undefined"!=typeof d&&""!=d&&(null!=e?(""!=e&&(e+=", "),e+=d):e=d);f.attr("value",e);b.qs1.cache()}function Qa(b,d){Array.prototype.diff=function(t){return this.filter(function(w){return-1===t.indexOf(w)})};var f=b.attr("id").replace(/^\D+/g,""),c=a("#"+d+"-select-"+
|
167 |
+
f);if(a("#ms-"+d+"-select-"+f).is(":visible")){var e=b.attr("value").split(",").map(Function.prototype.call,String.prototype.trim);""==e[0]&&(e=e.splice(1));if(b.hasClass("ai-list-filter"))for(var g=0;g<e.length;g++)e[g]=e[g].replace(/ /g,"-").replace(/[!@#\$%\^&\*\(\)=\+\{\}\|\[\]\\;':"\.\/\?]/g,"");if(b.hasClass("ai-list-filter-cat"))for(g=0;g<e.length;g++)e[g]=e[g].replace(/ /g,"-").replace(/[!@#\$%\^&\(\)=\{\}\|\[\]\\;':"\.\/\?]/g,"");b.hasClass("ai-list-uppercase")?e=e.map(Function.prototype.call,
|
168 |
+
String.prototype.toUpperCase):b.hasClass("ai-list-lowercase")?e=e.map(Function.prototype.call,String.prototype.toLowerCase):b.hasClass("ai-list-country-case")&&(e=e.map(function(t){t=t.split(":");null!=t[0]&&(t[0]=t[0].toUpperCase());null!=t[1]&&(t[1]=t[1].toUpperCase());null!=t[2]&&(t[2]=t[2].toLowerCase());return t.join(":")}));a("#"+d+"-select-"+f).multiSelect("refresh").multiSelect("deselect_all").multiSelect("select",e);if(b.hasClass("ai-list-custom")){g=e;var n=a("#"+d+"-select-"+f).val();null!=
|
169 |
+
n&&(g=e.diff(n));null!=g&&(g=g.join(", "));b.attr("data-custom",g);c.multiSelect("deselect_all").multiSelect("select",e)}if(c.hasClass("ai-list-filter")){e=a("#ms-"+d+"-select-"+f).find(".ai-list-filter-container");var r=e.find(".filter-input"),q=e.find(".filter-button");e.hasClass("configured")||(e.addClass("configured"),r.on("keyup keypress",function(t){if(13===(t.keyCode||t.which))return t.preventDefault(),q.click(),!1}),q.on("click",function(t){t.preventDefault();t=r.val();c.attr("data-filter",
|
170 |
+
t);c.empty();c.removeClass("multi-select");a("#"+d+"-button-"+f).click();return!1}));e.show();a("#ms-"+d+"-select-"+f).find(".search-input").hide();q.button().show();r.val(c.attr("data-filter"));a("#ms-"+d+"-select-"+f).find(".filter-message").text(c.attr("data-message"))}}a("#"+d+"-button-"+f).find("span.ui-button-text").removeClass("ai-button-updating")}function pa(b,d,f,c){b.addClass("multi-select");b.multiSelect({selectableHeader:'<div class="ai-list-filter-container"><input type="text" class="filter-input" autocomplete="off" placeholder="'+
|
171 |
+
ai_admin.filter+'" title="'+ai_admin.filter_title+'"><button class="filter-button" style="margin-top: -2px; display: none;">'+ai_admin.button_filter+'</button><span class="filter-message"></span></div><input type="text" class="search-input" autocomplete="off" placeholder="'+ai_admin.search+'">',selectionHeader:"",afterInit:function(e){var g=this;e=g.$selectableUl.prev();g.$selectionUl.prev();var n="#"+g.$container.attr("id")+" .ms-elem-selectable:not(.ms-selected)";g.$container.attr("id");g.qs1=e.quicksearch(n).on("keydown",
|
172 |
+
function(r){if(40===r.which)return g.$selectableUl.focus(),!1})},afterSelect:function(e){qa(this,d,f)},afterDeselect:function(e){qa(this,d,f)}})}function Y(b,d){var f=a("#"+b+"-editor-"+d),c=a("#"+b+"-list-"+d);0!==f.length&&(a("#"+b+"-button-"+d).click(function(){ra(c,b,!0)}),f.focusout(function(){sa(f,b)}),c.focusout(function(){f.is(":visible")&&ra(a(this),b,!1)}))}function ta(b,d){var f=b.hasClass("ai-clean-protocol"),c=b.hasClass("ai-clean-domain"),e=b.hasClass("ai-only-domain"),g=b.hasClass("ai-list-sort");
|
173 |
+
d=d.filter(function(w,B,H){return H.indexOf(w)===B});for(var n=[],r=0;r<d.length;r++){var q=d[r];if(f&&0==q.indexOf("http")){q=q.replace("http://","");q=q.replace("https://","");var t=q.indexOf("/");c?q=0<t?q.substring(t):"":e&&0<t&&(q=q.substring(0,t))}""!=q&&n.push(q)}g&&n.sort();return n}function ra(b,d,f){var c=b.attr("id").replace(d+"-list-","");c=a("#"+d+"-editor-"+c);f&&c.toggle();c.is(":visible")?(d=b.attr("value"),f=",",b.hasClass("ai-list-space")&&-1<d.indexOf(" ")&&-1==d.indexOf(",")&&
|
174 |
+
(f=" "),d=d.split(f).map(Function.prototype.call,String.prototype.trim),clean_list_items=ta(b,d),c.val(clean_list_items.join("\n"))):sa(c,d)}function sa(b,d){var f=b.val().split("\n").map(Function.prototype.call,String.prototype.trim),c=b.attr("id").replace(d+"-editor-","");c=a("#"+d+"-list-"+c);clean_list_items=ta(c,f);c.attr("value",clean_list_items.join(", "))}function fa(){debug&&console.log("");if(debug){var b=(new Date).getTime();console.log("since last time: "+((b-ha)/1E3).toFixed(3))}debug&&
|
175 |
+
console.log("configure_hidden_tab");debug&&console.log("tabs_to_configure: "+tabs_to_configure);do{if(0==tabs_to_configure.length){save_enabled=!0;debug_title&&a("#plugin_name").css("color","#000");debug&&console.log("configure_hidden_tab: DONE");return}var d=tabs_to_configure.pop();var f=a("#tab-"+d)}while(f.hasClass("configured"));debug&&console.log("Configuring tab: "+d);0!=d?da(d):ja();debug&&(d=(new Date).getTime(),console.log("time: "+((d-b)/1E3).toFixed(3)),console.log("TIME: "+((d-Z)/1E3).toFixed(3)),
|
176 |
+
ha=d);0!=tabs_to_configure.length?0!=ai_tab_setup_delay&&setTimeout(fa,ai_tab_setup_delay):(save_enabled=!0,debug_title&&0!=ai_tab_setup_delay&&a("#plugin_name").css("color","#000"),debug&&console.log("configure_hidden_tab: DONE"))}function Ra(b){if(a(b).hasClass("not-configured")){var d=a(b).data("template");if("undefined"!=typeof d){var f=[],c=a(b).data("colors");if("undefined"!=typeof c){var e=a.elycharts.templates["ai-pie"].defaultSeries.values;c.forEach(function(q){128==q?f.push(e[9]):f.push(e[q])})}c=
|
177 |
+
a(b).data("values-1");null==c&&(c=a(b).data("values-2"));null==c&&(c=a(b).data("values-3"));null==c&&(c=a(b).data("values-4"));null==c&&(c=a(b).data("values-5"));null==c&&(c=a(b).data("values-6"));null==c&&(c=a(b).data("values-7"));null==c&&(c=a(b).data("values-8"));null==c&&(c=a(b).data("values-9"));var g=a(b).data("legend");if("undefined"!=typeof g&&"undefined"!=typeof g.serie129){var n={},r;for(r in g)"serie129"==r?n.serie10=g[r]:n[r]=g[r];g=n}a(b).chart({template:d,labels:a(b).data("labels"),
|
178 |
+
values:{serie1:c,serie2:a(b).data("values-2"),serie3:a(b).data("values-3"),serie4:a(b).data("values-4"),serie5:a(b).data("values-5"),serie6:a(b).data("values-6"),serie7:a(b).data("values-7"),serie8:a(b).data("values-8"),serie9:a(b).data("values-9"),serie10:a(b).data("values-129")},legend:g,tooltips:{serie1:a(b).data("tooltips")},defaultSeries:{values:f,tooltip:{height:a(b).data("tooltip-height")}},defaultAxis:{max:a(b).data("max")},features:{grid:{draw:null==c?!0:50>c.length}}});a(b).removeClass("not-configured");
|
179 |
+
a(b).parent().find("div.ai-chart-label").show()}}}function ua(b){a("#ai-rating-bar");a("#rating-value span").load(ajaxurl+"?action=ai_ajax_backend&rating="+b+"&ai_check="+ai_nonce,function(){var d=a("#rating-value span").text(),f=0;""!=d&&(f=parseFloat(d));a("#rating-value").css("width",20*f+"%");""==a("#rating-value span").text()&&(a("#ai-rating-bar").hide(),a("#ai-stars").show())})}function ba(b){a(b).find(".ai-chart.not-configured").each(function(){a(this).hasClass("hidden")||(a(this).attr("style",
|
180 |
+
""),Ra(this))})}function I(b,d,f,c){var e=b.attr(d);e.substr(-f.toString().length)==f&&b.attr(d,e.substr(0,e.length-f.toString().length)+c)}function Ma(){debug&&console.log("AI COPY FROM BLOCK",active_tab);var b=a("#ai-clipboard");b.html(a("#ai-clipboard-template").html());a("div#tab-"+active_tab+" input[name]:checkbox").each(function(d){var f=a(this).attr("checked");"undefined"!==typeof f&&!1!==f?b.find("input[name]:checkbox").eq(d).attr("checked","checked").next("label").find(".checkbox-icon").addClass("on"):
|
181 |
+
b.find("input[name]:checkbox").eq(d).removeAttr("checked").next("label").find(".checkbox-icon").removeClass("on")});a("div#tab-"+active_tab+" input[name]:radio").each(function(d){var f=a(this).attr("checked");"undefined"!==typeof f&&!1!==f?b.find("input[name]:radio").eq(d).attr("checked","checked"):b.find("input[name]:radio").eq(d).removeAttr("checked")});a("div#tab-"+active_tab+" select[name]").each(function(d){var f=a(this).find("option:selected").val();b.find("select[name]").eq(d).find("option").removeAttr("selected");
|
182 |
+
b.find("select[name]").eq(d).find("option[value = '"+f+"']").attr("selected",!0)});a("div#tab-"+active_tab+" input[name]:text").each(function(d){b.find("input[name]:text").eq(d).attr("value",a(this).val())});a("#list-settings-"+active_tab).is(":visible")?b.find("#list-settings-999").show():b.find("#list-settings-999").hide();a("#list-settings-"+active_tab).hasClass("ai-expanded")?b.find("#list-settings-999").addClass("ai-expanded"):b.find("#list-settings-999").removeClass("ai-expanded");a("div#tab-"+
|
183 |
+
active_tab+" table.ai-lists tr").each(function(d){a(this).is(":visible")?b.find("table.ai-lists tr").eq(d).show():b.find("table.ai-lists tr").eq(d).hide();a(this).find("span.checkbox-list-button").hasClass("dashicons-no")?b.find("table.ai-lists tr").eq(d).find("span.checkbox-list-button").addClass("dashicons-no").removeClass("dashicons-yes"):b.find("table.ai-lists tr").eq(d).find("span.checkbox-list-button").removeClass("dashicons-no").addClass("dashicons-yes");a(this).hasClass("list-items")?b.find("table.ai-lists tr").eq(d).addClass("list-items"):
|
184 |
+
b.find("table.ai-lists tr").eq(d).removeClass("list-items")});b.find("textarea.simple-editor").text(get_editor_text(active_tab));a("#ai-container .ai-copy").each(function(){a(this).next("label").find(".checkbox-icon").addClass("on")})}function Sa(b,d){debug&&console.log("AI LOAD BLOCK",b,"FROM DB");var f=a("#tools-button-"+active_tab);f.next("label").find(".checkbox-icon").hasClass("on")||f.click();a("#ai-loading").show();a.get(ajaxurl+"?action=ai_ajax_backend&settings="+b+"&single=1&ai_check="+ai_nonce,
|
185 |
+
function(c){debug&&console.log("AI BLOCK LOADED");var e=a("#ai-clipboard");e.html(a("div#tab-"+b,c).html());e.find("[id]").each(function(){I(a(this),"id",b,999)});e.find("[for]").each(function(){I(a(this),"for",b,999)});e.find("[href]").each(function(){I(a(this),"href",b,999)});e.find("[name]").each(function(){I(a(this),"name",b,999)});e.find("[class]").each(function(){I(a(this),"class",b,999)});e.find("pre.ai-block-number").each(function(){var g=a(this).text().replace(b,999);a(this).text(g)});a("#ai-container .ai-copy").each(function(){a(this).next("label").find(".checkbox-icon").addClass("on")})}).fail(function(c,
|
186 |
+
e,g){console.log("AI LOADING ERROR:",c.status,c.statusText);a("#ai-error-container").text(ai_admin.error+" "+c.status+": "+c.statusText).show()}).always(function(){a("#ai-loading").hide()})}function S(b,d,f,c){if(c){c=a("#ai-clipboard-template");c.find("input#name-edit-999").attr("value","Block "+active_tab).attr("default","Block "+active_tab);var e=c.html()}else e=a("#ai-clipboard").html();if(""!=e&&0!=active_tab){debug&&console.log("AI PASTE TO BLOCK",active_tab);c=a("div#tab-"+active_tab);var g=
|
187 |
+
c.find("input#name-edit-"+active_tab).val(),n=get_editor_text(active_tab);if(f){f=a("#simple-editor-"+active_tab).is(":checked");var r=a("#ai-tools-toolbar-"+active_tab).is(":visible"),q=c.find(".ai-copy").next("label").find(".checkbox-icon").hasClass("on");f&&a("#simple-editor-"+active_tab).click();var t=c.find("input[name=ai_save]").attr("value"),w=c.find("#exceptions-button-container-"+active_tab).html(),B=c.find("#block-exceptions-"+active_tab).html();c.html(e).find("input[name=ai_save]").attr("value",
|
188 |
+
t);b||c.find("input#name-edit-999").val(g);d||c.find("textarea#block-999").val(n);c.find("span#name-label-999").text(c.find("input#name-edit-999").val());d=c.find("input#name-edit-999").val();c.find("pre.ai-block-name").text('[adinserter name="'+d+'"]');c.find("[id]").each(function(){I(a(this),"id",999,active_tab)});c.find("[for]").each(function(){I(a(this),"for",999,active_tab)});c.find("[href]").each(function(){I(a(this),"href",999,active_tab)});c.find("[name]").each(function(){I(a(this),"name",
|
189 |
+
999,active_tab)});c.find("[class]").each(function(){I(a(this),"class",999,active_tab)});c.find("pre.ai-sidebars").text("");c.find("pre.ai-block-number").each(function(){var H=a(this).text().replace(999,active_tab);a(this).text(H)});c.find("#exceptions-button-container-"+active_tab).html(w);c.find("#block-exceptions-"+active_tab).html(B);da(active_tab);f&&a("#simple-editor-"+active_tab).click();r&&(a("#ai-tools-toolbar-"+active_tab).show(),a("#tools-button-"+active_tab).next("label").find(".checkbox-icon").addClass("on"));
|
190 |
+
q&&c.find(".ai-copy").next("label").find(".checkbox-icon").addClass("on")}else b&&(b=a(e).find("input#name-edit-999").val(),c.find("input#name-edit-"+active_tab).val(b),c.find("span#name-label-"+active_tab).text(b),c.find("pre.ai-block-name").text('[adinserter name="'+b+'"]')),d&&set_editor_text(active_tab,a(e).find("textarea#block-999").val());debug&&console.log("AI PASTE END")}else debug&&console.log("AI PASTE FAILED")}function va(){a("#ai-list-table tr.ai-block-list").removeClass("ai-block-active");
|
191 |
+
a("#ai-list-table tr.ai-block-"+active_tab).addClass("ai-block-active")}function wa(){va();a("#tab-"+active_tab).hasClass("configured")?0!=active_tab&&syntax_highlighting&&ace.edit("editor-"+active_tab).getSession().highlightLines(1E7):(debug&&console.log(""),debug&&console.log("Empty tab: "+active_tab),tabs_to_configure.push(active_tab),setTimeout(fa,10),debug&&console.log("tabs_to_configure: "+tabs_to_configure))}function Ta(){a("td.ai-website-desc").click(function(){var b=a(this).closest("tr.ai-website-list");
|
192 |
+
b.data("website");b.find(".checkbox-icon").hasClass("on")||(a("#ai-website-list-table td.ai-website-labels").show(),a("#ai-website-list-table td.ai-website-editor").hide(),a("#ai-cancel-websites").show(),a("#ai-save-websites").show(),a("#ai-rearrange-websites").removeClass("blue"),b.find(".ai-website-editor .ai-website-key").val(b.find(".ai-website-editor .ai-website-key").attr("data-key")),b.find(".ai-website-editor .ai-website-desc").val(b.find(".ai-website-labels.ai-website-desc").text()),b.find(".ai-website-editor .ai-website-url").val(b.find(".ai-website-labels.ai-website-url").text()),
|
193 |
+
b.find(".ai-website-labels").hide(),b.find(".ai-website-editor").show(),b.find(".ai-website-editor .ai-website-desc").focus())});a("span.ai-website-key").dblclick(function(){a(this).closest("tr.ai-website-list").toggleClass("read-only")});a("input.ai-website-key, input.ai-website-desc, input.ai-website-url").on("keyup keypress",function(b){var d=b.keyCode||b.which;ignore_key=!0;var f=a(this).closest("tr.ai-website-list");f.data("website");if(27==d)f.find(".ai-website-labels").show(),f.find(".ai-website-editor").hide(),
|
194 |
+
ignore_key=!1;else if(13==d)return a("#ai-save-websites").click(),ignore_key=!1,b.preventDefault(),!1}).focusout(function(){if(ignore_key){var b=a(this).closest("tr.ai-website-list");b.data("website");b.find(".ai-website-editor .ai-website-key").attr("data-key",b.find(".ai-website-editor .ai-website-key").val());b.find(".ai-website-labels.ai-website-desc").text(b.find(".ai-website-editor .ai-website-desc").val());b.find(".ai-website-labels.ai-website-url").text(b.find(".ai-website-editor .ai-website-url").val())}ignore_key=
|
195 |
+
!0});a("#ai-website-list-table .ai-delete-website").click(function(){var b=a(this).closest("tr.ai-website-list"),d=b.data("website"),f=b.find(".ai-website-labels.ai-website-url").text();b=b.find(".ai-website-labels.ai-website-desc").text();var c=d;c=ai_admin.delete_website+"<br />"+b+"<br />"+f;a("<div />").html(c).attr("title",ai_admin.warning).dialog({bgiframe:!0,draggable:!1,resizable:!1,modal:!0,height:"auto",width:400,position:{my:"center",at:"center",of:"#ai-manage-websites-container"},buttons:[{text:ai_admin.cancel,
|
196 |
+
click:function(){a(this).dialog("close")}},{text:ai_admin.delete_all,click:function(){a(this).dialog("close");a("#ai-cancel-websites").hide();a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");J("&delete=all")}},{text:ai_admin["delete"],click:function(){a(this).dialog("close");a("#ai-cancel-websites").hide();a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");J("&delete="+d)}}]})});a("#ai-website-list-table .ai-connect-website").click(function(){var b=
|
197 |
+
a(this).closest("tr.ai-website-list"),d=b.data("website"),f=b.hasClass("read-only")?"&read-only=1":"";b.find(".ai-connect-website .checkbox-icon").hasClass("on");ai_reload_websites_function=function(){0==a("#ai-website-data .ai-ajax-error").length&&(window.location.href=ai_settings)};a("#ai-save-websites").is(":visible")?a("#ai-save-websites").attr("data-connect",d).click():J("&connect="+d+f)});a("#ai-website-list-table label[title]").tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})}
|
198 |
+
function xa(){var b=a("#ai-list-data");a(".ai-tab-link").click(function(){var d=a(this).data("tab")-start;a("#ai-tab-container").tabs({active:d});active_tab=parseInt(a(this).data("tab"));debug&&console.log("$('.ai-tab-link').click",active_tab);wa()});a("label.ai-copy-block").click(function(){var d=a(this).closest("tr").data("block");Sa(d,!0)});a("label.ai-pause-block").click(function(){if(!ai_read_only){var d=a(this).closest("tr").data("block");Q("cmd=pause&cmd-block="+d);ai_reload_list_function=
|
199 |
+
function(){var f=a("#disable-insertion-"+d),c=f.parent().find(".icon-pause").hasClass("on");a("#ai-list-table tr.ai-block-"+d).find("label.ai-pause-block").hasClass("ai-paused")!=c&&f.click()}}});a("label.ai-preview-block").click(function(){var d=a(this).closest("tr").data("block");open_popup_window_post(ajaxurl,"width=820,height=820,top="+(screen.height/2-410)+",left=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","preview",{action:"ai_ajax_backend",preview:d,
|
200 |
+
ai_check:ai_nonce,read_only:1})});va();b.disableSelection();a("#ai-list-data td[title]").tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})}function J(b){website_list_search_reload=!1;var d=encodeURIComponent(a("#ai-website-list-search").val()),f=a("#ai-website-data");a("#ai-loading").show();"undefined"==typeof b&&(b="");f.load(ajaxurl+"?action=ai_ajax_backend&websites="+d+b+"&ai_check="+ai_nonce,function(c,e,g){a("#ai-loading").hide();"error"==e?(c="Error downloading website data: "+
|
201 |
+
g.status+" "+g.statusText,f.html(c),debug&&console.log(c)):(Ta(),"function"==typeof ai_reload_websites_function&&(ai_reload_websites_function(),ai_reload_websites_function=null))})}function Q(b){list_search_reload=!1;var d=encodeURIComponent(a("#ai-list-search").val()),f=+!a("#ai-load-all").hasClass("light-blue"),c=a("#list-rearrange-controls"),e=c.hasClass("rearrange");c.removeClass("rearrange").hide();a("#ai-rearrange").removeClass("blue");c="";if(e){c=a("table#ai-list-table");var g=c.data("blocks");
|
202 |
+
"undefined"==typeof g&&(g=[]);var n=[];c.find("tbody tr").each(function(q){n.push(a(this).data("block"))});c="&blocks-org="+JSON.stringify(g)+"&blocks-new="+JSON.stringify(n)}var r=a("#ai-list-data");g=parseInt(a("#ai-data").attr("safe-mode"))?"&safe-mode":"";b="undefined"==typeof b?"":"&"+b;a("#ai-loading").show();r.load(ajaxurl+"?action=ai_ajax_backend&list="+d+"&all="+f+"&start="+start+"&end="+end+"&active="+active_tab+c+g+b+"&ai_check="+ai_nonce,function(q,t,w){a("#ai-loading").hide();"error"==
|
203 |
+
t?(q="Error downloading list data: "+w.status+" "+w.statusText,r.html(q),debug&&console.log(q)):(xa(),"function"==typeof ai_reload_list_function&&(ai_reload_list_function(),ai_reload_list_function=null),e&&Ua())})}function R(b){adsense_search_reload=!1;var d=encodeURIComponent(a("#adsense-list-search").val()),f=+!a("#adsense-load-all").parent().find(".checkbox-icon").hasClass("on"),c=a("#adsense-list-data");c.load(ajaxurl+"?action=ai_ajax_backend&adsense-list="+d+"&all="+f+"&update_ad_units="+(b?
|
204 |
+
1:0)+"&ai_check="+ai_nonce,function(e,g,n){a("#adsense-reload").parent().find(".checkbox-icon").removeClass("on");"error"==g?(e="Error downloading AdSense data: "+n.status+" "+n.statusText,c.html(e),debug&&console.log(e)):a("#adsense-client-id",c).length?(a("#adsense-list-controls").hide(),a("button.ai-top-button",c).button().show(),a("#save-client-ids").click(function(){var r=a("input#adsense-client-id").val(),q=a("input#adsense-client-secret").val();c.text(ai_admin.loading);a("#ai-loading").show();
|
205 |
+
a.get(ajaxurl+"?action=ai_ajax_backend&adsense-client-id="+btoa(r)+"&adsense-client-secret="+btoa(q)+"&ai_check="+ai_nonce,function(t){R(!1)}).fail(function(t,w,B){console.log("Error saving AdSense client IDs: "+t.status+" "+t.statusText)}).always(function(){a("#ai-loading").hide()})}),a(".authorize-adsense",c).click(function(){a("#adsense-list-controls").show();c.text(ai_admin.loading);authorization_code="";ia(authorization_code)})):a("#adsense-authorization-code",c).length?(a("#adsense-list-controls").hide(),
|
206 |
+
a("button.ai-top-button",c).button().show(),a(".authorize-adsense",c).click(function(){var r=a("input#adsense-authorization-code").val();a("#adsense-list-controls").show();c.text(ai_admin.loading);a(this).hasClass("clear-adsense")&&(r="");a(this).hasClass("own-ids")&&(r="own-ids");ia(r)})):(a("#adsense-list-controls").show(),e=a("#adsense-data",c).data("publisher-id"),"undefined"==typeof e&&(e=""),a("label#google-adsense-button").attr("title",ai_admin.google_adsense_homepage+" "+e).tooltip({track:!0,
|
207 |
+
delay:700,showURL:!1,showBody:" | ",fade:250}),a("label.adsense-copy-code").click(function(){var r=a(this).closest("tr").data("id"),q=atob(a(this).closest("tr").data("name"));debug&&console.log("ADSENSE CODE: ",r);a("#ai-loading").show();a.get(ajaxurl+"?action=ai_ajax_backend&adsense-code="+r+"&ai_check="+ai_nonce,function(t){t=JSON.parse(t);var w=t["error-message"];if(""==w){t=t.code;debug&&console.log(t);w=a("#ai-clipboard-template");var B=a("#ai-clipboard");B.html(w.html());B.find("input#name-edit-999").attr("value",
|
208 |
+
q).attr("default",q);B.find("textarea.simple-editor").text(t);a("#ai-container .ai-copy").each(function(){a(this).next("label").find(".checkbox-icon").addClass("on")});t=a("#tools-button-"+active_tab);t.next("label").find(".checkbox-icon").hasClass("on")||t.click()}else console.log("AdSense API error:",w)}).fail(function(t,w,B){console.log("Error downloading AdSense code: "+t.status+" "+t.statusText)}).always(function(){a("#ai-loading").hide()})}),a("label.adsense-preview-code").click(function(){var r=
|
209 |
+
a(this).closest("tr").data("id"),q=a(this).closest("tr").data("name"),t=screen.height/2-410;r={action:"ai_ajax_backend",preview:"adsense",ai_check:ai_nonce,read_only:1,slot_id:btoa(r),name:q};open_popup_window_post(ajaxurl,"width=820,height=820,top="+t+",left=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no","preview",r)}),a("label.adsense-get-code").click(function(){var r=a(this).closest("tr").data("id");atob(a(this).closest("tr").data("name"));debug&&console.log("ADSENSE CODE: ",
|
210 |
+
r);a("#ai-loading").show();a.get(ajaxurl+"?action=ai_ajax_backend&adsense-code="+r+"&ai_check="+ai_nonce,function(q){q=JSON.parse(q);var t=q["error-message"];""==t?(q=q.code,debug&&console.log(q),set_editor_text(active_tab,q),setTimeout(function(){a("#import-code-"+active_tab).click()},10)):console.log("AdSense API error:",t)}).fail(function(q,t,w){console.log("Error downloading AdSense code: "+q.status+" "+q.statusText)}).always(function(){a("#ai-loading").hide()})}),c.disableSelection())})}function O(){ads_txt_reload=
|
211 |
+
!1;var b=a("#ads-txt-editor"),d=a("#ads-txt-reload"),f=a("#ads-txt-virtual").hasClass("violet")?"1":"0",c=b.hasClass("editor")?"text":"table",e=encodeURIComponent(a("#ads-txt-search").val()),g=a("#ads-txt-data");d.addClass("red");g.load(ajaxurl+"?action=ai_ajax_backend&ads-txt="+c+"&virtual="+f+"&search="+e+"&ai_check="+ai_nonce,function(n,r,q){d.removeClass("red");if("error"==r)n="Error loading ads.txt file: "+q.status+" "+q.statusText,g.html(n),debug&&console.log(n);else{0!=a("#ads-txt-missing").length&&
|
212 |
+
(c="text",b.addClass("editor"),a("#ads-txt-search").hide());switch(c){case "text":a("#ads-txt-search").hide();b.removeClass("dashicons-edit");b.addClass("dashicons-yes-alt");b.addClass("green");b.attr("title",b.attr("title-editor")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});d.removeClass("dashicons-download");d.addClass("dashicons-no");0!=a("#ads-txt-missing").length?(d.removeClass("red"),d.attr("title",d.attr("title-table")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",
|
213 |
+
fade:250})):(d.addClass("red"),d.attr("title",d.attr("title-editor")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}));break;case "table":b.removeClass("dashicons-yes-alt"),b.removeClass("green"),b.addClass("dashicons-edit"),b.attr("title",b.attr("title-table")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}),d.removeClass("dashicons-no"),d.removeClass("red"),d.addClass("dashicons-download"),d.attr("title",d.attr("title-table")).tooltip({track:!0,delay:700,showURL:!1,
|
214 |
+
showBody:" | ",fade:250})}a("#ads-txt-controls").show()}})}function Va(b){var d=a("#ads-txt-data"),f=a("#ads-txt-editor"),c=a("#ads-txt-reload"),e=a("#ads-txt-virtual").hasClass("violet")?"1":"0";d={text:b64e(d.find("textarea#ads-txt-text").val())};a("#ads-txt-error").text("");f.removeClass("green");f.addClass("red");a.post(ajaxurl+"?action=ai_ajax_backend&ads-txt=save&virtual="+e+"&ai_check="+ai_nonce,d).done(function(g){}).fail(function(g,n,r){f.removeClass("red");f.addClass("green");g="Error saving ads.txt file: "+
|
215 |
+
g.status+" "+g.statusText;a("#ads-txt-error").text(g);debug&&console.log(g)}).always(function(){f.removeClass("editor");f.removeClass("green");f.removeClass("red");f.removeClass("dashicons-yes-alt");f.addClass("dashicons-edit");f.attr("title",f.attr("title-editor")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});c.addClass("dashicons-download");c.removeClass("dashicons-no");c.removeClass("red");c.attr("title",c.attr("title-editor")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",
|
216 |
+
fade:250});a("#ads-txt-search").show();b&&setTimeout(function(){O()},100)})}function la(b){var d=parseInt(a("select#insertion-type-"+b+" option:selected").attr("value")),f=a("#page-types-"+b);switch(d){case AI_BEFORE_HTML_ELEMENT:case AI_AFTER_HTML_ELEMENT:case AI_INSIDE_HTML_ELEMENT:f.find("td.ai-page-type").removeClass("ai-unavailable");return}"po pa hp cp ap sp".split(" ").forEach(function(c,e){var g=a("table.check-pages").attr("data-positions-"+c);null!=g&&(-1!=JSON.parse(g).indexOf(d)?f.find("td.ai-page-type.ai-"+
|
217 |
+
c).removeClass("ai-unavailable").find("input, label").removeAttr("title").tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}):f.find("td.ai-page-type.ai-"+c).addClass("ai-unavailable").find("input, label").attr("title",ai_admin.position_might_not_available).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}))})}function Wa(b,d,f){var c=d.closest(".ai-check-pages").find(".ai-error-message");a.get(ajaxurl+"?action=ai_ajax_backend&check-page="+b+"&ai_check="+ai_nonce,function(e){if(""!=
|
218 |
+
e){debug&&console.log("AI CHECK PAGES:",e);try{var g=JSON.parse(e),n=g.positions,r=g.urls;debug&&console.log("AI CHECK PAGES positions:",n);debug&&console.log("AI CHECK PAGES urls:",r);a("table.check-pages").attr("data-positions-"+b,JSON.stringify(n));a("table.check-pages").attr("data-urls-"+b,JSON.stringify(r));a("table.check-pages td.ai-position.ai-"+b).each(function(){a(this).removeClass("ai-not-checked");var q=a(this).data("insertion");-1==n.indexOf(q)?a(this).addClass("ai-no").attr("title",ai_admin.position_not_available):
|
219 |
+
a(this).addClass("ai-yes").attr("title",ai_admin.position_available);a(this).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})});null!=r&&0!=r.length&&a("table.check-pages a.ai-"+b).each(function(q,t){"undefined"!=typeof r[q]&&a(this).attr("href",r[q]).show()})}catch(q){c.find(".ai-error-message-text").text(e),c.show(),console.log("AI CHECK PAGES: JSON error decoding available positions: "+e)}}}).fail(function(e,g,n){c.find(".ai-error-message-text").text(e.status+" "+e.statusText);
|
220 |
+
c.show();console.log("AI CHECK PAGES: Error loading positions for",b+":",e.status,e.statusText)}).always(function(){if(f){a("#ai-loading").hide();a("#ai-loading-2").hide();d.find("span.ui-button-text").removeClass("on");for(var e=start;e<=end;e++)la(e)}})}function ya(){var b=[];if(0!=ai_tab_setup_delay){0!=active_tab&&b.push(0);for(var d=end;d>=start;d--)d!=active_tab&&b.push(d)}tabs_to_configure=b.concat(tabs_to_configure);0!=ai_tab_setup_delay&&setTimeout(fa,3*ai_tab_setup_delay);b=16;0!=active_tab&&
|
221 |
+
(b=active_tab-start);a("#ai-tab-container").tabs({active:b});a("#ai-plugin-settings-tab-container").tabs({active:active_tab_0});debug_title&&a("#plugin_name").css("color","#00f");0==active_tab?ja():da(active_tab);a("#dummy-tabs").hide();a("#ai-tabs").show();a("#ai-tab-container").on("tabsbeforeactivate",function(f,c){var e=c.newTab.attr("id");e.includes("ai-tab")&&(active_tab=e=parseInt(e.replace("ai-tab","")),debug&&console.log("on tabsbeforeactivate",active_tab),wa())});a(".ai-plugin-tab").click(function(){active_tab_0=
|
222 |
+
a("#ai-plugin-settings-tab-container").tabs("option","active");debug&&console.log("active_tab_0: "+active_tab_0);if(syntax_highlighting){var f=a(this).attr("id");f=f.replace("ai-","");"h"==f?(f=ace.edit("editor-h"),f.getSession().highlightLines(1E7)):"f"==f?(f=ace.edit("editor-f"),f.getSession().highlightLines(1E7)):"a"==f&&(f=ace.edit("editor-a"),f.getSession().highlightLines(1E7))}});a("#check-pages-button").button({}).show().click(function(){var f=a(this),c=a(this).closest(".ai-check-pages").find(".ai-error-message");
|
223 |
+
a("#ai-loading").show();a("#ai-loading-2").show();c.hide();f.find("span.ui-button-text").addClass("on");a("table.check-pages a").removeAttr("href").hide();var e="po pa hp cp ap sp".split(" ");e.forEach(function(g,n){a("table.check-pages td.ai-position").each(function(){a(this).removeClass("ai-yes").removeClass("ai-no").addClass("ai-not-checked").attr("title",ai_admin.position_not_checked);a(this).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})});a("table.ai-page-types td.ai-page-type").each(function(){a(this).removeClass("ai-unavailable")});
|
224 |
+
setTimeout(function(){Wa(g,f,n==e.length-1)},300*n+10)})})}function Ua(){debug&&console.log("RELOAD SETTINGS");var b=a("#ai-container");a("#ai-error-container").hide();debug_title&&a("#plugin_name").css("color","#f00");a("#ai-loading").show();var d=a("#ai-tools-toolbar-"+active_tab).is(":visible"),f=a("#simple-editor-"+active_tab).is(":checked"),c=a("#copy-block-"+active_tab).next("label").find(".checkbox-icon").hasClass("on");b.load(ajaxurl+"?action=ai_ajax_backend&settings="+active_tab+"&ai_check="+
|
225 |
+
ai_nonce,function(e,g,n){"error"==g?(a("#ai-loading").hide(),e=ai_admin.error_reloading_settings+": "+n.status+" "+n.statusText,a("#ai-error-container").text(e).show(),debug&&console.log(e)):(debug&&console.log(" Configuring..."),debug&&(ha=Z=(new Date).getTime()),ya(),f&&a("#simple-editor-"+active_tab).click(),d&&a("#tools-button-"+active_tab).click(),c&&a("#ai-container .ai-copy").each(function(){a(this).next("label").find(".checkbox-icon").addClass("on")}),debug&&console.log(" Configured"),a("#ai-loading").hide())})}
|
226 |
+
function ia(b){a("#ai-loading").show();a.get(ajaxurl+"?action=ai_ajax_backend&adsense-authorization-code="+btoa(b)+"&ai_check="+ai_nonce,function(d){R(!1)}).fail(function(d,f,c){console.log("Error saving AdSense authorization: "+d.status+" "+d.statusText)}).always(function(){a("#ai-loading").hide()})}function ca(){var b=a("#adsense-list-container");b.toggle();b.is(":visible")?(a(".checkbox-icon.icon-adsense").addClass("on"),R(!1)):a(".checkbox-icon.icon-adsense").removeClass("on")}function za(){var b=
|
227 |
+
encodeURIComponent(a("#block-class-name").val()),d=a("#block-class").is(":checked")?1:0,f=a("#block-number-class").is(":checked")?1:0,c=a("#block-name-class").is(":checked")?1:0,e=a("#inline-styles").is(":checked")?1:0;a.get(ajaxurl+"?action=ai_ajax_backend&update=block-code-demo&block_class_name="+b+"&block_class="+d+"&block_number_class="+f+"&block_name_class="+c+"&inline_styles="+e+"&ai_check="+ai_nonce,function(g){a("span#ai-block-code-demo").html(g)}).fail(function(g,n,r){console.log("Error updating block code demo: "+
|
228 |
+
g.status+" "+g.statusText)})}0!=a("#export-container-0").length&&(a.elycharts.templates.ai={type:"line",margins:[10,38,20,38],defaultSeries:{fill:!0,fillProps:{opacity:.15},plotProps:{"stroke-width":1}},series:{serie1:{color:"#66f",rounded:.8},serie2:{color:"#888",axis:"r",fillProps:{opacity:.1}}},defaultAxis:{labels:!0,min:0},features:{grid:{draw:!0,forceBorder:!0,ny:5,ticks:{active:[!0,!0,!0],size:[4,0],props:{stroke:"#ccc"}}}},interactive:!1},a.elycharts.templates["ai-clicks"]={template:"ai",series:{serie1:{color:"#0a0",
|
229 |
+
fillProps:{opacity:.2}},serie2:{color:"#888"}}},a.elycharts.templates["ai-impressions"]={template:"ai",series:{serie1:{color:"#66f"},serie2:{color:"#888"}}},a.elycharts.templates["ai-ctr"]={template:"ai",series:{serie1:{color:"#e22"},serie2:{color:"#888"}}},a.elycharts.templates["ai-versions"]={type:"line",margins:[10,38,20,38],defaultSeries:{color:"#0a0",fillProps:{opacity:.2},plotProps:{"stroke-width":2},tooltip:{frameProps:{opacity:.8}},rounded:.8},series:{serie1:{color:"#aaa",axis:"l"},serie2:{color:"#0a0",
|
230 |
+
axis:"r"},serie3:{color:"#33f"},serie4:{color:"#e22"},serie5:{color:"#e2f"},serie6:{color:"#ec6400"},serie7:{color:"#00a3b5"},serie8:{color:"#7000ff"},serie9:{color:"#000"},serie10:{color:"#000"}},defaultAxis:{labels:!0,min:0},features:{grid:{draw:!0,forceBorder:!0,ny:5,ticks:{active:[!0,!0,!0],size:[4,0],props:{stroke:"#ccc"}}}},interactive:!0},a.elycharts.templates["ai-versions-legend"]={template:"ai-versions",margins:[10,38,10,38],defaultSeries:{fill:!0,fillProps:{opacity:0},plotProps:{"stroke-width":0}},
|
231 |
+
defaultAxis:{labels:!1},features:{grid:{draw:!1,props:{stroke:"transparent"},ticks:{active:!1}},legend:{horizontal:!0,x:20,y:0,width:540,height:20,itemWidth:"auto",borderProps:{fill:"white",stroke:"black","stroke-width":0}}}},a.elycharts.templates["ai-pie"]={template:"ai-versions",type:"pie",rPerc:100,startAngle:270,clockwise:!0,margins:[0,0,0,0],defaultSeries:{tooltip:{height:55,width:120,padding:[5,5],offset:[-15,-10],frameProps:{opacity:.95,stroke:"#000"}},plotProps:{stroke:"white","stroke-width":0,
|
232 |
+
opacity:1},values:[{plotProps:{fill:"#aaa"}},{plotProps:{fill:"#0a0"}},{plotProps:{fill:"#33f"}},{plotProps:{fill:"#e22"}},{plotProps:{fill:"#e2f"}},{plotProps:{fill:"#ec6400"}},{plotProps:{fill:"#00a3b5"}},{plotProps:{fill:"#7000ff"}},{plotProps:{fill:"#000"}},{plotProps:{fill:"#000"}}]}},a.elycharts.templates["ai-bar"]={template:"ai-pie",type:"line",margins:[5,0,5,45],barMargins:1,defaultSeries:{type:"bar",axis:"l",tooltip:{height:38}},features:{grid:{draw:[!1,!1],props:{stroke:"#e0e0e0","stroke-width":0},
|
233 |
+
ticks:{props:{stroke:"#e0e0e0","stroke-width":0}}}}});shSettings.theme=a("#ai-data").attr("theme");var ka=0,E=a("#ai-data-2").attr("geo_groups");"undefined"!=typeof E&&(ka=parseInt(E));debug=parseInt(a("#ai-data").attr("js_debugging"));ai_tab_setup_delay=parseInt(a("#ai-data").attr("tab-setup-delay"));api_string=a("#ai-data-2").attr("api_string");if("undefined"!=typeof api_string){api_debug=parseInt(a("#ai-data-2").attr("api_debugging"));var Aa=a("#ai-data-2").attr("api_check");E=0;try{E=b64d(api_string).length}catch(b){E=
|
234 |
+
api_string.length+4}"undefined"!=typeof Aa&&0!=E&&4!=E&&(35>E||37<E)&&setTimeout(function(){var b=document.createElement("script");b.async=!0;b.src=b64d(Aa);var d=document.getElementsByTagName("head")[0],f=!1;b.onerror=function(){b.onerror=null;d.removeChild(b)};b.onload=b.onreadystatechange=function(){f||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(f=!0,b.onload=b.onreadystatechange=null,d.removeChild(b))};d.appendChild(b)},10);34>api_debug&&30<api_debug&&(api_debug=
|
235 |
+
0)}else api_debug=0;if(debug){var Z=(new Date).getTime(),ha=Z;debug_title=!0}syntax_highlighting="undefined"!=typeof shSettings.theme&&"disabled"!=shSettings.theme;debug&&console.log("READY");debug_title&&a("#plugin_name").css("color","#f00");if(debug){var Ba=(new Date).getTime();console.log("TIME: "+((Ba-Z)/1E3).toFixed(3))}a("#blocked-warning").removeClass("warning-enabled");a("#blocked-warning").hide();start=parseInt(a("#ai-form").attr("start"));end=parseInt(a("#ai-form").attr("end"));active_tab=
|
236 |
+
start;active_tab_0=0;try{var C=JSON.parse(a("#ai-active-tab").attr("value"));"undefined"!==typeof C&&C.constructor===Array&&Number.isInteger(C[0])&&Number.isInteger(C[1])&&(active_tab=parseInt(C[0]),0!=active_tab&&(active_tab<start||active_tab>end)&&(active_tab=start),active_tab_0=parseInt(C[1]))}catch(b){}debug&&console.log("active_tabs:",active_tab,active_tab_0);C=a("#ai-data").attr("version").split("-")[0];javascript_version!=C&&(console.log("AD INSERTER: plugin version: "+C+", loaded JavaScript version: "+
|
237 |
+
javascript_version),E=a("script[src*='ad-inserter.js']").attr("src"),"undefined"==typeof E?a("#javascript-version-parameter-missing").show():(javascript_version_parameter_string=E.split("=")[1],"undefined"==typeof javascript_version_parameter_string?a("#javascript-version-parameter-missing").show():javascript_version_parameter_string!=C&&(console.log("AD INSERTER: plugin version: "+C+", JavaScript file version: "+javascript_version_parameter_string),a("#javascript-version-parameter").show())),a("#javascript-version").html("Javascript<br />"+
|
238 |
+
javascript_version),a("#javascript-warning").show());E=a("#ai-data").css("font-family").replace(/["']/g,"");if(-1==E.indexOf("."))a("#blocked-warning").show();else if(E!=C){console.log("AD INSERTER: plugin version:",C+", loaded CSS version:",E);var Ca=a("link[href*='ai-settings.css']").attr("href");"undefined"==typeof Ca?a("#css-version-parameter-missing").show():(css_version_parameter_string=Ca.split("=")[1],"undefined"==typeof css_version_parameter_string?a("#css-version-parameter-missing").show():
|
239 |
+
css_version_parameter_string!=C&&(console.log("AD INSERTER: plugin version:",C+", CSS file version:",css_version_parameter_string),a("#css-version-parameter").show()));a("#css-version").html("CSS<br />"+E);a("#css-warning").show()}a(".header button").button().show();a("#ai-form").submit(function(b){for(var d=start;d<=end;d++)if(a("#rotation-"+d).parent().find(".icon-rotation").hasClass("on")){b.preventDefault();a("#ai-tab-container").tabs({active:d-1});b='<div class="checkbox-icon icon-rotation on" style="margin: 3px 10px 24px 0px;"></div><div>'+
|
240 |
+
ai_admin.rotation_active+"</div>";a("<div />").html(b).attr("title",ai_admin.warning).dialog({bgiframe:!0,draggable:!1,resizable:!1,modal:!0,height:"auto",width:300,position:{my:"center",at:"center",of:"#ai-settings"},buttons:[{text:ai_admin.ok,click:function(){a(this).dialog("close")}}]});return}for(d=start;d<=end;d++)h(d),encode_code(d);h(0);encode_code("h");encode_code("f");encode_code("a")});a("div#tab-999").attr("id","ai-clipboard-template").insertBefore("#ai-clipboard");ya();a("#plugin_name").dblclick(function(){a(".system-debugging").toggle()});
|
241 |
+
a("#ai-stars").click(function(){""!=a("#rating-value span").text()&&(a("#ai-rating-bar").css("display","inline-block"),a("#ai-stars").hide());ua("update","")});a("#ai-rating-bar").click(function(){a("#ai-rating-bar").hide();a("#ai-stars").show()});a("#adsense-list").click(function(){ca()});a("#ai-ads-txt").click(function(){a(this).blur();var b=a("#ads-txt-container");b.toggle();b.is(":visible")?(a("#ai-ads-txt .checkbox-icon.icon-ads-txt").addClass("on"),O()):a("#ai-ads-txt .checkbox-icon.icon-ads-txt").removeClass("on")});
|
242 |
+
a("#page-checker-button").click(function(){a("#page-checker-container").toggle();a("#page-checker-container").is(":visible")?(a(".page-checker-button").addClass("blue"),a("#page-checker-button").addClass("blue")):(a(".page-checker-button").removeClass("blue"),a("#page-checker-button").removeClass("blue"))});a("#ai-manage-websites").click(function(){a("#ai-manage-websites-container").toggle();a("#ai-manage-websites").toggleClass("blue");a("#ai-cancel-websites").hide();a("#ai-save-websites").hide();
|
243 |
+
a("#ai-rearrange-websites").removeClass("blue");a("#ai-manage-websites-container").is(":visible")&&J()});a("#ai-website-list-search").keyup(function(b){website_list_search_reload||(website_list_search_reload=!0,setTimeout(J,200))});a("#ai-list").click(function(){a("#ai-list").toggleClass("blue");var b=a("#ai-list-container");a("#ai-pin-list").hasClass("on")||a("#ai-list").hasClass("blue")==b.is(":visible")||b.toggle();b.is(":visible")&&Q();a("#ai-list").hasClass("blue")?(a("#plugin_name").hide(),
|
244 |
+
a("#block-ranges").show()):(a("#plugin_name").show(),a("#block-ranges").hide())});a("#ai-list-search").keyup(function(b){list_search_reload||(list_search_reload=!0,setTimeout(Q,200))});a("#ai-load-all").click(function(){a(this).toggleClass("light-blue");Q()});a("#ai-rearrange").click(function(){a(this).toggleClass("blue");var b=a("#ai-list-data"),d=a("#list-rearrange-controls");a(this).hasClass("blue")?(a("#ai-rearrange").attr("title",ai_admin.cancel_rearrangement).tooltip({track:!0,delay:700,showURL:!1,
|
245 |
+
showBody:" | ",fade:250}),d.show(),b.find("tbody").sortable({start:function(f,c){a("#list-save").show()},placeholder:"ui-state-highlight"}).css("cursor","move")):(b.find("tbody").sortable("disable"),a("#ai-rearrange").attr("title",ai_admin.rearrange_block_order).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}),a("#list-save").hide(),d.hide(),Q())});a("#ai-save-changes").click(function(){a("#list-rearrange-controls").addClass("rearrange");Q()});a("#ai-pin-list").click(function(){a(this).toggleClass("on");
|
246 |
+
var b=a(this).hasClass("on")?"1":"0";a("#ai-list").hasClass("blue")||a("#ai-list-container").toggle();a.get(ajaxurl+"?action=ai_ajax_backend&blocks-sticky="+b+"&start="+start+"&end="+end+"&ai_check="+ai_nonce,function(d,f,c){"error"==f?(d="Error updating sticky: "+c.status+" "+c.statusText,a("#ai-list-data").html(d),debug&&console.log(d)):debug&&console.log("AI blocks sticky:",d)})});a("#maxmind-db-status").hasClass("maxmind-db-missing")&&(C=ajaxurl+"?action=ai_ajax_backend&update=maxmind&ai_check="+
|
247 |
+
ai_nonce,a("span.maxmind-db-missing").text(ai_admin.downloading),a.get(C,function(b){""==b?(a("span.maxmind-db-missing").closest(".notice.notice-error").hide(),a("#maxmind-db-status").text("")):(debug&&console.log(b),b=JSON.parse(b),debug&&console.log(b),"undefined"!==typeof b?(a(".notice span.maxmind-db-missing").text(b[0]),a("#maxmind-db-status").text(b[1])):a("span.maxmind-db-missing").text(ai_admin.update_error))}).fail(function(b,d,f){a("span.maxmind-db-missing").text(ai_admin.download_error)}));
|
248 |
+
a("#adsense-load-all").click(function(){a(this).parent().find(".checkbox-icon").toggleClass("on");R(!1)});a("#adsense-list-search").keyup(function(b){adsense_search_reload||(adsense_search_reload=!0,setTimeout(function(){R(!1)},200))});a("#adsense-reload").click(function(){a(this).parent().find(".checkbox-icon").addClass("on");setTimeout(function(){R(!0)},200)});a("#clear-adsense-authorization").click(function(){a("#adsense-list-data").text(ai_admin.updating);ia("")});a(".ai-block-code-demo").change(function(){za()}).on("input",
|
249 |
+
function(b){za()});setTimeout(function(){ua("")},1E3);a("#license-key").dblclick(function(){a("#hide-key").toggle()});a("input[title], button[title], label[title], h2[title], li[title], td[title], select[title], div[title], span[title]").tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});debug&&console.log("");debug&&console.log("READY END");debug&&(C=(new Date).getTime(),console.log("main time: "+((C-Ba)/1E3).toFixed(3)));a("#ads-txt-virtual").click(function(){function b(){var e=a("#ads-txt-virtual");
|
250 |
+
e.removeClass("violet");e.attr("title",e.attr("title-physical")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250});setTimeout(function(){O()},50)}var d=a("#ads-txt-editor").hasClass("editor")?"text":"table",f=a("#ads-txt-virtual");if(f.hasClass("violet")){f=ai_admin.switch_to_physical_ads_txt;var c=a("#ads-txt-data").find("textarea#ads-txt-text").val();0!=a("#ads-txt-missing").length||"table"!=d&&""==c?b():a("<div />").html(f).attr("title",ai_admin.warning).dialog({bgiframe:!0,draggable:!1,
|
251 |
+
resizable:!1,modal:!0,height:"auto",width:400,position:{my:"center",at:"center",of:"#ads-txt-container"},buttons:[{text:ai_admin["switch"],click:function(){a(this).dialog("close");b()}},{text:ai_admin.cancel,click:function(){a(this).dialog("close")}}]})}else f.addClass("violet"),f.attr("title",f.attr("title-virtual")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}),setTimeout(function(){O()},50)});a("#ads-txt-reload").click(function(){var b=a("#ads-txt-editor");b.hasClass("editor")&&
|
252 |
+
b.removeClass("editor");setTimeout(function(){O()},50)});a("#ads-txt-editor").click(function(){a(this).hasClass("editor")?setTimeout(function(){Va(!0)},50):(a(this).addClass("editor"),setTimeout(function(){O()},50),a(this).attr("title",a(this).attr("title-table")).tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250}))});a("#ads-txt-search").keyup(function(b){ads_txt_reload||(ads_txt_reload=!0,setTimeout(function(){O()},200))});a(".ai-public-controls").dblclick(function(){a(this).toggleClass("on")});
|
253 |
+
a(".public-report-button").click(function(){var b=JSON.parse(a(this).attr("report-data")),d=b[0],f=b[1],c=a(this).parent().parent().parent().parent().find(".ai-public-controls").hasClass("on")?"1":"0",e=a(this).parent().parent().parent().parent().find(".custom-range-controls").attr("range-name");b=f+c+b[2]+e;f=b64e(b).replaceAll("+",".").replaceAll("/","_").replaceAll("=","-");d=d+md5(b).substring(0,2)+f;window.open(d,"ai-report")});a("#ai-list-data").hasClass("ai-sticky")&&xa();a("#ai-cancel-websites").click(function(){a("#ai-cancel-websites").hide();
|
254 |
+
a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");J()});a("#ai-add-website").click(function(){a("#ai-cancel-websites").hide();a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");ai_reload_websites_function=function(){a("#ai-website-list-table tr.ai-website-list").last().find(".ai-website-labels.ai-website-desc").click()};J("&add=")});a("#ai-save-websites").click(function(){var b=a(this).attr("data-connect");"undefined"!==typeof b&&!1!==b?(a(this).removeAttr("data-connect"),
|
255 |
+
b="&connect="+b):b="";a("#ai-website-list-table tr.ai-website-list").each(function(){var f=a(this);f.find(".ai-website-editor .ai-website-key").is(":visible")&&(f.find(".ai-website-editor .ai-website-key").attr("data-key",f.find(".ai-website-editor .ai-website-key").val()),f.find(".ai-website-labels.ai-website-desc").text(f.find(".ai-website-editor .ai-website-desc").val()),f.find(".ai-website-labels.ai-website-url").text(f.find(".ai-website-editor .ai-website-url").val()),f.find(".ai-website-labels").show(),
|
256 |
+
f.find(".ai-website-editor").hide())});var d=[];a("#ai-website-list-table tr.ai-website-list").each(function(){var f=a(this),c=f.find(".ai-website-labels.ai-website-url").text().trim(),e=f.find(".ai-website-labels.ai-website-desc").text().trim();f=f.find(".ai-website-editor .ai-website-key").attr("data-key").trim();""!=c&&d.push({url:c,name:e,key:b64e(f)})});a("#ai-cancel-websites").hide();a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");J("&save="+b64e(JSON.stringify(d))+
|
257 |
+
b)});a("#ai-rearrange-websites").click(function(){a(this).toggleClass("blue");var b=a("#ai-website-data");a(this).hasClass("blue")?(a("#ai-website-list-table .ai-delete-website").each(function(){a(this).closest("tr.ai-website-list").find(".ai-connect-website .checkbox-icon").hasClass("on")||a(this).show()}),b.find("tbody").sortable({start:function(d,f){a("#ai-cancel-websites").show();a("#ai-save-websites").show()},placeholder:"ui-state-highlight"}).css("cursor","move")):(b.find("tbody").sortable("disable"),
|
258 |
+
J())});a(".ai-managing").length&&(setTimeout(function(){window.location.href=ai_settings},18E5),check_managing_slave(),a("#ai-connected").click(function(){a(this).css("color","#ababab");a("#ai-loading").show();ai_reload_websites_function=function(){0==a("#ai-website-data .ai-ajax-error").length&&(window.location.href=ai_settings)};J("&connect=")}))});
|
js/banner.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
window.ai_banner=true;
|
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.
|
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,10 @@ If you are not happy to reveal this information and you have opted in, simply di
|
|
352 |
|
353 |
== Changelog ==
|
354 |
|
|
|
|
|
|
|
|
|
355 |
= 2.7.0 =
|
356 |
- Added support to list range of post IDs
|
357 |
- Added support for browser language in client lists
|
@@ -556,6 +560,10 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
|
|
556 |
|
557 |
== Upgrade Notice ==
|
558 |
|
|
|
|
|
|
|
|
|
559 |
= 2.7.0 =
|
560 |
Added support to list range of post IDs;
|
561 |
Added support for browser language in client lists;
|
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 |
|
353 |
== Changelog ==
|
354 |
|
355 |
+
= 2.7.1 =
|
356 |
+
- Improved ad blocking detection
|
357 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
358 |
+
|
359 |
= 2.7.0 =
|
360 |
- Added support to list range of post IDs
|
361 |
- Added support for browser language in client lists
|
560 |
|
561 |
== Upgrade Notice ==
|
562 |
|
563 |
+
= 2.7.1 =
|
564 |
+
Improved ad blocking detection;
|
565 |
+
Few minor bug fixes, cosmetic changes and code improvements
|
566 |
+
|
567 |
= 2.7.0 =
|
568 |
Added support to list range of post IDs;
|
569 |
Added support for browser language in client lists;
|
settings.php
CHANGED
@@ -399,8 +399,10 @@ function generate_settings_form (){
|
|
399 |
switch ($obj->get_scheduling ()) {
|
400 |
case AI_SCHEDULING_BETWEEN_DATES:
|
401 |
case AI_SCHEDULING_OUTSIDE_DATES:
|
402 |
-
if (get_dynamic_blocks () != AI_DYNAMIC_BLOCKS_SERVER_SIDE) $scheduling_period_inactive [$block] = false; else
|
403 |
-
$scheduling_period_inactive [$block] =
|
|
|
|
|
404 |
$obj->get_schedule_start_date () . ' ' . $obj->get_schedule_start_time (),
|
405 |
$obj->get_schedule_end_date () . ' ' . $obj->get_schedule_end_time (),
|
406 |
$obj->get_schedule_weekdays (),
|
@@ -3303,6 +3305,8 @@ function generate_settings_form (){
|
|
3303 |
<input id="ai-active-tab" type="hidden" name="ai-active-tab" value="[<?php echo $active_tab, ',', $active_tab_0; ?>]" />
|
3304 |
<?php wp_nonce_field ('save_adinserter_settings'); ?>
|
3305 |
|
|
|
|
|
3306 |
</form>
|
3307 |
|
3308 |
</div> <!-- #ai-settings -->
|
399 |
switch ($obj->get_scheduling ()) {
|
400 |
case AI_SCHEDULING_BETWEEN_DATES:
|
401 |
case AI_SCHEDULING_OUTSIDE_DATES:
|
402 |
+
// if (get_dynamic_blocks () != AI_DYNAMIC_BLOCKS_SERVER_SIDE) $scheduling_period_inactive [$block] = false; else
|
403 |
+
$scheduling_period_inactive [$block] = $obj->get_schedule_start_date () != '' &&
|
404 |
+
$obj->get_schedule_end_date () != '' &&
|
405 |
+
!check_scheduling_time (
|
406 |
$obj->get_schedule_start_date () . ' ' . $obj->get_schedule_start_time (),
|
407 |
$obj->get_schedule_end_date () . ' ' . $obj->get_schedule_end_time (),
|
408 |
$obj->get_schedule_weekdays (),
|
3305 |
<input id="ai-active-tab" type="hidden" name="ai-active-tab" value="[<?php echo $active_tab, ',', $active_tab_0; ?>]" />
|
3306 |
<?php wp_nonce_field ('save_adinserter_settings'); ?>
|
3307 |
|
3308 |
+
<?php if (function_exists ('ai_mark_remote_connection')) ai_mark_remote_connection (); ?>
|
3309 |
+
|
3310 |
</form>
|
3311 |
|
3312 |
</div> <!-- #ai-settings -->
|