Version Description
- Added support for demo settings
- Added support for background transparency
- Added support for background for sticky ads (Pro only)
- Added support for statistics for check options (Pro only)
- Added support for individual rotation option statistics (Pro only)
- 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.14 |
Comparing to | |
See all releases |
Code changes from version 2.7.13 to 2.7.14
- ad-inserter.php +10 -1
- class.php +88 -13
- constants.php +1 -1
- css/ai-settings.css +23 -5
- css/images/transparency-24.png +0 -0
- images/um-1.png +0 -0
- images/um-2.png +0 -0
- includes/js/ai-lists.js +1 -1
- includes/js/ai-lists.min.js +4 -4
- js/ad-inserter.js +57 -10
- js/ad-inserter.min.js +147 -145
- readme.txt +22 -2
- settings.php +34 -13
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,14 @@ Requires PHP: 5.6
|
|
17 |
|
18 |
Change Log
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
Ad Inserter 2.7.13 - 2022-04-02
|
21 |
- Few minor bug fixes, cosmetic changes and code improvements
|
22 |
|
@@ -8650,6 +8658,7 @@ function ai_process_shortcode (&$block, $atts) {
|
|
8650 |
"group" => "",
|
8651 |
"ignore" => "",
|
8652 |
"disable" => "",
|
|
|
8653 |
"check" => "",
|
8654 |
"viewport" => "",
|
8655 |
"fallback" => "",
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
+
Version: 2.7.14
|
6 |
Description: Ad management with many advanced advertising features to insert ads at optimal positions
|
7 |
Author: Igor Funa
|
8 |
Author URI: http://igorfuna.com/
|
17 |
|
18 |
Change Log
|
19 |
|
20 |
+
Ad Inserter 2.7.14 - 2022-04-28
|
21 |
+
- Added support for demo settings
|
22 |
+
- Added support for background transparency
|
23 |
+
- Added support for background for sticky ads (Pro only)
|
24 |
+
- Added support for statistics for check options (Pro only)
|
25 |
+
- Added support for individual rotation option statistics (Pro only)
|
26 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
27 |
+
|
28 |
Ad Inserter 2.7.13 - 2022-04-02
|
29 |
- Few minor bug fixes, cosmetic changes and code improvements
|
30 |
|
8658 |
"group" => "",
|
8659 |
"ignore" => "",
|
8660 |
"disable" => "",
|
8661 |
+
"index" => "",
|
8662 |
"check" => "",
|
8663 |
"viewport" => "",
|
8664 |
"fallback" => "",
|
class.php
CHANGED
@@ -29,6 +29,8 @@ abstract class ai_BaseCodeBlock {
|
|
29 |
var $wrapping_div_classes;
|
30 |
var $code_empty;
|
31 |
|
|
|
|
|
32 |
var $check_block;
|
33 |
var $check_block_style;
|
34 |
var $check_block_classes;
|
@@ -108,6 +110,8 @@ abstract class ai_BaseCodeBlock {
|
|
108 |
$this->wrapping_div_classes = array ();
|
109 |
$this->code_empty = false;
|
110 |
|
|
|
|
|
111 |
$this->check_block = false;
|
112 |
$this->check_block_style = '';
|
113 |
$this->check_block_classes = array ();
|
@@ -614,13 +618,16 @@ abstract class ai_BaseCodeBlock {
|
|
614 |
|
615 |
if (isset ($obj->wp_options [$global_name]) && (!isset ($ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) || $ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number])) {
|
616 |
$code = $obj->wp_options [$global_name];
|
|
|
617 |
$unfiltered_html = $ai_wp_data [AI_UNFILTERED_HTML];
|
618 |
if (defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML) {
|
619 |
$unfiltered_html = false;
|
620 |
}
|
|
|
621 |
if (!$unfiltered_html) {
|
622 |
$code = wp_kses ($code, 'post');
|
623 |
}
|
|
|
624 |
return $code;
|
625 |
}
|
626 |
|
@@ -652,6 +659,7 @@ abstract class ai_BaseCodeBlock {
|
|
652 |
|
653 |
// Cache generated code
|
654 |
if (!isset ($ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) || $ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) {
|
|
|
655 |
$obj->wp_options [$global_name] = $code;
|
656 |
}
|
657 |
|
@@ -1665,7 +1673,12 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
1665 |
$style .= ' height: ' . $height . ';';
|
1666 |
}
|
1667 |
|
1668 |
-
|
|
|
|
|
|
|
|
|
|
|
1669 |
$style .= ' background-color: ' . $background . ';';
|
1670 |
}
|
1671 |
|
@@ -2646,6 +2659,9 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
2646 |
$check_data = '';
|
2647 |
foreach ($this->check_codes_data [$this->check_codes_index] as $check_type => $check_list) {
|
2648 |
if ($check_list != '') {
|
|
|
|
|
|
|
2649 |
$check_data .= ' '. $check_type . '="' . $check_list . '"';
|
2650 |
}
|
2651 |
}
|
@@ -3208,6 +3224,22 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3208 |
|
3209 |
$additional_code .= "<div class='ai-parallax' style='$height_style'>$parallax_code</div>\n";
|
3210 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3211 |
}
|
3212 |
|
3213 |
$delay_showing_pageviews = $this->get_delay_showing ();
|
@@ -3490,9 +3522,31 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3490 |
|
3491 |
// [ADINSERTER ROTATE]
|
3492 |
|
3493 |
-
//
|
3494 |
-
$
|
3495 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3496 |
|
3497 |
preg_match_all ('/\|rotate([0-9]+?)\|/', $processed_code, $matches);
|
3498 |
|
@@ -6885,19 +6939,19 @@ echo '</body>
|
|
6885 |
}
|
6886 |
}
|
6887 |
}
|
6888 |
-
elseif ($position > 0 && $position < 1) {
|
6889 |
$positions [$index] = intval ($position * (count ($paragraph_positions) - 1) + 0.5);
|
6890 |
}
|
6891 |
-
elseif ($position > - 1 && $position < 0) {
|
6892 |
$positions [$index] = intval (count ($paragraph_positions) + $position * (count ($paragraph_positions) - 1) - 0.5);
|
6893 |
}
|
6894 |
-
elseif ($position <= - 1) {
|
6895 |
$positions [$index] = count ($paragraph_positions) + $position;
|
6896 |
}
|
6897 |
elseif ($position == 0) {
|
6898 |
$positions [$index] = mt_rand (0, count ($paragraph_positions) - 1);
|
6899 |
}
|
6900 |
-
else $positions [$index] = $position - 1;
|
6901 |
}
|
6902 |
$positions = array_unique (array_merge ($positions, $new_positions));
|
6903 |
sort ($positions);
|
@@ -7811,19 +7865,19 @@ echo '</body>
|
|
7811 |
}
|
7812 |
}
|
7813 |
}
|
7814 |
-
elseif ($position > 0 && $position < 1) {
|
7815 |
$positions [$index] = intval ($position * (count ($paragraph_positions) - 1) + 0.5);
|
7816 |
}
|
7817 |
-
elseif ($position > - 1 && $position < 0) {
|
7818 |
$positions [$index] = intval (count ($paragraph_positions) + $position * (count ($paragraph_positions) - 1) - 0.5);
|
7819 |
}
|
7820 |
-
elseif ($position <= - 1) {
|
7821 |
$positions [$index] = count ($paragraph_positions) + $position;
|
7822 |
}
|
7823 |
elseif ($position == 0) {
|
7824 |
$positions [$index] = mt_rand (0, count ($paragraph_positions) - 1);
|
7825 |
}
|
7826 |
-
else $positions [$index] = $position - 1;
|
7827 |
}
|
7828 |
$positions = array_unique (array_merge ($positions, $new_positions));
|
7829 |
sort ($positions);
|
@@ -10194,7 +10248,7 @@ class ai_code_generator {
|
|
10194 |
return array ('type' => AI_CODE_UNKNOWN);
|
10195 |
}
|
10196 |
|
10197 |
-
public function import_rotation ($code){
|
10198 |
global $ai_expand_only_rotate_count_check, $ai_wp_data;
|
10199 |
|
10200 |
$data = array (
|
@@ -10214,6 +10268,27 @@ class ai_code_generator {
|
|
10214 |
$ai_expand_only_rotate_count_check = false;
|
10215 |
|
10216 |
if (strpos ($code, AD_CHECK_SEPARATOR) !== false) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10217 |
return $data;
|
10218 |
}
|
10219 |
|
29 |
var $wrapping_div_classes;
|
30 |
var $code_empty;
|
31 |
|
32 |
+
var $check_statistics;
|
33 |
+
|
34 |
var $check_block;
|
35 |
var $check_block_style;
|
36 |
var $check_block_classes;
|
110 |
$this->wrapping_div_classes = array ();
|
111 |
$this->code_empty = false;
|
112 |
|
113 |
+
$this->check_statistics = false;
|
114 |
+
|
115 |
$this->check_block = false;
|
116 |
$this->check_block_style = '';
|
117 |
$this->check_block_classes = array ();
|
618 |
|
619 |
if (isset ($obj->wp_options [$global_name]) && (!isset ($ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) || $ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number])) {
|
620 |
$code = $obj->wp_options [$global_name];
|
621 |
+
|
622 |
$unfiltered_html = $ai_wp_data [AI_UNFILTERED_HTML];
|
623 |
if (defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML) {
|
624 |
$unfiltered_html = false;
|
625 |
}
|
626 |
+
|
627 |
if (!$unfiltered_html) {
|
628 |
$code = wp_kses ($code, 'post');
|
629 |
}
|
630 |
+
|
631 |
return $code;
|
632 |
}
|
633 |
|
659 |
|
660 |
// Cache generated code
|
661 |
if (!isset ($ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) || $ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) {
|
662 |
+
|
663 |
$obj->wp_options [$global_name] = $code;
|
664 |
}
|
665 |
|
1673 |
$style .= ' height: ' . $height . ';';
|
1674 |
}
|
1675 |
|
1676 |
+
$sticky_background =
|
1677 |
+
$this->is_sticky () &&
|
1678 |
+
$this->get_horizontal_position () == AI_STICK_HORIZONTAL_CENTER &&
|
1679 |
+
($this->get_vertical_position () == AI_STICK_VERTICAL_CENTER || $this->get_vertical_position () == AI_STICK_TO_THE_TOP || $this->get_vertical_position () == AI_STICK_TO_THE_BOTTOM);
|
1680 |
+
|
1681 |
+
if ($background != '' && !$sticky_background) {
|
1682 |
$style .= ' background-color: ' . $background . ';';
|
1683 |
}
|
1684 |
|
2659 |
$check_data = '';
|
2660 |
foreach ($this->check_codes_data [$this->check_codes_index] as $check_type => $check_list) {
|
2661 |
if ($check_list != '') {
|
2662 |
+
if ($check_type == 'block') continue;
|
2663 |
+
if ($check_type == 'name') continue;
|
2664 |
+
if ($check_type == 'check') continue;
|
2665 |
$check_data .= ' '. $check_type . '="' . $check_list . '"';
|
2666 |
}
|
2667 |
}
|
3224 |
|
3225 |
$additional_code .= "<div class='ai-parallax' style='$height_style'>$parallax_code</div>\n";
|
3226 |
}
|
3227 |
+
|
3228 |
+
$background_color = trim ($this->get_block_background_color ());
|
3229 |
+
if ($this->is_sticky () && $this->get_horizontal_position () == AI_STICK_HORIZONTAL_CENTER && $background_color != '') {
|
3230 |
+
$sticky_pop_up = $this->get_vertical_position () == AI_STICK_VERTICAL_CENTER;
|
3231 |
+
|
3232 |
+
if ($sticky_pop_up) {
|
3233 |
+
$additional_code .= "<div style='position: fixed; top: -100vh; left: -100vw; width: 200vw; height: 200vh; z-index: -1; user-select: none; background: " . trim ($this->get_block_background_color ()) . ";'></div>\n";
|
3234 |
+
}
|
3235 |
+
|
3236 |
+
$sticky_top_bottom = $this->get_vertical_position () == AI_STICK_TO_THE_TOP || $this->get_vertical_position () == AI_STICK_TO_THE_BOTTOM;
|
3237 |
+
|
3238 |
+
if ($sticky_top_bottom) {
|
3239 |
+
$this->additional_code_before .= "<div style='width: 100vw; z-index: -1; user-select: none; background: " . trim ($this->get_block_background_color ()) . ";'>\n";
|
3240 |
+
$this->additional_code_after = "</div>\n";
|
3241 |
+
}
|
3242 |
+
}
|
3243 |
}
|
3244 |
|
3245 |
$delay_showing_pageviews = $this->get_delay_showing ();
|
3522 |
|
3523 |
// [ADINSERTER ROTATE]
|
3524 |
|
3525 |
+
// (Re)set option index and name
|
3526 |
+
$check_options_for_statistics = $this->check_statistics;
|
3527 |
+
$check_option_always = isset ($this->check_codes_data [0]) && empty ($this->check_codes_data [0]);
|
3528 |
+
|
3529 |
+
if ($check_options_for_statistics) {
|
3530 |
+
|
3531 |
+
$option_index = isset ($this->check_codes_data [$this->check_codes_index]['name']) ? $this->check_codes_data [$this->check_codes_index]['name'] : $this->check_codes_index;
|
3532 |
+
|
3533 |
+
if ($check_option_always) {
|
3534 |
+
// first option with index 0 is always inserted
|
3535 |
+
// first check option has index 1
|
3536 |
+
$this->code_version = isset ($this->check_codes_data [$this->check_codes_index]['index']) && trim ($this->check_codes_data [$this->check_codes_index]['index']) != '' ? (int) $this->check_codes_data [$this->check_codes_index]['index'] : $this->check_codes_index;
|
3537 |
+
$this->version_name = isset ($this->check_codes_data [$this->check_codes_index]['name']) ? $this->check_codes_data [$this->check_codes_index]['name'] : '';
|
3538 |
+
} else {
|
3539 |
+
// first check option has index 0
|
3540 |
+
$this->code_version = isset ($this->check_codes_data [$this->check_codes_index]['index']) && trim ($this->check_codes_data [$this->check_codes_index]['index']) != '' ? (int) $this->check_codes_data [$this->check_codes_index]['index'] : $this->check_codes_index + 1;
|
3541 |
+
$this->version_name = isset ($this->check_codes_data [$this->check_codes_index]['name']) ? $this->check_codes_data [$this->check_codes_index]['name'] : '';
|
3542 |
+
}
|
3543 |
+
|
3544 |
+
} else {
|
3545 |
+
// Clear for ROTATE in case of multiple block insertions (CHECK separator)
|
3546 |
+
$this->code_version = 0;
|
3547 |
+
$this->version_name = '';
|
3548 |
+
}
|
3549 |
+
|
3550 |
|
3551 |
preg_match_all ('/\|rotate([0-9]+?)\|/', $processed_code, $matches);
|
3552 |
|
6939 |
}
|
6940 |
}
|
6941 |
}
|
6942 |
+
elseif (is_numeric ($position) && $position > 0 && $position < 1) {
|
6943 |
$positions [$index] = intval ($position * (count ($paragraph_positions) - 1) + 0.5);
|
6944 |
}
|
6945 |
+
elseif (is_numeric ($position) && $position > - 1 && $position < 0) {
|
6946 |
$positions [$index] = intval (count ($paragraph_positions) + $position * (count ($paragraph_positions) - 1) - 0.5);
|
6947 |
}
|
6948 |
+
elseif (is_numeric ($position) && $position <= - 1) {
|
6949 |
$positions [$index] = count ($paragraph_positions) + $position;
|
6950 |
}
|
6951 |
elseif ($position == 0) {
|
6952 |
$positions [$index] = mt_rand (0, count ($paragraph_positions) - 1);
|
6953 |
}
|
6954 |
+
else $positions [$index] = (int) $position - 1;
|
6955 |
}
|
6956 |
$positions = array_unique (array_merge ($positions, $new_positions));
|
6957 |
sort ($positions);
|
7865 |
}
|
7866 |
}
|
7867 |
}
|
7868 |
+
elseif (is_numeric ($position) && $position > 0 && $position < 1) {
|
7869 |
$positions [$index] = intval ($position * (count ($paragraph_positions) - 1) + 0.5);
|
7870 |
}
|
7871 |
+
elseif (is_numeric ($position) && $position > - 1 && $position < 0) {
|
7872 |
$positions [$index] = intval (count ($paragraph_positions) + $position * (count ($paragraph_positions) - 1) - 0.5);
|
7873 |
}
|
7874 |
+
elseif (is_numeric ($position) && $position <= - 1) {
|
7875 |
$positions [$index] = count ($paragraph_positions) + $position;
|
7876 |
}
|
7877 |
elseif ($position == 0) {
|
7878 |
$positions [$index] = mt_rand (0, count ($paragraph_positions) - 1);
|
7879 |
}
|
7880 |
+
else $positions [$index] = (int) $position - 1;
|
7881 |
}
|
7882 |
$positions = array_unique (array_merge ($positions, $new_positions));
|
7883 |
sort ($positions);
|
10248 |
return array ('type' => AI_CODE_UNKNOWN);
|
10249 |
}
|
10250 |
|
10251 |
+
public function import_rotation ($code, $extract_check_names = false){
|
10252 |
global $ai_expand_only_rotate_count_check, $ai_wp_data;
|
10253 |
|
10254 |
$data = array (
|
10268 |
$ai_expand_only_rotate_count_check = false;
|
10269 |
|
10270 |
if (strpos ($code, AD_CHECK_SEPARATOR) !== false) {
|
10271 |
+
if (!$extract_check_names) {
|
10272 |
+
return $data;
|
10273 |
+
}
|
10274 |
+
|
10275 |
+
if (function_exists ('ai_check_separators') && isset ($ai_wp_data [AI_SHORTCODES]['check'][0]['check']) && $ai_wp_data [AI_SHORTCODES]['check'][0]['check'] == 'statistics') {
|
10276 |
+
$check_parameters = $ai_wp_data [AI_SHORTCODES]['check'];
|
10277 |
+
|
10278 |
+
$options = explode (AD_CHECK_SEPARATOR, $code);
|
10279 |
+
$data ['options'] = array ();
|
10280 |
+
foreach ($options as $index => $option) {
|
10281 |
+
$option_code = trim ($option, "\n");
|
10282 |
+
$option_name = isset ($check_parameters [$index - 1]['name']) ? $check_parameters [$index - 1]['name'] : '';
|
10283 |
+
$option_index = isset ($check_parameters [$index - 1]['index']) && $check_parameters [$index - 1]['index'] != '' ? (int) $check_parameters [$index - 1]['index'] : $index;
|
10284 |
+
|
10285 |
+
// Skip option before first CHECK shortcode (always inserted)
|
10286 |
+
if ($option_index == 0) continue;
|
10287 |
+
|
10288 |
+
$data ['options'][$option_index - 1] = array ('name' => $option_name);
|
10289 |
+
}
|
10290 |
+
}
|
10291 |
+
|
10292 |
return $data;
|
10293 |
}
|
10294 |
|
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.14');
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
css/ai-settings.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#ai-data {
|
2 |
-
font-family: "2.7.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
@@ -65,7 +65,7 @@ hr {
|
|
65 |
|
66 |
/*.ui-button.ui-corner-all.ui-widget {*/
|
67 |
.ui-button.ui-corner-all.ui-widget:not(.ai-button-small), button.ai-button, button.ai-button2, input[type=submit] {
|
68 |
-
padding: .4em 1em;
|
69 |
border: 1px solid #d3d3d3;
|
70 |
border-radius: 4px;
|
71 |
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
|
@@ -76,7 +76,7 @@ hr {
|
|
76 |
/*.ai-button.ui-button.ui-corner-all.ui-widget {*/
|
77 |
/*.ai-button.ai-button-small.ui-button.ui-corner-all.ui-widget {*/
|
78 |
.ai-button.ai-button-small {
|
79 |
-
padding: 0;
|
80 |
border-radius: 4px;
|
81 |
cursor: pointer;
|
82 |
}
|
@@ -304,6 +304,20 @@ div.ai-chart-label {
|
|
304 |
display: none;
|
305 |
}
|
306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
div.ai-chart-container.versions div.ai-chart-label {
|
308 |
z-index: 1;
|
309 |
}
|
@@ -717,6 +731,11 @@ tr.ai-website-list.read-only .ai-website-key {
|
|
717 |
vertical-align: middle;
|
718 |
}
|
719 |
|
|
|
|
|
|
|
|
|
|
|
720 |
/* To overeride [class*=" icon-"], [class^=icon-] */
|
721 |
span.checkbox-icon {
|
722 |
width: 20px;
|
@@ -1796,8 +1815,7 @@ table.check-pages a span.dashicons {
|
|
1796 |
|
1797 |
/* Fix for some themes */
|
1798 |
#ai-settings select {
|
1799 |
-
|
1800 |
-
padding: 2px 24px 2px 5px;
|
1801 |
min-height: 26px;
|
1802 |
}
|
1803 |
|
1 |
#ai-data {
|
2 |
+
font-family: "2.7.14"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
65 |
|
66 |
/*.ui-button.ui-corner-all.ui-widget {*/
|
67 |
.ui-button.ui-corner-all.ui-widget:not(.ai-button-small), button.ai-button, button.ai-button2, input[type=submit] {
|
68 |
+
padding: .4em 1em !important;
|
69 |
border: 1px solid #d3d3d3;
|
70 |
border-radius: 4px;
|
71 |
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
|
76 |
/*.ai-button.ui-button.ui-corner-all.ui-widget {*/
|
77 |
/*.ai-button.ai-button-small.ui-button.ui-corner-all.ui-widget {*/
|
78 |
.ai-button.ai-button-small {
|
79 |
+
padding: 0 !important;
|
80 |
border-radius: 4px;
|
81 |
cursor: pointer;
|
82 |
}
|
304 |
display: none;
|
305 |
}
|
306 |
|
307 |
+
div.ai-chart-version-label {
|
308 |
+
position: absolute;
|
309 |
+
top: 13px;
|
310 |
+
right: 44px;
|
311 |
+
z-index: 202;
|
312 |
+
opacity: 0.5;
|
313 |
+
cursor: pointer;
|
314 |
+
display: none;
|
315 |
+
}
|
316 |
+
|
317 |
+
.ai-label-index {
|
318 |
+
cursor: pointer;
|
319 |
+
}
|
320 |
+
|
321 |
div.ai-chart-container.versions div.ai-chart-label {
|
322 |
z-index: 1;
|
323 |
}
|
731 |
vertical-align: middle;
|
732 |
}
|
733 |
|
734 |
+
.ai-colorpicker-alpha {
|
735 |
+
background-image: url("images/transparency-24.png");
|
736 |
+
}
|
737 |
+
|
738 |
+
|
739 |
/* To overeride [class*=" icon-"], [class^=icon-] */
|
740 |
span.checkbox-icon {
|
741 |
width: 20px;
|
1815 |
|
1816 |
/* Fix for some themes */
|
1817 |
#ai-settings select {
|
1818 |
+
padding: 2px 24px 2px 5px !important;
|
|
|
1819 |
min-height: 26px;
|
1820 |
}
|
1821 |
|
css/images/transparency-24.png
ADDED
Binary file
|
images/um-1.png
ADDED
Binary file
|
images/um-2.png
ADDED
Binary file
|
includes/js/ai-lists.js
CHANGED
@@ -937,7 +937,7 @@ jQuery (function ($) {
|
|
937 |
} else {
|
938 |
$(this).hide (); // .ai-list-data
|
939 |
|
940 |
-
if (!block_wrapping_div.find ('.ai-debug-block').length && block_wrapping_div.attr ('style').indexOf ('height:') == - 1) {
|
941 |
block_wrapping_div.hide ();
|
942 |
}
|
943 |
}
|
937 |
} else {
|
938 |
$(this).hide (); // .ai-list-data
|
939 |
|
940 |
+
if (!block_wrapping_div.find ('.ai-debug-block').length && block_wrapping_div [0].hasAttribute ('style') && block_wrapping_div.attr ('style').indexOf ('height:') == - 1) {
|
941 |
block_wrapping_div.hide ();
|
942 |
}
|
943 |
}
|
includes/js/ai-lists.min.js
CHANGED
@@ -18,10 +18,10 @@ R+"\n"+W);w.find(".ai-debug-name.ai-list-status").text(d?ai_front.visible:ai_fro
|
|
18 |
var C=(new Date).getTime()+Q,F=new Date(C),J=F.getDay();z.includes("-")||P.includes("-")||(z=(new Date(F.getFullYear(),F.getMonth(),F.getDate())).getTime()+Q,C-=z,0>C&&(C+=864E5));0==J?J=6:J--;z=C>=B&&C<r&&D.includes(J.toString());switch(w){case "B":z=!z}z||(d=!1);F=F.toISOString().split(".")[0].replace("T"," ");w=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");w.find(".ai-debug-name.ai-scheduling-info").text(F+" "+J+" current_time:"+Math.floor(C.toString()/1E3)+" start_date:"+Math.floor(B/
|
19 |
1E3).toString()+" ="+(C>=B).toString()+" end_date:"+Math.floor(r/1E3).toString()+" =:"+(C<r).toString()+" days:"+D.toString()+" =:"+D.includes(J.toString()).toString());w.find(".ai-debug-name.ai-scheduling-status").text(d?ai_front.visible:ai_front.hidden);d||0==U||(w.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),w.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+" = "+U))}if(h||!d&&N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});
|
20 |
d?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),"undefined"!=typeof a(this).data("code")&&(d=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(d),a(this).remove()):a(this).append(d),ai_process_element_lists(this))):g&&!z&&0!=U?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(d=b64d(a(this).data("fallback-code")),
|
21 |
-
a(this).append(d),ai_process_element_lists(this)):(a(this).hide()
|
22 |
-
e.css({position:""})):e[0].hasAttribute("style")&&-1==e.attr("style").indexOf("height:")&&e.hide()));a(this).attr("data-code","");a(this).attr("data-fallback-code","");e.removeClass("ai-list-block")})}};a(document).ready(function(c){setTimeout(function(){ai_process_lists();setTimeout(function(){H();if("function"==typeof ai_load_blocks){var l=function(G){"cmplzEnableScripts"!=G.type&&"all"!==G.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",
|
23 |
-
l)}},50);jQuery(".ai-debug-page-type").dblclick(function(){jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES");jQuery("#ai-iab-tcf-bar").show()});jQuery("#ai-iab-tcf-bar").click(function(){k("euconsent-v2");k("__lxG__consent__v2");k("__lxG__consent__v2_daisybit");k("__lxG__consent__v2_gdaisybit");k("CookieLawInfoConsent");k("cookielawinfo-checkbox-advertisement");k("cookielawinfo-checkbox-analytics");k("cookielawinfo-checkbox-necessary");k("complianz_policy_id");
|
24 |
-
k("cmplz_consent_status");k("cmplz_preferences");k("cmplz_statistics-anonymous");k("cmplz_choice");k("cmplz_banner-status");k("cmplz_functional");k("cmplz_policy_id");k("cmplz_statistics");k("moove_gdpr_popup");k("real_cookie_banner-blog:1-tcf");k("real_cookie_banner-blog:1");jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES DELETED")})},5)})});
|
25 |
function ai_process_element_lists(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);"function"==typeof ai_process_impressions&&
|
26 |
1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5)}
|
27 |
function getAllUrlParams(a){var n=a?a.split("?")[1]:window.location.search.slice(1);a={};if(n){n=n.split("#")[0];n=n.split("&");for(var E=0;E<n.length;E++){var u=n[E].split("="),H=void 0,v=u[0].replace(/\[\d*\]/,function(k){H=k.slice(1,-1);return""});u="undefined"===typeof u[1]?"":u[1];v=v.toLowerCase();u=u.toLowerCase();a[v]?("string"===typeof a[v]&&(a[v]=[a[v]]),"undefined"===typeof H?a[v].push(u):a[v][H]=u):a[v]=u}}return a};
|
18 |
var C=(new Date).getTime()+Q,F=new Date(C),J=F.getDay();z.includes("-")||P.includes("-")||(z=(new Date(F.getFullYear(),F.getMonth(),F.getDate())).getTime()+Q,C-=z,0>C&&(C+=864E5));0==J?J=6:J--;z=C>=B&&C<r&&D.includes(J.toString());switch(w){case "B":z=!z}z||(d=!1);F=F.toISOString().split(".")[0].replace("T"," ");w=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");w.find(".ai-debug-name.ai-scheduling-info").text(F+" "+J+" current_time:"+Math.floor(C.toString()/1E3)+" start_date:"+Math.floor(B/
|
19 |
1E3).toString()+" ="+(C>=B).toString()+" end_date:"+Math.floor(r/1E3).toString()+" =:"+(C<r).toString()+" days:"+D.toString()+" =:"+D.includes(J.toString()).toString());w.find(".ai-debug-name.ai-scheduling-status").text(d?ai_front.visible:ai_front.hidden);d||0==U||(w.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),w.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+" = "+U))}if(h||!d&&N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});
|
20 |
d?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),"undefined"!=typeof a(this).data("code")&&(d=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(d),a(this).remove()):a(this).append(d),ai_process_element_lists(this))):g&&!z&&0!=U?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(d=b64d(a(this).data("fallback-code")),
|
21 |
+
a(this).append(d),ai_process_element_lists(this)):(a(this).hide(),!e.find(".ai-debug-block").length&&e[0].hasAttribute("style")&&-1==e.attr("style").indexOf("height:")&&e.hide()),d=e.attr("data-ai"),"undefined"!==typeof d&&!1!==d&&(d=a(this).attr("fallback-tracking"),"undefined"!==typeof d&&!1!==d&&e.attr("data-ai-"+a(this).attr("fallback_level"),d))):(a(this).hide(),e.length&&(e.removeAttr("data-ai").removeClass("ai-track"),e.find(".ai-debug-block").length?(e.css({visibility:""}).removeClass("ai-close"),
|
22 |
+
e.hasClass("ai-remove-position")&&e.css({position:""})):e[0].hasAttribute("style")&&-1==e.attr("style").indexOf("height:")&&e.hide()));a(this).attr("data-code","");a(this).attr("data-fallback-code","");e.removeClass("ai-list-block")})}};a(document).ready(function(c){setTimeout(function(){ai_process_lists();setTimeout(function(){H();if("function"==typeof ai_load_blocks){var l=function(G){"cmplzEnableScripts"!=G.type&&"all"!==G.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",
|
23 |
+
l);jQuery(document).on("cmplz_event_marketing",l)}},50);jQuery(".ai-debug-page-type").dblclick(function(){jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES");jQuery("#ai-iab-tcf-bar").show()});jQuery("#ai-iab-tcf-bar").click(function(){k("euconsent-v2");k("__lxG__consent__v2");k("__lxG__consent__v2_daisybit");k("__lxG__consent__v2_gdaisybit");k("CookieLawInfoConsent");k("cookielawinfo-checkbox-advertisement");k("cookielawinfo-checkbox-analytics");k("cookielawinfo-checkbox-necessary");k("complianz_policy_id");
|
24 |
+
k("complianz_consent_status");k("cmplz_marketing");k("cmplz_consent_status");k("cmplz_preferences");k("cmplz_statistics-anonymous");k("cmplz_choice");k("cmplz_banner-status");k("cmplz_functional");k("cmplz_policy_id");k("cmplz_statistics");k("moove_gdpr_popup");k("real_cookie_banner-blog:1-tcf");k("real_cookie_banner-blog:1");jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES DELETED")})},5)})});
|
25 |
function ai_process_element_lists(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);"function"==typeof ai_process_impressions&&
|
26 |
1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5)}
|
27 |
function getAllUrlParams(a){var n=a?a.split("?")[1]:window.location.search.slice(1);a={};if(n){n=n.split("#")[0];n=n.split("&");for(var E=0;E<n.length;E++){var u=n[E].split("="),H=void 0,v=u[0].replace(/\[\d*\]/,function(k){H=k.slice(1,-1);return""});u="undefined"===typeof u[1]?"":u[1];v=v.toLowerCase();u=u.toLowerCase();a[v]?("string"===typeof a[v]&&(a[v]=[a[v]]),"undefined"===typeof H?a[v].push(u):a[v][H]=u):a[v]=u}}return a};
|
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;
|
@@ -2043,10 +2043,23 @@ jQuery(document).ready (function($) {
|
|
2043 |
adb = '&adb=1';
|
2044 |
}
|
2045 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2046 |
if ($("span#export-csv-button-"+block).hasClass ('on')) {
|
2047 |
$("span#export-csv-button-"+block).removeClass ('on');
|
2048 |
|
2049 |
-
var params = {'action': 'ai_ajax_backend', 'statistics': block,
|
|
|
|
|
|
|
|
|
|
|
|
|
2050 |
|
2051 |
var form = document.createElement("form");
|
2052 |
form.setAttribute("method", "get");
|
@@ -2068,7 +2081,7 @@ jQuery(document).ready (function($) {
|
|
2068 |
return;
|
2069 |
}
|
2070 |
|
2071 |
-
container.load (ajaxurl+"?action=ai_ajax_backend&statistics=" + block + "&start-date=" + start_date + "&end-date=" + end_date + delete_range + adb + "&ai_check=" + ai_nonce, function (response, status, xhr) {
|
2072 |
label.removeClass ('on');
|
2073 |
if ( status == "error" ) {
|
2074 |
var message = "Error downloading data: " + xhr.status + " " + xhr.statusText ;
|
@@ -2658,10 +2671,11 @@ jQuery(document).ready (function($) {
|
|
2658 |
|
2659 |
|
2660 |
if ($("input#block-bkg-color-"+tab).length != 0) {
|
2661 |
-
$("input#block-bkg-color-"+tab).colorpicker ({useAlpha: false, useHashPrefix: true, format: 'hex', fallbackColor: '#fffffe'}).on('colorpickerChange colorpickerCreate colorpickerUpdate', function (e) {
|
2662 |
-
|
|
|
2663 |
}).on ('input', function() {
|
2664 |
-
$("#block-color-" + tab).css ('background', $(this).val ());
|
2665 |
});
|
2666 |
$("input#block-bkg-color-"+tab).colorpicker ('setValue', $("input#block-bkg-color-" + tab).attr ('value'));
|
2667 |
}
|
@@ -4440,7 +4454,6 @@ jQuery(document).ready (function($) {
|
|
4440 |
}
|
4441 |
});
|
4442 |
|
4443 |
-
|
4444 |
$('#'+list_prefix+'-list-'+index).focusout (function () {
|
4445 |
var selection_container = $('#ms-'+element_name_prefix+'-select-'+index);
|
4446 |
if (selection_container.length && selection_container.is (':visible')) {
|
@@ -4490,7 +4503,8 @@ jQuery(document).ready (function($) {
|
|
4490 |
var selection_container = $('#ms-'+element_name_prefix+'-select-'+index);
|
4491 |
|
4492 |
if (selection_container.is(':visible')) {
|
4493 |
-
var list_items = list_element.attr ('value').split (',').map (Function.prototype.call, String.prototype.trim);
|
|
|
4494 |
|
4495 |
if (list_items [0] == '') {
|
4496 |
list_items = list_items.splice (1)
|
@@ -4833,6 +4847,31 @@ jQuery(document).ready (function($) {
|
|
4833 |
|
4834 |
$(container).removeClass ('not-configured');
|
4835 |
$(container).parent().find ('div.ai-chart-label').show ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4836 |
}
|
4837 |
}
|
4838 |
|
@@ -4857,6 +4896,12 @@ jQuery(document).ready (function($) {
|
|
4857 |
if (!$(this).hasClass ('hidden')) {
|
4858 |
$(this).attr ('style', '');
|
4859 |
configure_chart (this);
|
|
|
|
|
|
|
|
|
|
|
|
|
4860 |
}
|
4861 |
});
|
4862 |
}
|
@@ -6620,8 +6665,10 @@ jQuery(document).ready (function($) {
|
|
6620 |
var report_controls = $(this).parent ().parent ().parent ().parent ().find ('.ai-public-controls').hasClass ('on') ? '1' : '0';
|
6621 |
var report_range_name = $(this).parent ().parent ().parent ().parent ().find ('.custom-range-controls').attr ('range-name');
|
6622 |
var report_adb = report_data_elements [2];
|
6623 |
-
var
|
6624 |
-
|
|
|
|
|
6625 |
var report_id = b64e (report).replaceAll ('+', '.').replaceAll ('/', '_').replaceAll ('=', '-');
|
6626 |
var url = report_url_prefix + md5 (report).substring (0, 2) + report_id;
|
6627 |
|
1 |
+
var javascript_version = "2.7.14"
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
2043 |
adb = '&adb=1';
|
2044 |
}
|
2045 |
|
2046 |
+
var version = '';
|
2047 |
+
var version_index = 0;
|
2048 |
+
if ($('input#load-custom-range-' + block).hasClass ('ai-version')) {
|
2049 |
+
version_index = $('input#load-custom-range-' + block).attr ('data-version');
|
2050 |
+
version = '&version=' + version_index;
|
2051 |
+
}
|
2052 |
+
|
2053 |
if ($("span#export-csv-button-"+block).hasClass ('on')) {
|
2054 |
$("span#export-csv-button-"+block).removeClass ('on');
|
2055 |
|
2056 |
+
var params = {'action': 'ai_ajax_backend', 'statistics': block,
|
2057 |
+
'start-date': start_date,
|
2058 |
+
'end-date': end_date,
|
2059 |
+
'delete_range': delete_range == '' ? '' : 1,
|
2060 |
+
'adb': adb == '' ? '' : 1,
|
2061 |
+
'version': version == '' ? '' : version_index,
|
2062 |
+
'csv' : 1, 'ai_check': ai_nonce};
|
2063 |
|
2064 |
var form = document.createElement("form");
|
2065 |
form.setAttribute("method", "get");
|
2081 |
return;
|
2082 |
}
|
2083 |
|
2084 |
+
container.load (ajaxurl+"?action=ai_ajax_backend&statistics=" + block + "&start-date=" + start_date + "&end-date=" + end_date + delete_range + adb + version + "&ai_check=" + ai_nonce, function (response, status, xhr) {
|
2085 |
label.removeClass ('on');
|
2086 |
if ( status == "error" ) {
|
2087 |
var message = "Error downloading data: " + xhr.status + " " + xhr.statusText ;
|
2671 |
|
2672 |
|
2673 |
if ($("input#block-bkg-color-"+tab).length != 0) {
|
2674 |
+
// $("input#block-bkg-color-"+tab).colorpicker ({useAlpha: false, useHashPrefix: true, format: 'hex', fallbackColor: '#fffffe'}).on('colorpickerChange colorpickerCreate colorpickerUpdate', function (e) {
|
2675 |
+
$("input#block-bkg-color-"+tab).colorpicker ({useAlpha: true, useHashPrefix: true, fallbackColor: '#fffffe'}).on('colorpickerChange colorpickerCreate colorpickerUpdate', function (e) {
|
2676 |
+
$("#block-color-" + tab).css ('background-color', $(this).val ());
|
2677 |
}).on ('input', function() {
|
2678 |
+
$("#block-color-" + tab).css ('background-color', $(this).val ());
|
2679 |
});
|
2680 |
$("input#block-bkg-color-"+tab).colorpicker ('setValue', $("input#block-bkg-color-" + tab).attr ('value'));
|
2681 |
}
|
4454 |
}
|
4455 |
});
|
4456 |
|
|
|
4457 |
$('#'+list_prefix+'-list-'+index).focusout (function () {
|
4458 |
var selection_container = $('#ms-'+element_name_prefix+'-select-'+index);
|
4459 |
if (selection_container.length && selection_container.is (':visible')) {
|
4503 |
var selection_container = $('#ms-'+element_name_prefix+'-select-'+index);
|
4504 |
|
4505 |
if (selection_container.is(':visible')) {
|
4506 |
+
// var list_items = list_element.attr ('value').split (',').map (Function.prototype.call, String.prototype.trim);
|
4507 |
+
var list_items = list_element.val ().split (',').map (Function.prototype.call, String.prototype.trim);
|
4508 |
|
4509 |
if (list_items [0] == '') {
|
4510 |
list_items = list_items.splice (1)
|
4847 |
|
4848 |
$(container).removeClass ('not-configured');
|
4849 |
$(container).parent().find ('div.ai-chart-label').show ();
|
4850 |
+
$(container).parent().find ('div.ai-chart-version-label').show ();
|
4851 |
+
|
4852 |
+
$(container).parent().find ('div.ai-chart-version-label').click (function () {
|
4853 |
+
// Clear single version display
|
4854 |
+
var block = $(this).closest ('.ai-charts').attr ("id").replace ("statistics-elements-","");
|
4855 |
+
if ($('input#load-custom-range-' + block).hasClass ('ai-version')) {
|
4856 |
+
$('input#load-custom-range-' + block).removeClass ('ai-version');
|
4857 |
+
$('input#load-custom-range-' + block).removeAttr ('data-version');
|
4858 |
+
$("input#load-custom-range-" + block).click ();
|
4859 |
+
return;
|
4860 |
+
}
|
4861 |
+
});
|
4862 |
+
|
4863 |
+
var legend = $(container).parent ().find ('.ai-chart-legend');
|
4864 |
+
if (legend.length != 0) {
|
4865 |
+
legend.find ('div').css ('visibility', 'hidden');
|
4866 |
+
var version_indexes = legend.data ('versions');
|
4867 |
+
var text_index = 0;
|
4868 |
+
legend.find ('text').each (function () {
|
4869 |
+
$(this).addClass ('ai-label-index');
|
4870 |
+
$(this).attr ('data-label-index', version_indexes [text_index]);
|
4871 |
+
text_index ++;
|
4872 |
+
});
|
4873 |
+
legend.removeClass ('ai-chart-legend');
|
4874 |
+
}
|
4875 |
}
|
4876 |
}
|
4877 |
|
4896 |
if (!$(this).hasClass ('hidden')) {
|
4897 |
$(this).attr ('style', '');
|
4898 |
configure_chart (this);
|
4899 |
+
$(container).find ('.ai-label-index').click (function () {
|
4900 |
+
var block = $(this).closest ('.ai-chart').data ('block');
|
4901 |
+
var version_index = $(this).data ('label-index');
|
4902 |
+
$('input#load-custom-range-' + block).addClass ('ai-version').attr ('data-version', version_index);
|
4903 |
+
$("input#load-custom-range-" + block).click ();
|
4904 |
+
});
|
4905 |
}
|
4906 |
});
|
4907 |
}
|
6665 |
var report_controls = $(this).parent ().parent ().parent ().parent ().find ('.ai-public-controls').hasClass ('on') ? '1' : '0';
|
6666 |
var report_range_name = $(this).parent ().parent ().parent ().parent ().find ('.custom-range-controls').attr ('range-name');
|
6667 |
var report_adb = report_data_elements [2];
|
6668 |
+
var report_version = report_data_elements [3];
|
6669 |
+
if (report_version == '') report_version = '---';
|
6670 |
+
// var report_range = report_data_elements [2];
|
6671 |
+
var report = report_dates_block + report_controls + report_adb + report_range_name + report_version;
|
6672 |
var report_id = b64e (report).replaceAll ('+', '.').replaceAll ('/', '_').replaceAll ('=', '-');
|
6673 |
var url = report_url_prefix + md5 (report).substring (0, 2) + report_id;
|
6674 |
|
js/ad-inserter.min.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
var javascript_version="2.7.
|
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(
|
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
|
8 |
-
u.body.show()}else if(h(this).showBody){
|
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(
|
10 |
-
|
11 |
-
"")}if(!a.tooltip.blocked){x&&clearTimeout(x);z=null;var
|
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",
|
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,
|
19 |
-
function ii(a,h,k,l,m,p,
|
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"};
|
@@ -27,7 +27,7 @@ SyntaxHighlight.prototype.applySettings=function(){var a=this.editor,h=this.sess
|
|
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
|
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,k=jQuery("#editor-"+a);if("undefined"!=typeof ace&&0!=k.length&&"undefined"!==typeof k&&!1!==k){var l=ace.edit("editor-"+a);h=jQuery("#simple-editor-"+a).is(":checked")}return h?jQuery("#block-"+a).val():l.getSession().getValue()}
|
@@ -39,91 +39,91 @@ jQuery(document).ready(function(a){function h(b){a(".system-status").length&&(a(
|
|
39 |
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"!=
|
40 |
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]"),
|
41 |
"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-"+
|
42 |
-
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
|
43 |
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(),
|
44 |
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+=
|
45 |
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-"+
|
46 |
-
b);b=a("input#chart-end-date-"+b);var f=
|
47 |
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||
|
48 |
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,
|
49 |
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",
|
50 |
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==
|
51 |
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-"+
|
52 |
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-"+
|
53 |
-
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(),
|
54 |
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?
|
55 |
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(),
|
56 |
-
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"),
|
57 |
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-"+
|
58 |
-
b).is(":checked")?a("#default-insertion-"+b).show():a("#default-insertion-"+b).hide();syntax_highlighting&&k(b);
|
59 |
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&&
|
60 |
(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+
|
61 |
-
" .adsense-layout").css("visibility","visible")}}function
|
62 |
-
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");
|
63 |
a("#adb-page-redirection").show()}function V(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())};
|
64 |
a("#ai-loading").show();setTimeout(function(){open_window_post(ajaxurl,"_blank",d)},5);setTimeout(function(){a("#ai-loading").hide()},1E3)}function W(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 L(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");
|
65 |
-
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");
|
66 |
-
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
|
67 |
-
function(
|
68 |
-
d),
|
69 |
-
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-",
|
70 |
-
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");
|
71 |
-
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");
|
72 |
-
"");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=
|
73 |
-
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-"+
|
74 |
-
a("#tab-0 input[type=submit], #tab-0 button.ai-button").button().show();
|
75 |
-
ai_nonce,function(d,f,c){"error"==f?a("#ai-error-container").text(ai_admin.error+" "+c.status+": "+c.statusText).show():(a("#export_settings_0").attr("name","export_settings_0"),a("#export-switch-0").addClass("loaded"))})});a("#load-settings-0").change(function(d){d=d.target.files[0];var f=new FileReader;f.readAsText(d,"UTF-8");f.onload=function(c){c=c.target.result;a("#export_settings_0").val(c);
|
76 |
-
"export":0,file:1,ai_check:ai_nonce},f=document.createElement("form");f.setAttribute("method","get");f.setAttribute("action",ajaxurl);for(var c in d)if(d.hasOwnProperty(c)){var e=document.createElement("input");e.type="hidden";e.name=c;e.value=encodeURI(d[c]);f.appendChild(e)}document.body.appendChild(f);f.submit();document.body.removeChild(f)});a("input#process-php-h").change(function(){syntax_highlighting&&
|
77 |
-
k("a")});syntax_highlighting&&k("h");syntax_highlighting&&k("f");a("#block-a").length&&syntax_highlighting&&k("a");for(var b=1;b<=
|
78 |
-
a(this).removeClass("clicked"))});a("#simple-editor-h").is(":checked")&&(
|
79 |
-
a(this).removeClass("clicked"))});a("#simple-editor-f").is(":checked")&&(
|
80 |
-
|
81 |
-
a(this).removeClass("clicked"))});a("#simple-editor-a").is(":checked")&&(
|
82 |
-
"preview",{action:"ai_ajax_backend",preview:"adb",ai_check:ai_nonce,code:d,php:f})});a("#main-content-element-button").click(function(){var d=a("input#main-content-element").val(),f=a("#ai-settings").data("home-relative-url");open_popup_window_post(f,"width="+(screen.availWidth-
|
83 |
-
selector:d,input:"input#main-content-element"})});a("#custom-selectors-button").click(function(){var d=a("input#custom-selectors").val(),f=a("#ai-settings").data("home-relative-url");open_popup_window_post(f,"width="+(screen.availWidth-15)+",height="+(screen.availHeight-65)+",top="+
|
84 |
-
a("#disable-header-code").checkboxButton();a("#disable-footer-code").checkboxButton();a("#disable-js-code").checkboxButton();a("#disable-css-code").checkboxButton();a("#disable-html-code").checkboxButton();a("#disable-php-processing").checkboxButton();a("#disable-blocks").checkboxButton();
|
85 |
-
a("input#disable-
|
86 |
-
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});f.on("select",function(){var c=f.state().get("selection").first().toJSON();a("#report-header-image").val(c.url)})}f.open()});
|
87 |
-
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,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"),
|
88 |
-
e).click()},10)}))})})}function
|
89 |
-
AI_ABOVE_HEADER||e!=AI_ALIGNMENT_STICKY_LEFT&&e!=AI_ALIGNMENT_STICKY_RIGHT&&e!=AI_ALIGNMENT_STICKY_TOP&&e!=AI_ALIGNMENT_STICKY_BOTTOM&&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-",
|
90 |
-
|
91 |
-
b).change(function(){var c=a(this).attr("id").replace("bkg-image-url-","");
|
92 |
-
a(this).val())}).on("input",function(){var c=a(this).attr("id").replace("bkg-color-","");
|
93 |
-
b).length&&(a("input#block-bkg-color-"+b).colorpicker({useAlpha:!
|
94 |
-
a("input#
|
95 |
-
"");x(c)});a("
|
96 |
-
a(this).attr("id").replace("display-
|
97 |
-
b).change(function(){var c=a(this).attr("id").replace("scheduling-date-
|
98 |
-
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()});x(b);a("#exceptions-button-"+b).click(function(){var c=a(this).attr("id").replace("exceptions-button-","");a("#block-exceptions-"+c).toggle()});
|
99 |
-
"");a("#icons-css-code-"+c).toggle();a("#icons-css-code-"+c).is(":visible")?(
|
100 |
-
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,autoSize:!0});0!=a("#scheduling-weekdays-value-"+b).length&&(a("#scheduling-time-on-"+b).timepicker({timeFormat:timeFormat,
|
101 |
-
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,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-",
|
102 |
-
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-"+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-"+
|
103 |
-
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()):e==AI_ALIGNMENT_RIGHT?(a("#css-right-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-right-"+c).text()),a("select#block-alignment-"+
|
104 |
-
(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-"+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-"+
|
105 |
-
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-"+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?
|
106 |
-
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()):e==AI_ALIGNMENT_STICKY&&(a("#css-sticky-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-sticky-"+c).text()),a("select#block-alignment-"+
|
107 |
-
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=a(this).attr("id").replace("name-label-container-","");a("div#settings-"+c).is(":visible")&&!a("#name-edit-"+c).is(":visible")&&
|
108 |
-
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-",""),a("#name-label-"+e).show().text(a("#name-edit-"+e).val()),a("#name-edit-"+e).hide(),ignore_key=!1,c.preventDefault()
|
109 |
-
"");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")&&!a(this).hasClass("loaded")&&a("#export_settings_"+c).load(ajaxurl+"?action=ai_ajax_backend&export="+c+"&ai_check="+ai_nonce,
|
110 |
-
": "+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-"+c).toggle();a("div#settings-"+c).toggle();a("#tab-"+c+" .ai-toolbars .ai-settings").toggle();a("#ai-main-toolbar-"+c+" .ai-statistics").toggle();
|
111 |
-
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();V(c)});a("#export-csv-button-"+b).click(function(){var c=a(this).attr("id").tabIndex();W(c)});a("input#adb-statistics-button-"+b).checkboxButton().click(function(){var c=
|
112 |
-
c).click()},2)});L(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=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-"+
|
113 |
-
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-"+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():
|
114 |
-
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"),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-",
|
115 |
-
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")?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"),
|
116 |
-
c).val(),
|
117 |
-
n==AI_ALIGNMENT_STICKY_LEFT?
|
118 |
-
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"),La=a("select#bkg-repeat-"+c+" option:selected").attr("value");if(e)e=screen.availTop,
|
119 |
-
name:b64e(
|
120 |
-
"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||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");
|
121 |
-
b);M("taxonomy",b);M("id",b);S("url",b);S("url-parameter",b);S("cookie",b);S("referer",b);M("client",b);S("ip-address",b);M("country",b);M("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-"+c).toggle();before_update_selection_from_list=null};a("#country-city-"+b).click(function(){var c=a(this).attr("id").tabIndex();
|
122 |
-
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());city_selection_container_visible&&(before_update_selection_from_list=f,e.click())});a("#tracking-"+b).checkboxButton().click(function(){var c=
|
123 |
-
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-","")!=active_tab||a(this).hasClass("clicked")||(a(this).addClass("clicked"),a("#ai-tab-container .simple-editor-button").click(),
|
124 |
-
(
|
125 |
-
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=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-",
|
126 |
-
a("select#amazon-amp-"+b).change(function(){var c=a(this).attr("id").replace("amazon-amp-","");console.log("block",c);
|
127 |
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-","");c.preventDefault();if(!g){var g=wp.media({title:ai_admin.select_banner_image,button:{text:ai_admin.use_this_image},multiple:!1});
|
128 |
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,"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",
|
129 |
"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();a("div#tab-banner-"+c+" table.ai-settings-table").css("position","inherit");a(this).closest(".ai-banner").removeClass("ai-banner-top");
|
@@ -132,131 +132,133 @@ var c=a(this).attr("id").replace("import-code-","");a.post(ajaxurl,{action:"ai_a
|
|
132 |
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-"+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-"+
|
133 |
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-"+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"]));
|
134 |
"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=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);
|
135 |
-
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"]),
|
136 |
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,"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-"+
|
137 |
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"]=parseInt(a("select#adsense-type-"+c+" option:selected").attr("value"));g["adsense-size"]=parseInt(a("select#adsense-size-"+c+" option:selected").attr("value"));
|
138 |
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"));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"]=
|
139 |
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");var t={width:"",height:""};2==q.length&&(t={width:parseInt(q[0]),height:parseInt(q[1])});
|
140 |
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));a.post(ajaxurl,g).done(function(q){""!=q&&(q=JSON.parse(q),"undefined"!==typeof q&&
|
141 |
-
set_editor_text(c,q))}).fail(function(q,t,
|
142 |
-
b).click(function(){T(!1,!1,!0,!1)});a("#paste-block-"+b).click(function(){T(!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),
|
143 |
-
(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-","");
|
144 |
-
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();
|
145 |
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=a(this).attr("id").replace("close-button-sticky-","");a("select#close-button-"+
|
146 |
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-"+c).val(a(this).val())});a("#html-elements-button-"+b).click(function(){var c=
|
147 |
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-"+c})});a("#wait-for-button-"+b).click(function(){var c=
|
148 |
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-"+b).click(function(c){a(this).blur();
|
149 |
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-",""),e=a("#bkg-image-"+c),g=a(this).val();
|
150 |
-
""==g&&(e.hide(),a("div#sticky-background-"+c+" table.ai-settings-table").css("position","relative"));
|
151 |
-
" table.ai-settings-table").css("position","relative"))})});a("#tab-"+b+" .parallax-button").click(function(c){var e=a(this);e.blur();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();e.closest("tr").find(".parallax-image").val(n.url)})}g.open()})}function
|
152 |
-
f=parseInt(a("select#vertical-position-"+b+" option:selected").attr("value")),c=a("#horizontal-margin-"+b).val().trim(),e=a("#vertical-margin-"+b).val().trim(),g=parseInt(a("select#animation-"+b+" option:selected").attr("value")),n=a("input#background-"+b).is(":checked")?"1":"0",r=a("input#body-background-"+b).is(":checked")?"1":"0",q=b64e(a("input#bkg-color-"+b).val().trim()),t=b64e(a("input#bkg-image-url-"+b).val().trim()),
|
153 |
-
b+" option:selected").attr("value"));jQuery.get(ajaxurl+"?action=ai_ajax_backend&sticky_css="+b+("&h_pos="+d+"&v_pos="+f+"&h_mar="+c+"&v_mar="+e+"&anim="+g+"&bkg="+n+"&body_bkg="+r+"&bkg_col="+q+"&bkg_img="+t+"&bkg_size="+
|
154 |
-
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
|
155 |
[];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-"+
|
156 |
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,
|
157 |
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");
|
158 |
-
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);
|
159 |
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-"+
|
160 |
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-"+
|
161 |
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(),
|
162 |
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,
|
163 |
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",
|
164 |
-
"#555")})}function
|
165 |
-
""),
|
166 |
"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+"-"+
|
167 |
(f+1));set_editor_text(b,b64d(active_li.data("code")));c.closest(".ai-rotate").data("option",f+1)}}function M(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-"+
|
168 |
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=
|
169 |
-
a(q[0]).text(),q=q.splice(1));f.attr("data-message",t);f.html(q);
|
170 |
-
d);n.length&&n.is(":visible")&&c(a(this),b)})}}function
|
171 |
-
f);if(a("#ms-"+d+"-select-"+f).is(":visible")){var e=b.
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
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",
|
176 |
-
function(r){if(40===r.which)return g.$selectableUl.focus(),!1})},afterSelect:function(e){
|
177 |
-
d=d.filter(function(
|
178 |
-
(f=" "),d=d.split(f).map(Function.prototype.call,String.prototype.trim),clean_list_items=
|
179 |
-
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?
|
180 |
-
|
181 |
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"),
|
182 |
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");
|
183 |
-
a(b).parent().find("div.ai-chart-label").show()
|
184 |
-
"")
|
185 |
-
|
186 |
-
b.
|
187 |
-
active_tab+"
|
188 |
-
|
189 |
-
|
|
|
|
|
190 |
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 T(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=
|
191 |
-
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"),
|
192 |
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(){J(a(this),"id",999,active_tab)});c.find("[for]").each(function(){J(a(this),"for",999,active_tab)});c.find("[href]").each(function(){J(a(this),"href",999,active_tab)});c.find("[name]").each(function(){J(a(this),"name",
|
193 |
-
999,active_tab)});c.find("[class]").each(function(){J(a(this),"class",999,active_tab)});c.find("pre.ai-sidebars").text("");c.find("pre.ai-block-number").each(function(){var
|
194 |
-
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
|
195 |
-
a("#ai-list-table tr.ai-block-"+active_tab).addClass("ai-block-active")}function
|
196 |
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()),
|
197 |
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(),
|
198 |
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=
|
199 |
!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,
|
200 |
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");K("&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");K("&delete="+d)}}]})});a("#ai-website-list-table .ai-connect-website").click(function(){var b=
|
201 |
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():K("&connect="+d+f)});a("#ai-website-data .ai-ajax-error").dblclick(function(){a("#ai-remote-dbg-error-msg").toggle()});a("#ai-website-list-table label[title]").tooltip({track:!0,
|
202 |
-
delay:700,showURL:!1,showBody:" | ",fade:250})}function
|
203 |
d);ai_reload_list_function=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",
|
204 |
-
{action:"ai_ajax_backend",preview:d,ai_check:ai_nonce,read_only:1})});
|
205 |
(c="Error downloading website data: "+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");
|
206 |
-
var g=c.data("blocks");"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,
|
207 |
-
"error"==t?(q="Error downloading list data: "+
|
208 |
(b?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();
|
209 |
-
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,
|
210 |
-
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");
|
211 |
-
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
|
212 |
-
q).attr("default",q);
|
213 |
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: ",
|
214 |
-
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,
|
215 |
!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&&
|
216 |
(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:" | ",
|
217 |
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,
|
218 |
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: "+
|
219 |
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:" | ",
|
220 |
-
fade:250});a("#ads-txt-search").show();b&&setTimeout(function(){O()},100)})}function
|
221 |
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(""!=
|
222 |
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):
|
223 |
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);
|
224 |
-
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++)
|
225 |
-
(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?
|
226 |
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");
|
227 |
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")});
|
228 |
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="+
|
229 |
-
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&&(
|
230 |
-
function
|
231 |
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: "+
|
232 |
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",
|
233 |
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",
|
234 |
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}},
|
235 |
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,
|
236 |
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},
|
237 |
-
ticks:{props:{stroke:"#e0e0e0","stroke-width":0}}}}});shSettings.theme=a("#ai-data").attr("theme");var
|
238 |
-
api_string.length+4}"undefined"!=typeof
|
239 |
-
0)}else api_debug=0;if(debug){var
|
240 |
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: "+
|
241 |
-
javascript_version),
|
242 |
-
javascript_version),a("#javascript-warning").show());
|
243 |
-
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 />"+
|
244 |
-
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");
|
245 |
-
a("#ai-stars").click(function(){""!=a("#rating-value span").text()&&(a("#ai-rating-bar").css("display","inline-block"),a("#ai-stars").hide());
|
246 |
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();
|
247 |
a("#ai-rearrange-websites").removeClass("blue");a("#ai-manage-websites-container").is(":visible")&&K()});a("#ai-website-list-search").keyup(function(b){website_list_search_reload||(website_list_search_reload=!0,setTimeout(K,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(),
|
248 |
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,
|
249 |
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");
|
250 |
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="+
|
251 |
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)}));
|
252 |
-
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);
|
253 |
-
function(b){
|
254 |
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,
|
255 |
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")&&
|
256 |
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")});
|
257 |
-
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+
|
258 |
-
a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");K()});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()};K("&add=")});a("#ai-save-websites").click(function(){var b=
|
259 |
-
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()),
|
260 |
-
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");
|
261 |
-
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",
|
262 |
-
K())});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)};K("&connect=")}))});
|
1 |
+
var javascript_version="2.7.14",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(w){return a.data(w,"tooltip")}function k(w){h(this).delay?x=setTimeout(m,h(this).delay):m();N=!!h(this).track;a(document.body).bind("mousemove",p);p(w)}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 w=h(this).bodyHandler.call(this);w.nodeType||w.jquery?u.body.empty().append(w):u.body.html(w);
|
8 |
+
u.body.show()}else if(h(this).showBody){w=y.split(h(this).showBody);2==w.length?u.title.html(w.shift()).show():u.title.hide();u.body.empty();for(var A=0,E;E=w[A];A++)0<A&&u.body.append("<br/>"),u.body.append(E);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(w){if(!(a.tooltip.blocked||w&&"OPTION"==w.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,E=u.parent[0].offsetTop;
|
10 |
+
w&&(A=w.pageX+h(z).left,E=w.pageY+h(z).top,w="auto",h(z).positionLeft&&(w=a(window).width()-A,A="auto"),u.parent.css({left:A,right:w,top:E}));w=a(window).scrollLeft();var U=a(window).scrollTop(),V=a(window).width(),W=a(window).height(),L=u.parent[0];w+V<L.offsetLeft+L.offsetWidth&&(A-=L.offsetWidth+20+h(z).left,u.parent.css({left:A+"px"}).addClass("viewport-right"));U+W<L.offsetTop+L.offsetHeight&&(E-=L.offsetHeight+20+h(z).top,u.parent.css({top:E+"px"}).addClass("viewport-bottom"))}}function H(w){function A(){u.parent.removeClass(E.extraClass).hide().css("opacity",
|
11 |
+
"")}if(!a.tooltip.blocked){x&&clearTimeout(x);z=null;var E=h(this);E.fade?u.parent.is(":animated")?u.parent.stop().fadeTo(E.fade,0,A):u.parent.stop().fadeOut(E.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(w){w=a.extend({},a.tooltip.defaults,w);u.parent||(u.parent=a('<div id="'+w.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",w);this.tOpacity=u.parent.css("opacity");this.tooltipText=this.title;a(this).removeAttr("title");this.alt=""}).mouseover(l).mouseout(H).click(H)},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,H){return cmn(h&k|~h&l,a,h,m,p,H)}function gg(a,h,k,l,m,p,H){return cmn(h&l|k&~l,a,h,m,p,H)}function hh(a,h,k,l,m,p,H){return cmn(h^k^l,a,h,m,p,H)}
|
19 |
+
function ii(a,h,k,l,m,p,H){return cmn(k^(h|~l),a,h,m,p,H)}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"};
|
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 H=org_style.split(":");styles[p]=H[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,k=jQuery("#editor-"+a);if("undefined"!=typeof ace&&0!=k.length&&"undefined"!==typeof k&&!1!==k){var l=ace.edit("editor-"+a);h=jQuery("#simple-editor-"+a).is(":checked")}return h?jQuery("#block-"+a).val():l.getSession().getValue()}
|
39 |
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"!=
|
40 |
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]"),
|
41 |
"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-"+
|
42 |
+
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 H(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-"+
|
43 |
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(),
|
44 |
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+=
|
45 |
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-"+
|
46 |
+
b);b=a("input#chart-end-date-"+b);var f=H(d),c=H(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",
|
47 |
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||
|
48 |
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,
|
49 |
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",
|
50 |
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==
|
51 |
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-"+
|
52 |
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-"+
|
53 |
+
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-"+
|
54 |
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?
|
55 |
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(),
|
56 |
+
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-"+
|
57 |
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-"+
|
58 |
+
b).is(":checked")?a("#default-insertion-"+b).show():a("#default-insertion-"+b).hide();syntax_highlighting&&k(b);ba(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-"+
|
59 |
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&&
|
60 |
(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+
|
61 |
+
" .adsense-layout").css("visibility","visible")}}function w(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 E(b){debug&&
|
62 |
+
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 U(){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&&
|
63 |
a("#adb-page-redirection").show()}function V(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())};
|
64 |
a("#ai-loading").show();setTimeout(function(){open_window_post(ajaxurl,"_blank",d)},5);setTimeout(function(){a("#ai-loading").hide()},1E3)}function W(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 L(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");
|
65 |
+
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");var t="",v=0;a("input#load-custom-range-"+d).hasClass("ai-version")&&(v=a("input#load-custom-range-"+d).attr("data-version"),t="&version="+v);if(a("span#export-csv-button-"+
|
66 |
+
d).hasClass("on")){a("span#export-csv-button-"+d).removeClass("on");c={action:"ai_ajax_backend",statistics:d,"start-date":c,"end-date":e,delete_range:""==r?"":1,adb:""==q?"":1,version:""==t?"":v,csv:1,ai_check:ai_nonce};e=document.createElement("form");e.setAttribute("method","get");e.setAttribute("action",ajaxurl);for(var B in c)c.hasOwnProperty(B)&&(r=document.createElement("input"),r.type="hidden",r.name=B,r.value=encodeURI(c[B]),e.appendChild(r));document.body.appendChild(e);e.submit();document.body.removeChild(e);
|
67 |
+
f.removeClass("on")}else g.load(ajaxurl+"?action=ai_ajax_backend&statistics="+d+"&start-date="+c+"&end-date="+e+r+q+t+"&ai_check="+ai_nonce,function(F,D,X){f.removeClass("on");"error"==D?(F="Error downloading data: "+X.status+" "+X.statusText,a("div#load-error-"+d).html(F),debug&&console.log(F)):(a("span#export-pdf-button-"+d).show(),a("span#export-csv-button-"+d).show(),F=a("#ai-main-toolbar-"+d+" .public-report-button"),F.show(),D=g.find("span.ai-statistics-export-data.ai-public-report"),F.attr("report-data",
|
68 |
+
JSON.stringify(D.data("report"))),D.remove(),a("div#load-error-"+d).html(""),debug&&console.log("Custom statistics loaded: "+d),ca(g),g.find("label.ai-version-charts-button.not-configured").click(function(){var da=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 Y=P.find(".ai-chart.not-configured.hidden");Y.length&&(Y.each(function(){a(this).removeClass("hidden")}),da?ca(P):setTimeout(function(){ca(P)},
|
69 |
+
10))}),n&&g.find("label.ai-version-charts-button.not-configured").addClass("no-version-charts-delay").click(),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-",
|
70 |
+
"");var f=this,c=a("input#chart-start-date-"+d).val(),e=a("input#chart-end-date-"+d).val(),g="";""==c&&""==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");
|
71 |
+
a(f).addClass("delete");a("input#load-custom-range-"+d).click();a(f).removeClass("delete")}},{text:ai_admin.cancel,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");
|
72 |
+
a(this).closest(".custom-range-controls").attr("range-name","----");l();var d=a(this).attr("id").replace("chart-start-date-","");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=
|
73 |
+
a(this).closest(".custom-range-controls");d.find(".data-range").removeClass("selected");a(this).addClass("selected");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-"+
|
74 |
+
block).click()})}function la(){debug&&console.log("Configure tab: 0");a("#tab-0").addClass("configured");a("#tab-0 input[type=submit], #tab-0 button.ai-button").button().show();E("h");E("f");a("#block-a").length&&E("a");a("#ai-plugin-settings-tab-container").tabs();a("#ai-plugin-settings-tabs").show();a("#export-switch-0").checkboxButton().click(function(){a(".export-0").toggle();a("#export-container-0").is(":visible")||a("#export_settings_0").val(a("#export_settings_0").text());a("#export-container-0").is(":visible")&&
|
75 |
+
!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+" "+c.status+": "+c.statusText).show():(a("#export_settings_0").attr("name","export_settings_0"),a("#export-switch-0").addClass("loaded"))})});a("#load-settings-0").change(function(d){d=d.target.files[0];var f=new FileReader;f.readAsText(d,"UTF-8");f.onload=function(c){c=c.target.result;a("#export_settings_0").val(c);
|
76 |
+
jQuery("#load-settings-0").val("")}});a("#save-settings-0").click(function(){var d={action:"ai_ajax_backend","export":0,file:1,ai_check:ai_nonce},f=document.createElement("form");f.setAttribute("method","get");f.setAttribute("action",ajaxurl);for(var c in d)if(d.hasOwnProperty(c)){var e=document.createElement("input");e.type="hidden";e.name=c;e.value=encodeURI(d[c]);f.appendChild(e)}document.body.appendChild(f);f.submit();document.body.removeChild(f)});a("input#process-php-h").change(function(){syntax_highlighting&&
|
77 |
+
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<=ma;b++)M("group-country",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");
|
78 |
+
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"));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");
|
79 |
+
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"));a("#process-php-f").checkboxButton();a("#tracking").checkboxButton();L(0);a("input#statistics-button-0").checkboxButton().click(function(){a("div#statistics-container-0").toggle();a("span#export-pdf-button-0").toggle();
|
80 |
+
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(){V(0)});a("#export-csv-button-0").click(function(){W(0)});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");
|
81 |
+
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();U();a("select#adb-action").change(function(){U()});a("#preview-button-adb").button({}).show().click(function(){a(this).blur();var d=b64e(get_editor_text("a")),
|
82 |
+
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=a("input#main-content-element").val(),f=a("#ai-settings").data("home-relative-url");open_popup_window_post(f,"width="+(screen.availWidth-
|
83 |
+
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=a("#ai-settings").data("home-relative-url");open_popup_window_post(f,"width="+(screen.availWidth-15)+",height="+(screen.availHeight-65)+",top="+
|
84 |
+
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();a("#disable-html-code").checkboxButton();a("#disable-php-processing").checkboxButton();a("#disable-blocks").checkboxButton();
|
85 |
+
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")});a("input#disable-html-code").change(function(){a("#ai-page-html").toggleClass("ai-page-code-disabled")});
|
86 |
+
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});f.on("select",function(){var c=f.state().get("selection").first().toJSON();a("#report-header-image").val(c.url)})}f.open()});
|
87 |
+
a("#tab-0 .adsense-list").click(function(){a(this).blur();ea()});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,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"),
|
88 |
+
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 fa(b){debug&&console.log("Configure tab:",b);a("#tab-"+b).addClass("configured");a("#tab-"+b+" input[type=submit], #tab-"+b+" button.ai-button").button().show();E(b);a("select#insertion-type-"+b).change(function(){var c=a(this).attr("id").tabIndex();x(c);na(c)});a("select#block-alignment-"+
|
89 |
+
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&&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-",
|
90 |
+
"");I(c)});a("select#horizontal-position-"+b).change(function(){var c=a(this).attr("id").replace("horizontal-position-","");I(c);x(c)});a("input#horizontal-margin-"+b).change(function(){var c=a(this).attr("id").replace("horizontal-margin-","");I(c)});a("input#vertical-margin-"+b).change(function(){var c=a(this).attr("id").replace("vertical-margin-","");I(c)});a("select#animation-"+b).change(function(){var c=a(this).attr("id").replace("animation-","");I(c)});a("input#background-"+b).change(function(){var c=
|
91 |
+
a(this).attr("id").replace("background-","");ba(c);I(c);x(c)});a("select#animation-"+b).change(function(){var c=a(this).attr("id").replace("animation-","");I(c)});a("input#bkg-image-url-"+b).change(function(){var c=a(this).attr("id").replace("bkg-image-url-","");I(c)});a("input#bkg-color-"+b).change(function(){var c=a(this).attr("id").replace("bkg-color-","");I(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",
|
92 |
+
function(c){c=a(this).attr("id").replace("bkg-color-","");I(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-","");I(c);a("#sticky-background-"+c).find(".banner-preview").css("background",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-","");I(c);x(c)});
|
93 |
+
a("select#bkg-size-"+b).change(function(){var c=a(this).attr("id").replace("bkg-size-","");I(c);x(c)});0!=a("input#block-bkg-color-"+b).length&&(a("input#block-bkg-color-"+b).colorpicker({useAlpha:!0,useHashPrefix:!0,fallbackColor:"#fffffe"}).on("colorpickerChange colorpickerCreate colorpickerUpdate",function(c){a("#block-color-"+b).css("background-color",a(this).val())}).on("input",function(){a("#block-color-"+b).css("background-color",a(this).val())}),a("input#block-bkg-color-"+b).colorpicker("setValue",
|
94 |
+
a("input#block-bkg-color-"+b).attr("value")));a("#block-color-"+b).click(function(){a("input#block-bkg-color-"+b).focus()});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-","");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-",
|
95 |
+
"");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-","");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=
|
96 |
+
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-","");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-"+
|
97 |
+
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=a(this).attr("id").replace("scheduling-time-off-","");z(c)});a("#scheduling-weekdays-"+b).click(function(){a(this).attr("id").replace("scheduling-weekdays-",
|
98 |
+
"");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()});x(b);a("#exceptions-button-"+b).click(function(){var c=a(this).attr("id").replace("exceptions-button-","");a("#block-exceptions-"+c).toggle()});
|
99 |
+
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-"+c).toggle()});a("#clearance-button-"+b).click(function(){var c=a(this).attr("id").replace("clearance-button-","");a("#paragraph-clearance-"+
|
100 |
+
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,autoSize:!0});0!=a("#scheduling-weekdays-value-"+b).length&&(a("#scheduling-time-on-"+b).timepicker({timeFormat:timeFormat,
|
101 |
+
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,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-",
|
102 |
+
"");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-"+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-"+
|
103 |
+
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()):e==AI_ALIGNMENT_RIGHT?(a("#css-right-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-right-"+c).text()),a("select#block-alignment-"+
|
104 |
+
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-"+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-"+
|
105 |
+
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-"+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?
|
106 |
+
(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()):e==AI_ALIGNMENT_STICKY&&(a("#css-sticky-"+c).hide(),a("#custom-css-"+c).show().val(a("#css-sticky-"+c).text()),a("select#block-alignment-"+
|
107 |
+
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=a(this).attr("id").replace("name-label-container-","");a("div#settings-"+c).is(":visible")&&!a("#name-edit-"+c).is(":visible")&&
|
108 |
+
(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-",""),a("#name-label-"+e).show().text(a("#name-edit-"+e).val()),a("#name-edit-"+e).hide(),ignore_key=!1,c.preventDefault(),
|
109 |
+
!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")&&!a(this).hasClass("loaded")&&a("#export_settings_"+c).load(ajaxurl+"?action=ai_ajax_backend&export="+c+"&ai_check="+ai_nonce,
|
110 |
+
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-"+c).toggle();a("div#settings-"+c).toggle();a("#tab-"+c+" .ai-toolbars .ai-settings").toggle();a("#ai-main-toolbar-"+c+" .ai-statistics").toggle();
|
111 |
+
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();V(c)});a("#export-csv-button-"+b).click(function(){var c=a(this).attr("id").tabIndex();W(c)});a("input#adb-statistics-button-"+b).checkboxButton().click(function(){var c=
|
112 |
+
a(this).attr("id");c=c.replace("adb-statistics-button-","");setTimeout(function(){a("input#load-custom-range-"+c).click()},2)});L(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=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-"+
|
113 |
+
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-"+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():
|
114 |
+
(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"),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-",
|
115 |
+
"");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")?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"),
|
116 |
+
q=a("select#vertical-position-"+c+" option:selected").attr("value"),t=a("#horizontal-margin-"+c).val(),v=a("#vertical-margin-"+c).val(),B=a("select#animation-"+c+" option:selected").attr("value"),F=a("#custom-css-"+c).val(),D="";n==AI_ALIGNMENT_DEFAULT?D=a("#css-none-"+c).text():n==AI_ALIGNMENT_CUSTOM_CSS?(D=F,e=is_sticky(F)):n==AI_ALIGNMENT_LEFT?D=a("#css-left-"+c).text():n==AI_ALIGNMENT_RIGHT?D=a("#css-right-"+c).text():n==AI_ALIGNMENT_CENTER?D=a("#css-center-"+c).text():n==AI_ALIGNMENT_FLOAT_LEFT?
|
117 |
+
D=a("#css-float-left-"+c).text():n==AI_ALIGNMENT_FLOAT_RIGHT?D=a("#css-float-right-"+c).text():n==AI_ALIGNMENT_STICKY_LEFT?D=a("#css-sticky-left-"+c).text():n==AI_ALIGNMENT_STICKY_RIGHT&&(D=a("#css-sticky-right-"+c).text());n==AI_ALIGNMENT_STICKY_TOP?D=a("#css-sticky-top-"+c).text():n==AI_ALIGNMENT_STICKY_BOTTOM?D=a("#css-sticky-bottom-"+c).text():n==AI_ALIGNMENT_STICKY&&(D=update_sticky_margins(a("#css-sticky-"+c).text(),t,v),e=!0);var X=a("#name-label-"+c).text(),da=get_editor_text(c),P=a("input#process-php-"+
|
118 |
+
c).is(":checked")?1:0,Y=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"),La=a("select#bkg-repeat-"+c+" option:selected").attr("value");if(e)e=screen.availTop,oa=screen.availLeft,pa=screen.availWidth,qa=screen.availHeight;else{e=
|
119 |
+
screen.height/2-410;var oa=100,pa=820,qa=820}c={action:"ai_ajax_backend",preview:c,ai_check:ai_nonce,name:b64e(X),code:b64e(da),alignment:btoa(n),horizontal:btoa(r),vertical:btoa(q),horizontal_margin:btoa(t),vertical_margin:btoa(v),animation:btoa(B),alignment_css:btoa(D),custom_css:btoa(F),php:P,label:Y,close:Fa,background:Ga,body_background:Ha,background_image:btoa(Ia),background_color:btoa(Ja),background_size:btoa(Ka),background_repeat:btoa(La),iframe:g};open_popup_window_post(ajaxurl,"width="+
|
120 |
+
pa+",height="+qa+",top="+e+",left="+oa+",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||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");
|
121 |
+
c=c.replace("iframe-preview-button-","");a("#preview-button-"+c).attr("iframe","1").click()});M("category",b);M("tag",b);M("taxonomy",b);M("id",b);S("url",b);S("url-parameter",b);S("cookie",b);S("referer",b);M("client",b);S("ip-address",b);M("country",b);M("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-"+c).toggle();before_update_selection_from_list=null};a("#country-city-"+b).click(function(){var c=a(this).attr("id").tabIndex();
|
122 |
+
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());city_selection_container_visible&&(before_update_selection_from_list=f,e.click())});a("#tracking-"+b).checkboxButton().click(function(){var c=
|
123 |
+
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-","")!=active_tab||a(this).hasClass("clicked")||(a(this).addClass("clicked"),a("#ai-tab-container .simple-editor-button").click(),
|
124 |
+
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-"+b).click(function(){a(this).find(".checkbox-icon").hasClass("on")||(a("label.rotation-button").each(function(){a(this).find(".checkbox-icon").hasClass("on")&&
|
125 |
+
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=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-",
|
126 |
+
"");N(c)});a("select#amazon-amp-"+b).change(function(){var c=a(this).attr("id").replace("amazon-amp-","");console.log("block",c);w(c)});N(b);w(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")});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")?
|
127 |
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-","");c.preventDefault();if(!g){var g=wp.media({title:ai_admin.select_banner_image,button:{text:ai_admin.use_this_image},multiple:!1});
|
128 |
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,"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",
|
129 |
"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();a("div#tab-banner-"+c+" table.ai-settings-table").css("position","inherit");a(this).closest(".ai-banner").removeClass("ai-banner-top");
|
132 |
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-"+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-"+
|
133 |
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-"+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"]));
|
134 |
"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=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);
|
135 |
+
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"]),w(c)}}}).fail(function(e,g,n){console.log("AI IMPORT CODE ERROR:",e.status,e.statusText);a("#ai-error-container").text(ai_admin.error+" "+e.status+": "+e.statusText).show()}).always(function(){a("#import-code-"+
|
136 |
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,"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-"+
|
137 |
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"]=parseInt(a("select#adsense-type-"+c+" option:selected").attr("value"));g["adsense-size"]=parseInt(a("select#adsense-size-"+c+" option:selected").attr("value"));
|
138 |
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"));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"]=
|
139 |
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");var t={width:"",height:""};2==q.length&&(t={width:parseInt(q[0]),height:parseInt(q[1])});
|
140 |
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));a.post(ajaxurl,g).done(function(q){""!=q&&(q=JSON.parse(q),"undefined"!==typeof q&&
|
141 |
+
set_editor_text(c,q))}).fail(function(q,t,v){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(){T(!0,!0,!0,!0)});a("#copy-block-"+b).click(function(){Ma()});a("#paste-name-"+b).click(function(){T(!0,!1,!1,!1)});a("#paste-code-"+b).click(function(){T(!1,!0,!1,!1)});a("#paste-settings-"+
|
142 |
+
b).click(function(){T(!1,!1,!0,!1)});a("#paste-block-"+b).click(function(){T(!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),ha(c,1),g.tabs("option","active",0),a("input[name=ai_save]").css("color","#f00"),setTimeout(function(){Na(c)},5)):
|
143 |
+
(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-","");ha(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-"+b).click(function(){var c=a(this).attr("id").tabIndex(),e=a(this).next().find("span");e.toggleClass("on");
|
144 |
+
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();ea()});a("select#html-element-insertion-"+b).change(function(){a("select#html-element-insertion-"+b+" option:selected").attr("value")==AI_HTML_INSERTION_SEREVR_SIDE?
|
145 |
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=a(this).attr("id").replace("close-button-sticky-","");a("select#close-button-"+
|
146 |
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-"+c).val(a(this).val())});a("#html-elements-button-"+b).click(function(){var c=
|
147 |
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-"+c})});a("#wait-for-button-"+b).click(function(){var c=
|
148 |
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-"+b).click(function(c){a(this).blur();
|
149 |
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-",""),e=a("#bkg-image-"+c),g=a(this).val();
|
150 |
+
""==g&&(e.hide(),a("div#sticky-background-"+c+" table.ai-settings-table").css("position","relative"));I(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",""),a("div#sticky-background-"+c+
|
151 |
+
" table.ai-settings-table").css("position","relative"))})});a("#tab-"+b+" .parallax-button").click(function(c){var e=a(this);e.blur();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();e.closest("tr").find(".parallax-image").val(n.url)})}g.open()})}function I(b){var d=parseInt(a("select#horizontal-position-"+b+" option:selected").attr("value")),
|
152 |
+
f=parseInt(a("select#vertical-position-"+b+" option:selected").attr("value")),c=a("#horizontal-margin-"+b).val().trim(),e=a("#vertical-margin-"+b).val().trim(),g=parseInt(a("select#animation-"+b+" option:selected").attr("value")),n=a("input#background-"+b).is(":checked")?"1":"0",r=a("input#body-background-"+b).is(":checked")?"1":"0",q=b64e(a("input#bkg-color-"+b).val().trim()),t=b64e(a("input#bkg-image-url-"+b).val().trim()),v=parseInt(a("select#bkg-size-"+b+" option:selected").attr("value")),B=parseInt(a("select#bkg-repeat-"+
|
153 |
+
b+" option:selected").attr("value"));jQuery.get(ajaxurl+"?action=ai_ajax_backend&sticky_css="+b+("&h_pos="+d+"&v_pos="+f+"&h_mar="+c+"&v_mar="+e+"&anim="+g+"&bkg="+n+"&body_bkg="+r+"&bkg_col="+q+"&bkg_img="+t+"&bkg_size="+v+"&bkg_rpt="+B)+"&ai_check="+ai_nonce,function(F){""!=F&&a("#css-sticky-"+b+" .ai-sticky-css").text(F)});parseInt(n)?a("#sticky-position-"+b).addClass("ai-background"):a("#sticky-position-"+b).removeClass("ai-background");ba(b)}function ba(b){a("#sticky-scroll-warning-"+b).hide();
|
154 |
+
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=
|
155 |
[];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-"+
|
156 |
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,
|
157 |
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");
|
158 |
+
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);ha(b,e);d.find("ul li").each(function(g){g<
|
159 |
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-"+
|
160 |
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-"+
|
161 |
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(),
|
162 |
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,
|
163 |
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",
|
164 |
+
"#555")})}function ha(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-",
|
165 |
+
""),v=q.data("option"),B=a(this).attr("id").replace("option-"+t+"-","");q.data("option",B);debug&&console.log("OPTION CHANGE:",v,"=>",B);a("#option-"+t+"-"+v).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",
|
166 |
"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+"-"+
|
167 |
(f+1));set_editor_text(b,b64d(active_li.data("code")));c.closest(".ai-rotate").data("option",f+1)}}function M(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-"+
|
168 |
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=
|
169 |
+
a(q[0]).text(),q=q.splice(1));f.attr("data-message",t);f.html(q);ra(f,b,g,d);a("#ms-"+b+"-select-"+d).find(".filter-message").text(t);c(a("#"+g+"-list-"+d),b)}}).fail(function(q,t,v){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 ra(f,b,g,d)});a("#"+g+"-list-"+d).focusout(function(){var n=a("#ms-"+b+"-select-"+
|
170 |
+
d);n.length&&n.is(":visible")&&c(a(this),b)})}}function sa(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(v){return-1===t.indexOf(v)})};var f=b.attr("id").replace(/^\D+/g,""),c=a("#"+d+"-select-"+
|
171 |
+
f);if(a("#ms-"+d+"-select-"+f).is(":visible")){var e=b.val().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,String.prototype.toUpperCase):
|
172 |
+
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!=n&&(g=e.diff(n));null!=g&&
|
173 |
+
(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",t);c.empty();c.removeClass("multi-select");
|
174 |
+
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 ra(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="'+
|
175 |
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",
|
176 |
+
function(r){if(40===r.which)return g.$selectableUl.focus(),!1})},afterSelect:function(e){sa(this,d,f)},afterDeselect:function(e){sa(this,d,f)}})}function S(b,d){var f=a("#"+b+"-editor-"+d),c=a("#"+b+"-list-"+d);0!==f.length&&(a("#"+b+"-button-"+d).click(function(){ta(c,b,!0)}),f.focusout(function(){ua(f,b)}),c.focusout(function(){f.is(":visible")&&ta(a(this),b,!1)}))}function va(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");
|
177 |
+
d=d.filter(function(v,B,F){return F.indexOf(v)===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 ta(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(",")&&
|
178 |
+
(f=" "),d=d.split(f).map(Function.prototype.call,String.prototype.trim),clean_list_items=va(b,d),c.val(clean_list_items.join("\n"))):ua(c,d)}function ua(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=va(c,f);c.attr("value",clean_list_items.join(", "))}function ia(){debug&&console.log("");if(debug){var b=(new Date).getTime();console.log("since last time: "+((b-ja)/1E3).toFixed(3))}debug&&
|
179 |
+
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?fa(d):la();debug&&(d=(new Date).getTime(),console.log("time: "+((d-b)/1E3).toFixed(3)),console.log("TIME: "+((d-Z)/1E3).toFixed(3)),
|
180 |
+
ja=d);0!=tabs_to_configure.length?0!=ai_tab_setup_delay&&setTimeout(ia,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(v){128==v?f.push(e[9]):f.push(e[v])})}c=
|
181 |
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"),
|
182 |
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");
|
183 |
+
a(b).parent().find("div.ai-chart-label").show();a(b).parent().find("div.ai-chart-version-label").show();a(b).parent().find("div.ai-chart-version-label").click(function(){var v=a(this).closest(".ai-charts").attr("id").replace("statistics-elements-","");a("input#load-custom-range-"+v).hasClass("ai-version")&&(a("input#load-custom-range-"+v).removeClass("ai-version"),a("input#load-custom-range-"+v).removeAttr("data-version"),a("input#load-custom-range-"+v).click())});g=a(b).parent().find(".ai-chart-legend");
|
184 |
+
if(0!=g.length){g.find("div").css("visibility","hidden");var q=g.data("versions"),t=0;g.find("text").each(function(){a(this).addClass("ai-label-index");a(this).attr("data-label-index",q[t]);t++});g.removeClass("ai-chart-legend")}}}}function wa(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()&&
|
185 |
+
(a("#ai-rating-bar").hide(),a("#ai-stars").show())})}function ca(b){a(b).find(".ai-chart.not-configured").each(function(){a(this).hasClass("hidden")||(a(this).attr("style",""),Ra(this),a(b).find(".ai-label-index").click(function(){var d=a(this).closest(".ai-chart").data("block"),f=a(this).data("label-index");a("input#load-custom-range-"+d).addClass("ai-version").attr("data-version",f);a("input#load-custom-range-"+d).click()}))})}function J(b,d,f,c){var e=b.attr(d);e.substr(-f.toString().length)==
|
186 |
+
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"):b.find("input[name]:checkbox").eq(d).removeAttr("checked").next("label").find(".checkbox-icon").removeClass("on")});
|
187 |
+
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");b.find("select[name]").eq(d).find("option[value = '"+f+"']").attr("selected",!0)});a("div#tab-"+
|
188 |
+
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-"+active_tab+" table.ai-lists tr").each(function(d){a(this).is(":visible")?b.find("table.ai-lists tr").eq(d).show():
|
189 |
+
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"):b.find("table.ai-lists tr").eq(d).removeClass("list-items")});
|
190 |
+
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,function(c){debug&&console.log("AI BLOCK LOADED");var e=
|
191 |
+
a("#ai-clipboard");e.html(a("div#tab-"+b,c).html());e.find("[id]").each(function(){J(a(this),"id",b,999)});e.find("[for]").each(function(){J(a(this),"for",b,999)});e.find("[href]").each(function(){J(a(this),"href",b,999)});e.find("[name]").each(function(){J(a(this),"name",b,999)});e.find("[class]").each(function(){J(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,
|
192 |
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 T(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=
|
193 |
+
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"),v=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",
|
194 |
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(){J(a(this),"id",999,active_tab)});c.find("[for]").each(function(){J(a(this),"for",999,active_tab)});c.find("[href]").each(function(){J(a(this),"href",999,active_tab)});c.find("[name]").each(function(){J(a(this),"name",
|
195 |
+
999,active_tab)});c.find("[class]").each(function(){J(a(this),"class",999,active_tab)});c.find("pre.ai-sidebars").text("");c.find("pre.ai-block-number").each(function(){var F=a(this).text().replace(999,active_tab);a(this).text(F)});c.find("#exceptions-button-container-"+active_tab).html(v);c.find("#block-exceptions-"+active_tab).html(B);fa(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"));
|
196 |
+
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 xa(){a("#ai-list-table tr.ai-block-list").removeClass("ai-block-active");
|
197 |
+
a("#ai-list-table tr.ai-block-"+active_tab).addClass("ai-block-active")}function ya(){xa();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(ia,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");
|
198 |
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()),
|
199 |
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(),
|
200 |
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=
|
201 |
!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,
|
202 |
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");K("&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");K("&delete="+d)}}]})});a("#ai-website-list-table .ai-connect-website").click(function(){var b=
|
203 |
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():K("&connect="+d+f)});a("#ai-website-data .ai-ajax-error").dblclick(function(){a("#ai-remote-dbg-error-msg").toggle()});a("#ai-website-list-table label[title]").tooltip({track:!0,
|
204 |
+
delay:700,showURL:!1,showBody:" | ",fade:250})}function za(){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);ya()});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="+
|
205 |
d);ai_reload_list_function=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",
|
206 |
+
{action:"ai_ajax_backend",preview:d,ai_check:ai_nonce,read_only:1})});xa();b.disableSelection();a("#ai-list-data td[title]").tooltip({track:!0,delay:700,showURL:!1,showBody:" | ",fade:250})}function K(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?
|
207 |
(c="Error downloading website data: "+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");
|
208 |
+
var g=c.data("blocks");"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,v){a("#ai-loading").hide();
|
209 |
+
"error"==t?(q="Error downloading list data: "+v.status+" "+v.statusText,r.html(q),debug&&console.log(q)):(za(),"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="+
|
210 |
(b?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();
|
211 |
+
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,v,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="";ka(authorization_code)})):a("#adsense-authorization-code",c).length?(a("#adsense-list-controls").hide(),
|
212 |
+
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");ka(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,
|
213 |
+
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 v=t["error-message"];if(""==v){t=t.code;debug&&console.log(t);v=a("#ai-clipboard-template");var B=a("#ai-clipboard");B.html(v.html());B.find("input#name-edit-999").attr("value",
|
214 |
+
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:",v)}).fail(function(t,v,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=
|
215 |
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: ",
|
216 |
+
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,v){console.log("Error downloading AdSense code: "+q.status+" "+q.statusText)}).always(function(){a("#ai-loading").hide()})}),c.disableSelection())})}function O(){ads_txt_reload=
|
217 |
!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&&
|
218 |
(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:" | ",
|
219 |
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,
|
220 |
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: "+
|
221 |
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:" | ",
|
222 |
+
fade:250});a("#ads-txt-search").show();b&&setTimeout(function(){O()},100)})}function na(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-"+
|
223 |
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(""!=
|
224 |
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):
|
225 |
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);
|
226 |
+
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++)na(e)}})}function Aa(){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(ia,3*ai_tab_setup_delay);b=16;0!=active_tab&&
|
227 |
+
(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?la():fa(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),ya())});a(".ai-plugin-tab").click(function(){active_tab_0=
|
228 |
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");
|
229 |
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")});
|
230 |
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="+
|
231 |
+
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&&(ja=Z=(new Date).getTime()),Aa(),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())})}
|
232 |
+
function ka(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 ea(){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 Ba(){var b=
|
233 |
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: "+
|
234 |
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",
|
235 |
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",
|
236 |
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}},
|
237 |
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,
|
238 |
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},
|
239 |
+
ticks:{props:{stroke:"#e0e0e0","stroke-width":0}}}}});shSettings.theme=a("#ai-data").attr("theme");var ma=0,G=a("#ai-data-2").attr("geo_groups");"undefined"!=typeof G&&(ma=parseInt(G));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 Ca=a("#ai-data-2").attr("api_check");G=0;try{G=b64d(api_string).length}catch(b){G=
|
240 |
+
api_string.length+4}"undefined"!=typeof Ca&&0!=G&&4!=G&&(35>G||37<G)&&setTimeout(function(){var b=document.createElement("script");b.async=!0;b.src=b64d(Ca);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=
|
241 |
+
0)}else api_debug=0;if(debug){var Z=(new Date).getTime(),ja=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 Da=(new Date).getTime();console.log("TIME: "+((Da-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=
|
242 |
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: "+
|
243 |
+
javascript_version),G=a("script[src*='ad-inserter.js']").attr("src"),"undefined"==typeof G?a("#javascript-version-parameter-missing").show():(javascript_version_parameter_string=G.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 />"+
|
244 |
+
javascript_version),a("#javascript-warning").show());G=a("#ai-data").css("font-family").replace(/["']/g,"");if(-1==G.indexOf("."))a("#blocked-warning").show();else if(G!=C){console.log("AD INSERTER: plugin version:",C+", loaded CSS version:",G);var Ea=a("link[href*='ai-settings.css']").attr("href");"undefined"==typeof Ea?a("#css-version-parameter-missing").show():(css_version_parameter_string=Ea.split("=")[1],"undefined"==typeof css_version_parameter_string?a("#css-version-parameter-missing").show():
|
245 |
+
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 />"+G);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>'+
|
246 |
+
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");Aa();a("#plugin_name").dblclick(function(){a(".system-debugging").toggle()});
|
247 |
+
a("#ai-stars").click(function(){""!=a("#rating-value span").text()&&(a("#ai-rating-bar").css("display","inline-block"),a("#ai-stars").hide());wa("update","")});a("#ai-rating-bar").click(function(){a("#ai-rating-bar").hide();a("#ai-stars").show()});a("#adsense-list").click(function(){ea()});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")});
|
248 |
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();
|
249 |
a("#ai-rearrange-websites").removeClass("blue");a("#ai-manage-websites-container").is(":visible")&&K()});a("#ai-website-list-search").keyup(function(b){website_list_search_reload||(website_list_search_reload=!0,setTimeout(K,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(),
|
250 |
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,
|
251 |
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");
|
252 |
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="+
|
253 |
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)}));
|
254 |
+
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);ka("")});a(".ai-block-code-demo").change(function(){Ba()}).on("input",
|
255 |
+
function(b){Ba()});setTimeout(function(){wa("")},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-Da)/1E3).toFixed(3)));a("#ads-txt-virtual").click(function(){function b(){var e=a("#ads-txt-virtual");
|
256 |
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,
|
257 |
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")&&
|
258 |
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")});
|
259 |
+
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"),g=b[2];b=b[3];""==b&&(b="---");f=f+c+g+e+b;c=b64e(f).replaceAll("+",".").replaceAll("/","_").replaceAll("=","-");d=d+md5(f).substring(0,2)+c;window.open(d,"ai-report")});a("#ai-list-data").hasClass("ai-sticky")&&
|
260 |
+
za();a("#ai-cancel-websites").click(function(){a("#ai-cancel-websites").hide();a("#ai-save-websites").hide();a("#ai-rearrange-websites").removeClass("blue");K()});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()};K("&add=")});a("#ai-save-websites").click(function(){var b=
|
261 |
+
a(this).attr("data-connect");"undefined"!==typeof b&&!1!==b?(a(this).removeAttr("data-connect"),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()),
|
262 |
+
f.find(".ai-website-labels").show(),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");
|
263 |
+
K("&save="+b64e(JSON.stringify(d))+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",
|
264 |
+
"move")):(b.find("tbody").sortable("disable"),K())});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)};K("&connect=")}))});
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
5 |
Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection, header code, banners, in-feed ads, sticky fixed widgets, hooks
|
6 |
Requires at least: 4.9
|
7 |
Tested up to: 5.9
|
8 |
-
Requires PHP:
|
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
|
@@ -98,6 +98,10 @@ It's all about the [settings](https://adinserter.pro/documentation).
|
|
98 |
* Function to visualize HTML tags
|
99 |
* You name it :)
|
100 |
|
|
|
|
|
|
|
|
|
101 |
[Review on WP Mayor](https://wpmayor.com/ad-inserter-review-the-best-wordpress-ad-management-plugin/)
|
102 |
|
103 |
> The Best WordPress Ad Management Plugin?
|
@@ -355,6 +359,14 @@ If you are not happy to reveal this information and you have opted in, simply di
|
|
355 |
|
356 |
== Changelog ==
|
357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
= 2.7.13 =
|
359 |
- Few minor bug fixes, cosmetic changes and code improvements
|
360 |
|
@@ -634,6 +646,14 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
|
|
634 |
|
635 |
== Upgrade Notice ==
|
636 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
= 2.7.13 =
|
638 |
Few minor bug fixes, cosmetic changes and code improvements
|
639 |
|
5 |
Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection, header code, banners, in-feed ads, sticky fixed widgets, hooks
|
6 |
Requires at least: 4.9
|
7 |
Tested up to: 5.9
|
8 |
+
Requires PHP: 6.0
|
9 |
+
Stable tag: 2.7.14
|
10 |
License: GPLv3
|
11 |
|
12 |
Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky widgets, AMP ads, DFP, tracking, AdSense header and footer code
|
98 |
* Function to visualize HTML tags
|
99 |
* You name it :)
|
100 |
|
101 |
+
|
102 |
+
👉 TEST the plugin on a [demo website](https://tastewp.com/template/AdInserterDemo?redirect=options-general.php%3Fpage%3Dad-inserter.php%26ai-demo%3D1&ni=true)
|
103 |
+
|
104 |
+
|
105 |
[Review on WP Mayor](https://wpmayor.com/ad-inserter-review-the-best-wordpress-ad-management-plugin/)
|
106 |
|
107 |
> The Best WordPress Ad Management Plugin?
|
359 |
|
360 |
== Changelog ==
|
361 |
|
362 |
+
= 2.7.14 =
|
363 |
+
- Added support for demo settings
|
364 |
+
- Added support for background transparency
|
365 |
+
- Added support for background for sticky ads (Pro only)
|
366 |
+
- Added support for statistics for check options (Pro only)
|
367 |
+
- Added support for individual rotation option statistics (Pro only)
|
368 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
369 |
+
|
370 |
= 2.7.13 =
|
371 |
- Few minor bug fixes, cosmetic changes and code improvements
|
372 |
|
646 |
|
647 |
== Upgrade Notice ==
|
648 |
|
649 |
+
= 2.7.14 =
|
650 |
+
Added support for demo settings;
|
651 |
+
Added support for background transparency;
|
652 |
+
Added support for background for sticky ads (Pro only);
|
653 |
+
Added support for statistics for check options (Pro only);
|
654 |
+
Added support for individual rotation option statistics (Pro only);
|
655 |
+
Few minor bug fixes, cosmetic changes and code improvements
|
656 |
+
|
657 |
= 2.7.13 =
|
658 |
Few minor bug fixes, cosmetic changes and code improvements
|
659 |
|
settings.php
CHANGED
@@ -22,6 +22,23 @@ function generate_settings_form (){
|
|
22 |
|
23 |
wp_enqueue_media();
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$save_url = $_SERVER ['REQUEST_URI'];
|
26 |
if (isset ($_GET ['tab'])) {
|
27 |
$save_url = preg_replace ("/&tab=\d+/", "", $save_url);
|
@@ -2323,8 +2340,10 @@ function generate_settings_form (){
|
|
2323 |
<td style="padding-left: 20px; width: 70%;">
|
2324 |
<?php _e ('Background color', 'ad-inserter'); ?>
|
2325 |
|
2326 |
-
<input id="block-bkg-color-<?php echo $block; ?>" style="font-family: monospace;" type="text" title= "<?php _e ('Block background: empty means background not defined, #hex number means HTML color', 'ad-inserter'); ?>" size="
|
2327 |
-
<span
|
|
|
|
|
2328 |
</td>
|
2329 |
|
2330 |
<td style="padding-left: 20px; width: 10%;">
|
@@ -3541,6 +3560,8 @@ function generate_settings_form (){
|
|
3541 |
replace_blocked_image ('ai-sa-2', 'sa-2.gif', 'block');
|
3542 |
replace_blocked_image ('ai-ap-1', 'ap-1.png', 'block');
|
3543 |
replace_blocked_image ('ai-ap-2', 'ap-2.png', 'block');
|
|
|
|
|
3544 |
replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
|
3545 |
replace_blocked_image ('ai-pro-2', 'ai-charts-250.png', 'block');
|
3546 |
replace_blocked_image ('ai-pro-3', 'ai-countries-250.png', 'block');
|
@@ -5493,7 +5514,7 @@ function ai_check_page () {
|
|
5493 |
function sidebar_addense_alternative () { ?>
|
5494 |
|
5495 |
<?php
|
5496 |
-
switch (rand (1,
|
5497 |
case 1:
|
5498 |
case 2:
|
5499 |
case 3:
|
@@ -5563,12 +5584,12 @@ function sidebar_addense_alternative () { ?>
|
|
5563 |
?>
|
5564 |
<div class="ai-form header rounded">
|
5565 |
<div style="float: left;">
|
5566 |
-
<h2 style="display: inline-block; margin: 5px 0;"><?php _e ('
|
5567 |
</div>
|
5568 |
<div style="clear: both;"></div>
|
5569 |
</div>
|
5570 |
<div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
|
5571 |
-
<a href="https://
|
5572 |
</div>
|
5573 |
<?php
|
5574 |
break;
|
@@ -5750,8 +5771,8 @@ function sidebar_pro () {
|
|
5750 |
<!-- <a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a>-->
|
5751 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
5752 |
<?php break; case 2: ?>
|
5753 |
-
<a href="https://adinserter.pro/documentation/ad-impression-and-click-tracking" class="clear-link" title="<?php _e ('A/B testing - Track ad impressions and clicks', 'ad-inserter'); ?>" target="_blank"><img id="ai-pro-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-charts-250.png" /></a
|
5754 |
-
|
5755 |
<?php break; case 3: ?>
|
5756 |
<a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5757 |
<?php break;
|
@@ -5775,8 +5796,8 @@ function sidebar_pro () {
|
|
5775 |
<?php break;
|
5776 |
case 3:
|
5777 |
?>
|
5778 |
-
<a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a
|
5779 |
-
|
5780 |
<?php break;
|
5781 |
} ?>
|
5782 |
</div>
|
@@ -5787,8 +5808,8 @@ function sidebar_pro () {
|
|
5787 |
<!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-9" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-9.gif" /></a>-->
|
5788 |
<a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5789 |
<?php break; case 1: ?>
|
5790 |
-
<a href="https://adinserter.pro/documentation/black-and-white-lists#geo-targeting" class="clear-link" title="Geotargeting - black/white-list countries" target="_blank"><img id="ai-pro-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-countries-250.png" /></a
|
5791 |
-
|
5792 |
<?php break; case 2: ?>
|
5793 |
<!-- <a href="https://adinserter.pro/documentation/black-and-white-lists#geo-targeting" class="clear-link" title="Geotargeting - black/white-list countries" target="_blank"><img id="ai-pro-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-countries-250.png" /></a>-->
|
5794 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
@@ -5803,8 +5824,8 @@ function sidebar_pro () {
|
|
5803 |
<?php switch ($version) {
|
5804 |
case 0:
|
5805 |
?>
|
5806 |
-
<a href='https://adinserter.pro/documentation/code-preview' class="clear-link" title="<?php _e ('Code preview with visual CSS editor', 'ad-inserter'); ?>" target="_blank"><img id="ai-preview" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-preview-250.png" /></a
|
5807 |
-
|
5808 |
<!-- <a href="https://adinserter.pro/documentation/ad-impression-and-click-tracking" class="clear-link" title="<?php _e ('A/B testing - Track ad impressions and clicks', 'ad-inserter'); ?>" target="_blank"><img id="ai-pro-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-charts-250.png" /></a>-->
|
5809 |
<!-- <a href="https://adinserter.pro/" class="clear-link" title="Automate ad placement on posts and pages" target="_blank"><img id="ai-pro-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>icon-256x256.jpg" /></a>-->
|
5810 |
<?php break;
|
22 |
|
23 |
wp_enqueue_media();
|
24 |
|
25 |
+
if (isset ($_GET ['ai-demo']) && get_option (AI_OPTION_NAME) === false) {
|
26 |
+
$ai_demo = (int) $_GET ['ai-demo'];
|
27 |
+
|
28 |
+
$download_url = "https://adinserter.pro/downloads/ai-demo-{$ai_demo}.txt";
|
29 |
+
$ai_demo_settings_file = download_url ($download_url);
|
30 |
+
|
31 |
+
if (is_string ($ai_demo_settings_file) && file_exists ($ai_demo_settings_file)) {
|
32 |
+
$ai_demo_settings = file_get_contents ($ai_demo_settings_file);
|
33 |
+
|
34 |
+
if (is_string ($ai_demo_settings) && substr ($ai_demo_settings, 0, 4) === ':AI:') {
|
35 |
+
update_option (AI_OPTION_NAME, $ai_demo_settings);
|
36 |
+
ai_load_settings ();
|
37 |
+
}
|
38 |
+
}
|
39 |
+
@unlink ($ai_demo_settings_file);
|
40 |
+
}
|
41 |
+
|
42 |
$save_url = $_SERVER ['REQUEST_URI'];
|
43 |
if (isset ($_GET ['tab'])) {
|
44 |
$save_url = preg_replace ("/&tab=\d+/", "", $save_url);
|
2340 |
<td style="padding-left: 20px; width: 70%;">
|
2341 |
<?php _e ('Background color', 'ad-inserter'); ?>
|
2342 |
|
2343 |
+
<input id="block-bkg-color-<?php echo $block; ?>" style="font-family: monospace;" type="text" title= "<?php _e ('Block background: empty means background not defined, #hex number means HTML color', 'ad-inserter'); ?>" size="24" maxlength="26" name="<?php echo AI_OPTION_BLOCK_BACKGROUND_COLOR, WP_FORM_FIELD_POSTFIX, $block; ?>" value="<?php echo $obj->get_block_background_color (); ?>" default="<?php echo $default->get_block_background_color (); ?>" />
|
2344 |
+
<span class="ai-colorpicker-alpha" style="position: relative; display: inline-block; width: 24px; height: 24px; border: 1px solid #ddd; border-radius: 4px; vertical-align: top; margin-left: 10px;">
|
2345 |
+
<span id="block-color-<?php echo $block; ?>" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: pointer;"></span>
|
2346 |
+
</span>
|
2347 |
</td>
|
2348 |
|
2349 |
<td style="padding-left: 20px; width: 10%;">
|
3560 |
replace_blocked_image ('ai-sa-2', 'sa-2.gif', 'block');
|
3561 |
replace_blocked_image ('ai-ap-1', 'ap-1.png', 'block');
|
3562 |
replace_blocked_image ('ai-ap-2', 'ap-2.png', 'block');
|
3563 |
+
replace_blocked_image ('ai-um-1', 'um-1.png', 'block');
|
3564 |
+
replace_blocked_image ('ai-um-2', 'um-2.png', 'block');
|
3565 |
replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
|
3566 |
replace_blocked_image ('ai-pro-2', 'ai-charts-250.png', 'block');
|
3567 |
replace_blocked_image ('ai-pro-3', 'ai-countries-250.png', 'block');
|
5514 |
function sidebar_addense_alternative () { ?>
|
5515 |
|
5516 |
<?php
|
5517 |
+
switch (rand (1, 16)) {
|
5518 |
case 1:
|
5519 |
case 2:
|
5520 |
case 3:
|
5584 |
?>
|
5585 |
<div class="ai-form header rounded">
|
5586 |
<div style="float: left;">
|
5587 |
+
<h2 style="display: inline-block; margin: 5px 0;"><?php _e ('Maximize Revenue', 'ad-inserter'); ?></h2>
|
5588 |
</div>
|
5589 |
<div style="clear: both;"></div>
|
5590 |
</div>
|
5591 |
<div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
|
5592 |
+
<a href="https://underdogmedia.com/edge-publisher-adinserter/" class="clear-link" title="<?php _e ('Maximize Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-um-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>um-1.png" /></a>
|
5593 |
</div>
|
5594 |
<?php
|
5595 |
break;
|
5771 |
<!-- <a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a>-->
|
5772 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
5773 |
<?php break; case 2: ?>
|
5774 |
+
<!-- <a href="https://adinserter.pro/documentation/ad-impression-and-click-tracking" class="clear-link" title="<?php _e ('A/B testing - Track ad impressions and clicks', 'ad-inserter'); ?>" target="_blank"><img id="ai-pro-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-charts-250.png" /></a>-->
|
5775 |
+
<a href="https://underdogmedia.com/edge-publisher-adinserter/" class="clear-link" title="<?php _e ('Maximize Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-um-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>um-2.png" /></a>
|
5776 |
<?php break; case 3: ?>
|
5777 |
<a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5778 |
<?php break;
|
5796 |
<?php break;
|
5797 |
case 3:
|
5798 |
?>
|
5799 |
+
<!-- <a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a>-->
|
5800 |
+
<a href="https://underdogmedia.com/edge-publisher-adinserter/" class="clear-link" title="<?php _e ('Maximize Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-um-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>um-2.png" /></a>
|
5801 |
<?php break;
|
5802 |
} ?>
|
5803 |
</div>
|
5808 |
<!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-9" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-9.gif" /></a>-->
|
5809 |
<a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5810 |
<?php break; case 1: ?>
|
5811 |
+
<!-- <a href="https://adinserter.pro/documentation/black-and-white-lists#geo-targeting" class="clear-link" title="Geotargeting - black/white-list countries" target="_blank"><img id="ai-pro-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-countries-250.png" /></a>-->
|
5812 |
+
<a href="https://underdogmedia.com/edge-publisher-adinserter/" class="clear-link" title="<?php _e ('Maximize Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-um-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>um-2.png" /></a>
|
5813 |
<?php break; case 2: ?>
|
5814 |
<!-- <a href="https://adinserter.pro/documentation/black-and-white-lists#geo-targeting" class="clear-link" title="Geotargeting - black/white-list countries" target="_blank"><img id="ai-pro-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-countries-250.png" /></a>-->
|
5815 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
5824 |
<?php switch ($version) {
|
5825 |
case 0:
|
5826 |
?>
|
5827 |
+
<!-- <a href='https://adinserter.pro/documentation/code-preview' class="clear-link" title="<?php _e ('Code preview with visual CSS editor', 'ad-inserter'); ?>" target="_blank"><img id="ai-preview" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-preview-250.png" /></a>-->
|
5828 |
+
<a href="https://underdogmedia.com/edge-publisher-adinserter/" class="clear-link" title="<?php _e ('Maximize Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-um-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>um-2.png" /></a>
|
5829 |
<!-- <a href="https://adinserter.pro/documentation/ad-impression-and-click-tracking" class="clear-link" title="<?php _e ('A/B testing - Track ad impressions and clicks', 'ad-inserter'); ?>" target="_blank"><img id="ai-pro-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-charts-250.png" /></a>-->
|
5830 |
<!-- <a href="https://adinserter.pro/" class="clear-link" title="Automate ad placement on posts and pages" target="_blank"><img id="ai-pro-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>icon-256x256.jpg" /></a>-->
|
5831 |
<?php break;
|