Version Description
- Added support for adb redirection page with url queries
- Added support for tcf-no-google shortcut
- 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.16 |
Comparing to | |
See all releases |
Code changes from version 2.7.15 to 2.7.16
- ad-inserter.php +39 -31
- constants.php +1 -1
- css/ai-settings.css +1 -1
- includes/js/ai-adb.js +7 -0
- includes/js/ai-adb.min.js +2 -2
- includes/js/ai-lists.js +26 -10
- includes/js/ai-lists.min.js +21 -20
- js/ad-inserter.js +1 -1
- js/ad-inserter.min.js +1 -1
- readme.txt +13 -3
- settings.php +9 -9
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,9 +17,14 @@ Requires PHP: 5.6
|
|
17 |
|
18 |
Change Log
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
Ad Inserter 2.7.15 - 2022-06-01
|
21 |
- Added filter hooks for ad labels
|
22 |
-
- Added support for
|
23 |
- Added support for rotation option index attribute
|
24 |
- Added shortcodes for block number and block name
|
25 |
- Few minor bug fixes, cosmetic changes and code improvements
|
@@ -5002,12 +5007,12 @@ function ai_check_plugin_options ($plugin_options = array ()) {
|
|
5002 |
$plugin_options [$last_viewport_width_option_name] = 0;
|
5003 |
}
|
5004 |
|
5005 |
-
for ($
|
5006 |
-
$
|
5007 |
-
$
|
5008 |
|
5009 |
-
if (!isset ($plugin_options [$
|
5010 |
-
if (!isset ($plugin_options [$
|
5011 |
}
|
5012 |
|
5013 |
for ($hook = 1; $hook <= 20; $hook ++) {
|
@@ -5602,22 +5607,22 @@ function get_viewport_width ($viewport_number) {
|
|
5602 |
return ($ai_db_options [AI_OPTION_GLOBAL][$viewport_settins_name]);
|
5603 |
}
|
5604 |
|
5605 |
-
function
|
5606 |
global $ai_db_options;
|
5607 |
|
5608 |
-
$
|
5609 |
-
if (!isset ($ai_db_options [AI_OPTION_GLOBAL][$
|
5610 |
|
5611 |
-
return ($ai_db_options [AI_OPTION_GLOBAL][$
|
5612 |
}
|
5613 |
|
5614 |
-
function
|
5615 |
global $ai_db_options;
|
5616 |
|
5617 |
-
$
|
5618 |
-
if (!isset ($ai_db_options [AI_OPTION_GLOBAL][$
|
5619 |
|
5620 |
-
return ($ai_db_options [AI_OPTION_GLOBAL][$
|
5621 |
}
|
5622 |
|
5623 |
function get_hook_enabled ($hook_number) {
|
@@ -6059,8 +6064,11 @@ function filter_option ($option, $value, $delete_escaped_backslashes = true){
|
|
6059 |
$value = str_replace (array ("\"", "<", ">"), "", $value);
|
6060 |
$value = esc_html ($value);
|
6061 |
}
|
6062 |
-
elseif ($option == 'AD_LABEL'
|
6063 |
-
|
|
|
|
|
|
|
6064 |
$option == 'REPORT_HEADER_DESCRIPTION' ||
|
6065 |
$option == 'EXTERNAL_TRACKING_CATEGORY' ||
|
6066 |
$option == 'EXTERNAL_TRACKING_ACTION' ||
|
@@ -7581,9 +7589,9 @@ function ai_settings () {
|
|
7581 |
if (isset ($_POST ['viewport-width-'.$viewport])) $options ['VIEWPORT_WIDTH_'.$viewport] = filter_option ('viewport_width', $_POST ['viewport-width-'.$viewport]);
|
7582 |
}
|
7583 |
|
7584 |
-
for ($
|
7585 |
-
if (isset ($_POST ['
|
7586 |
-
if (isset ($_POST ['
|
7587 |
}
|
7588 |
|
7589 |
for ($hook = 1; $hook <= 20; $hook ++) {
|
@@ -8962,10 +8970,10 @@ function ai_process_shortcode (&$block, $atts) {
|
|
8962 |
}
|
8963 |
|
8964 |
if ($parameters ['data'] != '') {
|
8965 |
-
for ($
|
8966 |
-
$
|
8967 |
-
if ($
|
8968 |
-
return
|
8969 |
}
|
8970 |
}
|
8971 |
|
@@ -8974,17 +8982,17 @@ function ai_process_shortcode (&$block, $atts) {
|
|
8974 |
$data = array ();
|
8975 |
foreach ($data_tags as $data_tag) {
|
8976 |
|
8977 |
-
$
|
8978 |
-
for ($
|
8979 |
-
$
|
8980 |
-
if ($
|
8981 |
-
$data []=
|
8982 |
-
$
|
8983 |
break;
|
8984 |
}
|
8985 |
}
|
8986 |
|
8987 |
-
if (!$
|
8988 |
$data []= replace_ai_tags ('{'.trim ($data_tag).'}');
|
8989 |
}
|
8990 |
}
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
+
Version: 2.7.16
|
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.16 - 2022-06-23
|
21 |
+
- Added support for adb redirection page with url queries
|
22 |
+
- Added support for tcf-no-google shortcut
|
23 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
24 |
+
|
25 |
Ad Inserter 2.7.15 - 2022-06-01
|
26 |
- Added filter hooks for ad labels
|
27 |
+
- Added support for constants
|
28 |
- Added support for rotation option index attribute
|
29 |
- Added shortcodes for block number and block name
|
30 |
- Few minor bug fixes, cosmetic changes and code improvements
|
5007 |
$plugin_options [$last_viewport_width_option_name] = 0;
|
5008 |
}
|
5009 |
|
5010 |
+
for ($constant = 1; $constant <= 6; $constant ++) {
|
5011 |
+
$constant_name_option_name = 'CONSTANT_NAME_' . $constant;
|
5012 |
+
$constant_value_option_name = 'CONSTANT_VALUE_' . $constant;
|
5013 |
|
5014 |
+
if (!isset ($plugin_options [$constant_name_option_name])) $plugin_options [$constant_name_option_name] = "";
|
5015 |
+
if (!isset ($plugin_options [$constant_value_option_name])) $plugin_options [$constant_value_option_name] = "";
|
5016 |
}
|
5017 |
|
5018 |
for ($hook = 1; $hook <= 20; $hook ++) {
|
5607 |
return ($ai_db_options [AI_OPTION_GLOBAL][$viewport_settins_name]);
|
5608 |
}
|
5609 |
|
5610 |
+
function get_constant_name ($constant_number) {
|
5611 |
global $ai_db_options;
|
5612 |
|
5613 |
+
$constant_settins_name = 'CONSTANT_NAME_' . $constant_number;
|
5614 |
+
if (!isset ($ai_db_options [AI_OPTION_GLOBAL][$constant_settins_name])) $ai_db_options [AI_OPTION_GLOBAL][$constant_settins_name] = "";
|
5615 |
|
5616 |
+
return ($ai_db_options [AI_OPTION_GLOBAL][$constant_settins_name]);
|
5617 |
}
|
5618 |
|
5619 |
+
function get_constant_value ($constant_number) {
|
5620 |
global $ai_db_options;
|
5621 |
|
5622 |
+
$constant_settins_name = 'CONSTANT_VALUE_' . $constant_number;
|
5623 |
+
if (!isset ($ai_db_options [AI_OPTION_GLOBAL][$constant_settins_name])) $ai_db_options [AI_OPTION_GLOBAL][$constant_settins_name] = "";
|
5624 |
|
5625 |
+
return ($ai_db_options [AI_OPTION_GLOBAL][$constant_settins_name]);
|
5626 |
}
|
5627 |
|
5628 |
function get_hook_enabled ($hook_number) {
|
6064 |
$value = str_replace (array ("\"", "<", ">"), "", $value);
|
6065 |
$value = esc_html ($value);
|
6066 |
}
|
6067 |
+
elseif ($option == 'AD_LABEL') {
|
6068 |
+
$value = str_replace (array ("\\"), "", $value);
|
6069 |
+
$value = esc_html ($value);
|
6070 |
+
}
|
6071 |
+
elseif ($option == 'REPORT_HEADER_TITLE' ||
|
6072 |
$option == 'REPORT_HEADER_DESCRIPTION' ||
|
6073 |
$option == 'EXTERNAL_TRACKING_CATEGORY' ||
|
6074 |
$option == 'EXTERNAL_TRACKING_ACTION' ||
|
7589 |
if (isset ($_POST ['viewport-width-'.$viewport])) $options ['VIEWPORT_WIDTH_'.$viewport] = filter_option ('viewport_width', $_POST ['viewport-width-'.$viewport]);
|
7590 |
}
|
7591 |
|
7592 |
+
for ($constant = 1; $constant <= 6; $constant ++) {
|
7593 |
+
if (isset ($_POST ['constant-name-'.$constant])) $options ['CONSTANT_NAME_'.$constant] = filter_string ($_POST ['constant-name-'.$constant]);
|
7594 |
+
if (isset ($_POST ['constant-value-'.$constant])) $options ['CONSTANT_VALUE_'.$constant] = filter_string ($_POST ['constant-value-'.$constant]);
|
7595 |
}
|
7596 |
|
7597 |
for ($hook = 1; $hook <= 20; $hook ++) {
|
8970 |
}
|
8971 |
|
8972 |
if ($parameters ['data'] != '') {
|
8973 |
+
for ($constant = 1; $constant <= 6; $constant ++) {
|
8974 |
+
$constant_name = trim (get_constant_name ($constant));
|
8975 |
+
if ($constant_name != '' && $parameters ['data'] == $constant_name) {
|
8976 |
+
return get_constant_value ($constant);
|
8977 |
}
|
8978 |
}
|
8979 |
|
8982 |
$data = array ();
|
8983 |
foreach ($data_tags as $data_tag) {
|
8984 |
|
8985 |
+
$constant_found = false;
|
8986 |
+
for ($constant = 1; $constant <= 6; $constant ++) {
|
8987 |
+
$constant_name = trim (get_constant_name ($constant));
|
8988 |
+
if ($constant_name != '' && $data_tag == $constant_name) {
|
8989 |
+
$data []= get_constant_value ($constant);
|
8990 |
+
$constant_found = true;
|
8991 |
break;
|
8992 |
}
|
8993 |
}
|
8994 |
|
8995 |
+
if (!$constant_found) {
|
8996 |
$data []= replace_ai_tags ('{'.trim ($data_tag).'}');
|
8997 |
}
|
8998 |
}
|
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.16');
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
css/ai-settings.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#ai-data {
|
2 |
-
font-family: "2.7.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
1 |
#ai-data {
|
2 |
+
font-family: "2.7.16"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
includes/js/ai-adb.js
CHANGED
@@ -543,6 +543,13 @@ var ai_adb_detected_actions = function(n) {
|
|
543 |
date.setTime (date.getTime() + (10 * 1000));
|
544 |
AiCookies.set (ai_adb_page_redirection_cookie_name, window.location.href, {expires: date, path: "/"});
|
545 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
window.location.replace (ai_adb_redirection_url)
|
547 |
} else {
|
548 |
if (ai_adb_debugging) console.log ("AI AD BLOCKING no redirection, cookie:", cookie);
|
543 |
date.setTime (date.getTime() + (10 * 1000));
|
544 |
AiCookies.set (ai_adb_page_redirection_cookie_name, window.location.href, {expires: date, path: "/"});
|
545 |
|
546 |
+
if (ai_adb_redirection_url.substr (ai_adb_redirection_url.length - 1) == "?") {
|
547 |
+
ai_adb_redirection_url = ai_adb_redirection_url.slice (0, - 1);
|
548 |
+
ai_adb_redirection_url = ai_adb_redirection_url + location.search;
|
549 |
+
|
550 |
+
if (ai_adb_debugging) console.log ("AI AD BLOCKING redirection using query parameters:", location.search);
|
551 |
+
}
|
552 |
+
|
553 |
window.location.replace (ai_adb_redirection_url)
|
554 |
} else {
|
555 |
if (ai_adb_debugging) console.log ("AI AD BLOCKING no redirection, cookie:", cookie);
|
includes/js/ai-adb.min.js
CHANGED
@@ -15,8 +15,8 @@ function(a){ai_adb_active||(ai_adb_active=!0,jQuery(b64d("Ym9keQ==")).attr(AI_AD
|
|
15 |
"undefined"!=typeof e&&(f=parseInt(e)+1);if(f<=c){AiCookies.set(ai_adb_pgv_cookie_name,f,{expires:365,path:"/"});window.ai_d1=f;window.AI_ADB_STATUS_MESSAGE=1;return}if(0!=d&&(AiCookies.set(ai_adb_pgv_cookie_name,f,{expires:365,path:"/"}),0!=(f-c-1)%d)){window.ai_d1=f;window.AI_ADB_STATUS_MESSAGE=1;return}}if(0==ai_adb_message_cookie_lifetime||1==ai_adb_action&&ai_adb_message_undismissible)AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});else{e=AiCookies.get(ai_adb_act_cookie_name);if("undefined"!=
|
16 |
typeof e&&"AI_CONST_AI_ADB_COOKIE_VALUE"==e){window.AI_ADB_STATUS_MESSAGE=2;return}AiCookies.set(ai_adb_act_cookie_name,"AI_CONST_AI_ADB_COOKIE_VALUE",{expires:ai_adb_message_cookie_lifetime,path:"/"})}0==ai_adb_action?(ai_dummy=16,window.AI_ADB_STATUS_MESSAGE=6,ai_dummy++):(window.AI_ADB_STATUS_MESSAGE=3,ai_dummy=13);switch(ai_adb_action){case 1:ai_adb_message_undismissible?(ai_adb_overlay.find('[style*="cursor"]').css("cursor","no-drop"),ai_adb_message_window.find('[style*="cursor"]').css("cursor",
|
17 |
"no-drop")):(ai_adb_overlay.click(function(){b(this).remove();ai_adb_message_window.remove()}),ai_adb_message_window.click(function(){b(this).remove();ai_adb_overlay.remove()}),window.onkeydown=function(g){27===g.keyCode&&(ai_adb_overlay.click(),ai_adb_message_window.click())});c=b(b64d("Ym9keQ==")).children();c.eq(Math.floor(Math.random()*c.length)).after(ai_adb_overlay);c.eq(Math.floor(Math.random()*c.length)).after(ai_adb_message_window);break;case 2:""!=ai_adb_redirection_url&&(c=!0,"http"==ai_adb_redirection_url.toLowerCase().substring(0,
|
18 |
-
4)?window.location.href==ai_adb_redirection_url&&(c=!1):window.location.pathname==ai_adb_redirection_url&&(c=!1),c?(e=AiCookies.get(ai_adb_page_redirection_cookie_name),"undefined"==typeof e&&(c=new Date,c.setTime(c.getTime()+1E4),AiCookies.set(ai_adb_page_redirection_cookie_name,window.location.href,{expires:c,path:"/"}),
|
19 |
-
ai_adb_undetected_actions(a)},200)},ai_adb_undetected_actions=function(a){ai_adb_counter++;ai_adb_active||4!=ai_adb_counter||(jQuery(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME,b64d("Y2xlYXI=")),ai_dummy=11,window.AI_ADB_STATUS_MESSAGE=4,ai_dummy=14,ai_adb_process_blocks())};AI_DBG_AI_DEBUG_AD_BLOCKING&&jQuery(document).ready(function(){ai_adb_detected(0)});
|
20 |
jQuery(document).ready(function(a){a(window).ready(function(){ai_debugging_active="undefined"!==typeof ai_adb_fe_dbg;setTimeout(function(){a("#ai-adb-bar").click(function(){AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});AiCookies.remove(ai_adb_pgv_cookie_name,{path:"/"});window.AI_ADB_STATUS_MESSAGE=5;ai_dummy=15})},2);if((!ai_adb_active||ai_debugging_active)&&""!=ai_adb_selectors){var b=0,d=0,c=ai_adb_selectors.split(",");a.each(c,function(f){c[f]=c[f].trim();0!=a(c[f]).length&&a(c[f]).each(function(e){var g=
|
21 |
a(this).outerHeight();e=a(this).find(".ai-attributes");e.length&&e.each(function(){g>=a(this).outerHeight()&&(g-=a(this).outerHeight())});b++;if(0===g&&(a(document).ready(function(){ai_adb_active&&!ai_debugging_active||ai_adb_detected(4)}),d++,!ai_debugging_active))return!1})});0!=b&&0==d&&a(document).ready(function(){ai_adb_undetected(4)})}})});
|
22 |
function ai_adb_get_script(a,b){var d=document.createElement("script");d.src="ai-adb-url"+a+".js?ver="+(new Date).getTime();var c=document.getElementsByTagName("head")[0],f=!1;d.onerror=function(){b&&b();d.onerror=null;c.removeChild(d)};d.onload=d.onreadystatechange=function(){f||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(f=!0,b&&b(),d.onload=d.onreadystatechange=null,c.removeChild(d))};c.appendChild(d)}
|
15 |
"undefined"!=typeof e&&(f=parseInt(e)+1);if(f<=c){AiCookies.set(ai_adb_pgv_cookie_name,f,{expires:365,path:"/"});window.ai_d1=f;window.AI_ADB_STATUS_MESSAGE=1;return}if(0!=d&&(AiCookies.set(ai_adb_pgv_cookie_name,f,{expires:365,path:"/"}),0!=(f-c-1)%d)){window.ai_d1=f;window.AI_ADB_STATUS_MESSAGE=1;return}}if(0==ai_adb_message_cookie_lifetime||1==ai_adb_action&&ai_adb_message_undismissible)AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});else{e=AiCookies.get(ai_adb_act_cookie_name);if("undefined"!=
|
16 |
typeof e&&"AI_CONST_AI_ADB_COOKIE_VALUE"==e){window.AI_ADB_STATUS_MESSAGE=2;return}AiCookies.set(ai_adb_act_cookie_name,"AI_CONST_AI_ADB_COOKIE_VALUE",{expires:ai_adb_message_cookie_lifetime,path:"/"})}0==ai_adb_action?(ai_dummy=16,window.AI_ADB_STATUS_MESSAGE=6,ai_dummy++):(window.AI_ADB_STATUS_MESSAGE=3,ai_dummy=13);switch(ai_adb_action){case 1:ai_adb_message_undismissible?(ai_adb_overlay.find('[style*="cursor"]').css("cursor","no-drop"),ai_adb_message_window.find('[style*="cursor"]').css("cursor",
|
17 |
"no-drop")):(ai_adb_overlay.click(function(){b(this).remove();ai_adb_message_window.remove()}),ai_adb_message_window.click(function(){b(this).remove();ai_adb_overlay.remove()}),window.onkeydown=function(g){27===g.keyCode&&(ai_adb_overlay.click(),ai_adb_message_window.click())});c=b(b64d("Ym9keQ==")).children();c.eq(Math.floor(Math.random()*c.length)).after(ai_adb_overlay);c.eq(Math.floor(Math.random()*c.length)).after(ai_adb_message_window);break;case 2:""!=ai_adb_redirection_url&&(c=!0,"http"==ai_adb_redirection_url.toLowerCase().substring(0,
|
18 |
+
4)?window.location.href==ai_adb_redirection_url&&(c=!1):window.location.pathname==ai_adb_redirection_url&&(c=!1),c?(e=AiCookies.get(ai_adb_page_redirection_cookie_name),"undefined"==typeof e&&(c=new Date,c.setTime(c.getTime()+1E4),AiCookies.set(ai_adb_page_redirection_cookie_name,window.location.href,{expires:c,path:"/"}),"?"==ai_adb_redirection_url.substr(ai_adb_redirection_url.length-1)&&(ai_adb_redirection_url=ai_adb_redirection_url.slice(0,-1),ai_adb_redirection_url+=location.search),window.location.replace(ai_adb_redirection_url))):
|
19 |
+
AiCookies.remove(ai_adb_page_redirection_cookie_name,{path:"/"}))}}(jQuery))},ai_adb_undetected=function(a){setTimeout(function(){ai_adb_active||ai_adb_undetected_actions(a)},200)},ai_adb_undetected_actions=function(a){ai_adb_counter++;ai_adb_active||4!=ai_adb_counter||(jQuery(b64d("Ym9keQ==")).attr(AI_ADB_ATTR_NAME,b64d("Y2xlYXI=")),ai_dummy=11,window.AI_ADB_STATUS_MESSAGE=4,ai_dummy=14,ai_adb_process_blocks())};AI_DBG_AI_DEBUG_AD_BLOCKING&&jQuery(document).ready(function(){ai_adb_detected(0)});
|
20 |
jQuery(document).ready(function(a){a(window).ready(function(){ai_debugging_active="undefined"!==typeof ai_adb_fe_dbg;setTimeout(function(){a("#ai-adb-bar").click(function(){AiCookies.remove(ai_adb_act_cookie_name,{path:"/"});AiCookies.remove(ai_adb_pgv_cookie_name,{path:"/"});window.AI_ADB_STATUS_MESSAGE=5;ai_dummy=15})},2);if((!ai_adb_active||ai_debugging_active)&&""!=ai_adb_selectors){var b=0,d=0,c=ai_adb_selectors.split(",");a.each(c,function(f){c[f]=c[f].trim();0!=a(c[f]).length&&a(c[f]).each(function(e){var g=
|
21 |
a(this).outerHeight();e=a(this).find(".ai-attributes");e.length&&e.each(function(){g>=a(this).outerHeight()&&(g-=a(this).outerHeight())});b++;if(0===g&&(a(document).ready(function(){ai_adb_active&&!ai_debugging_active||ai_adb_detected(4)}),d++,!ai_debugging_active))return!1})});0!=b&&0==d&&a(document).ready(function(){ai_adb_undetected(4)})}})});
|
22 |
function ai_adb_get_script(a,b){var d=document.createElement("script");d.src="ai-adb-url"+a+".js?ver="+(new Date).getTime();var c=document.getElementsByTagName("head")[0],f=!1;d.onerror=function(){b&&b();d.onerror=null;c.removeChild(d)};d.onload=d.onreadystatechange=function(){f||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(f=!0,b&&b(),d.onload=d.onreadystatechange=null,c.removeChild(d))};c.appendChild(d)}
|
includes/js/ai-lists.js
CHANGED
@@ -398,10 +398,14 @@ jQuery (function ($) {
|
|
398 |
|
399 |
var list_client_org = list_client;
|
400 |
|
401 |
-
|
402 |
-
result =
|
403 |
list_client = list_client.substring (2);
|
404 |
}
|
|
|
|
|
|
|
|
|
405 |
|
406 |
if (list_client.substring (0, 9) == 'language:') {
|
407 |
check_language = true;
|
@@ -491,6 +495,8 @@ jQuery (function ($) {
|
|
491 |
return false; // End && check
|
492 |
}
|
493 |
|
|
|
|
|
494 |
}); // &&
|
495 |
|
496 |
if (list_passed) {
|
@@ -562,12 +568,16 @@ jQuery (function ($) {
|
|
562 |
break
|
563 |
}
|
564 |
|
565 |
-
cookie_list = cookie_list.replace ('tcf-gdpr',
|
566 |
-
cookie_list = cookie_list.replace ('tcf-no-gdpr',
|
567 |
-
cookie_list = cookie_list.replace ('tcf-google',
|
568 |
-
cookie_list = cookie_list.replace ('tcf-
|
569 |
-
cookie_list = cookie_list.replace ('tcf-
|
570 |
-
cookie_list = cookie_list.replace ('tcf-
|
|
|
|
|
|
|
|
|
571 |
|
572 |
if (ai_debug) console.log ("AI LISTS cookie list:", cookie_list, cookie_list_type);
|
573 |
|
@@ -602,10 +612,14 @@ jQuery (function ($) {
|
|
602 |
|
603 |
var list_parameter_org = list_cookie;
|
604 |
|
605 |
-
|
606 |
-
result =
|
607 |
list_cookie = list_cookie.substring (2);
|
608 |
}
|
|
|
|
|
|
|
|
|
609 |
|
610 |
if (ai_debug) console.log ("");
|
611 |
if (ai_debug) console.log ("AI LISTS item check", list_parameter_org);
|
@@ -738,6 +752,8 @@ jQuery (function ($) {
|
|
738 |
return false; // End && check
|
739 |
}
|
740 |
|
|
|
|
|
741 |
}); // &&
|
742 |
|
743 |
if (list_passed) {
|
398 |
|
399 |
var list_client_org = list_client;
|
400 |
|
401 |
+
while (list_client.substring (0, 2) == '!!') {
|
402 |
+
result = !result;
|
403 |
list_client = list_client.substring (2);
|
404 |
}
|
405 |
+
// if (list_client.substring (0, 2) == '!!') {
|
406 |
+
// result = false;
|
407 |
+
// list_client = list_client.substring (2);
|
408 |
+
// }
|
409 |
|
410 |
if (list_client.substring (0, 9) == 'language:') {
|
411 |
check_language = true;
|
495 |
return false; // End && check
|
496 |
}
|
497 |
|
498 |
+
if (ai_debug) console.log ("AI LISTS CLIENT PASSED", list_cookie);
|
499 |
+
|
500 |
}); // &&
|
501 |
|
502 |
if (list_passed) {
|
568 |
break
|
569 |
}
|
570 |
|
571 |
+
cookie_list = cookie_list.replace ('tcf-gdpr', 'tcf-v2[gdprApplies]=true');
|
572 |
+
cookie_list = cookie_list.replace ('tcf-no-gdpr', 'tcf-v2[gdprApplies]=false');
|
573 |
+
cookie_list = cookie_list.replace ('tcf-google', 'tcf-v2[vendor][consents][755]=true && tcf-v2[purpose][consents][1]=true');
|
574 |
+
cookie_list = cookie_list.replace ('tcf-no-google', '!!tcf-v2[vendor][consents][755]');
|
575 |
+
cookie_list = cookie_list.replace ('tcf-media.net', 'tcf-v2[vendor][consents][142]=true && tcf-v2[purpose][consents][1]=true');
|
576 |
+
cookie_list = cookie_list.replace ('tcf-no-media.net','!!tcf-v2[vendor][consents][142]');
|
577 |
+
cookie_list = cookie_list.replace ('tcf-amazon', 'tcf-v2[vendor][consents][793]=true && tcf-v2[purpose][consents][1]=true');
|
578 |
+
cookie_list = cookie_list.replace ('tcf-no-amazon', '!!tcf-v2[vendor][consents][793]');
|
579 |
+
cookie_list = cookie_list.replace ('tcf-ezoic', 'tcf-v2[vendor][consents][347]=true && tcf-v2[purpose][consents][1]=true');
|
580 |
+
cookie_list = cookie_list.replace ('tcf-no-ezoic', '!!tcf-v2[vendor][consents][347]');
|
581 |
|
582 |
if (ai_debug) console.log ("AI LISTS cookie list:", cookie_list, cookie_list_type);
|
583 |
|
612 |
|
613 |
var list_parameter_org = list_cookie;
|
614 |
|
615 |
+
while (list_cookie.substring (0, 2) == '!!') {
|
616 |
+
result = !result;
|
617 |
list_cookie = list_cookie.substring (2);
|
618 |
}
|
619 |
+
// if (list_cookie.substring (0, 2) == '!!') {
|
620 |
+
// result = false;
|
621 |
+
// list_cookie = list_cookie.substring (2);
|
622 |
+
// }
|
623 |
|
624 |
if (ai_debug) console.log ("");
|
625 |
if (ai_debug) console.log ("AI LISTS item check", list_parameter_org);
|
752 |
return false; // End && check
|
753 |
}
|
754 |
|
755 |
+
if (ai_debug) console.log ("AI LISTS COOKIE PASSED", list_cookie);
|
756 |
+
|
757 |
}); // &&
|
758 |
|
759 |
if (list_passed) {
|
includes/js/ai-lists.min.js
CHANGED
@@ -1,27 +1,28 @@
|
|
1 |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,n){a.raw=n;return a};$jscomp.arrayIteratorImpl=function(a){var n=0;return function(){return n<a.length?{done:!1,value:a[n++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var n="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return n?n.call(a):$jscomp.arrayIterator(a)};
|
2 |
-
jQuery(function(a){function n(c){c=c.match(ba);return null!=c&&1<c.length&&"string"===typeof c[1]&&0<c[1].length?c[1].toLowerCase():null}function E(c){return c.includes(":")?(c=c.split(":"),1E3*(3600*parseInt(c[0])+60*parseInt(c[1])+parseInt(c[2]))):null}function
|
3 |
-
"function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(c,l){l&&"useractioncomplete"===c.eventStatus&&(ai_tcData=c,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}function
|
4 |
-
function k(c){if(
|
5 |
!1));return e==d}if("object"!=typeof e&&"array"!=typeof e)return!1;var h=m[0];m=m.slice(1);if("*"==h)for(e=$jscomp.makeIterator(Object.entries(e)),h=e.next();!h.done;h=e.next()){if(h=$jscomp.makeIterator(h.value),h.next(),h=h.next().value,l(m,h,d))return!0}else if(h in e)return l(m,e[h],d);return!1}function G(m,e,d){if("object"!=typeof m||-1==e.indexOf("["))return!1;e=e.replace(/]| /gi,"").split("[");return l(e,m,d)}function ca(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("IAB TCF 2.0 DETECTED"),
|
6 |
__tcfapi("getTCData",2,function(m,e){e?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==m.eventStatus||"useractioncomplete"==m.eventStatus?(ai_tcData=m,m.gdprApplies?a("#ai-iab-tcf-status").text("IAB TCF 2.0 DATA LOADED"):jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},10)):"cmpuishown"==m.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("IAB TCF 2.0 CMP UI SHOWN"),
|
7 |
a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("IAB TCF 2.0 __tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function K(m){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&H(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,ca(),cookies_need_tcData=!0)):m&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("IAB TCF 2.0 MISSING: __tcfapi function not found"))}
|
8 |
-
c=null==c?a("div.ai-list-data, meta.ai-list-data"):c.filter(".ai-list-data");if(c.length){c.removeClass("ai-list-data");var V=getAllUrlParams(window.location.search);if(null!=V.referrer)var
|
9 |
-
d=!0,h=a(this).attr("referer-list");if("undefined"!=typeof h){h=b64d(h).split(",");var r=a(this).attr("referer-list-type"),I=!1;a.each(h,function(A,
|
10 |
-
!0,!1});var p=I;switch(r){case "B":p&&(d=!1);break;case "W":p||(d=!1)}}if(d&&(h=a(this).attr("client-list"),"undefined"!=typeof h&&"undefined"!==typeof X))switch(h=b64d(h).split(","),r=a(this).attr("client-list-type"),p=!1,a.each(h,function(A,
|
11 |
1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=L.indexOf(b)&&(q=!0)):(b=b.substr(1).toLowerCase(),L.substr(-b.length)==b&&(q=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==L.indexOf(b)&&(q=!0)):b==L&&(q=!0):"*"==b.charAt(0)?"*"==b.charAt(b.length-1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=S.indexOf(b)&&(q=!0)):(b=b.substr(1).toLowerCase(),S.substr(-b.length)==b&&(q=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==S.indexOf(b)&&(q=!0)):X.is(b)&&
|
12 |
-
(q=!0);p=q?
|
13 |
-
"tcf-v2[vendor][consents][755]=true && tcf-v2[purpose][consents][1]=true");
|
14 |
-
f});p=!1;var O=a(this);a.each(D,function(A,
|
15 |
-
t=t.replace(/]| /gi,"").split("["),t.shift(),p=(t=l(t,ai_tcData,q))?
|
16 |
-
T?
|
17 |
-
R+"\n"+W);
|
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(
|
19 |
-
1E3).toString()+" ="+(C>=B).toString()+" end_date:"+Math.floor(r/1E3).toString()+" =:"+(C<r).toString()+" days:"+D.toString()+" =:"+D.includes(J.toString()).toString());
|
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))):
|
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"),
|
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"==
|
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");
|
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")})},
|
|
|
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
|
1 |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,n){a.raw=n;return a};$jscomp.arrayIteratorImpl=function(a){var n=0;return function(){return n<a.length?{done:!1,value:a[n++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var n="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return n?n.call(a):$jscomp.arrayIterator(a)};
|
2 |
+
jQuery(function(a){function n(c){c=c.match(ba);return null!=c&&1<c.length&&"string"===typeof c[1]&&0<c[1].length?c[1].toLowerCase():null}function E(c){return c.includes(":")?(c=c.split(":"),1E3*(3600*parseInt(c[0])+60*parseInt(c[1])+parseInt(c[2]))):null}function v(c){try{var l=Date.parse(c);isNaN(l)&&(l=null)}catch(G){l=null}if(null==l&&c.includes(" ")){c=c.split(" ");try{l=Date.parse(c[0]),l+=E(c[1]),isNaN(l)&&(l=null)}catch(G){l=null}}return l}function H(){(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&
|
3 |
+
"function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(c,l){l&&"useractioncomplete"===c.eventStatus&&(ai_tcData=c,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}function w(c){c=("; "+document.cookie).split("; "+c+"=");if(2===c.length)return c.pop().split(";").shift()}
|
4 |
+
function k(c){if(w(c)){var l=window.location.hostname;w(c)&&(document.cookie=c+"=;path=/"+(l?";domain="+l:"")+";expires=Thu, 01 Jan 1970 00:00:01 GMT");document.cookie=c+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}}Array.prototype.includes||(Array.prototype.includes=function(c){return!!~this.indexOf(c)});var ba=RegExp(":\\/\\/(.[^/:]+)","i");ai_process_lists=function(c){function l(m,e,d){if(0==m.length){if("!@!"==d)return!0;e!=d&&("true"==d.toLowerCase()?d=!0:"false"==d.toLowerCase()&&(d=
|
5 |
!1));return e==d}if("object"!=typeof e&&"array"!=typeof e)return!1;var h=m[0];m=m.slice(1);if("*"==h)for(e=$jscomp.makeIterator(Object.entries(e)),h=e.next();!h.done;h=e.next()){if(h=$jscomp.makeIterator(h.value),h.next(),h=h.next().value,l(m,h,d))return!0}else if(h in e)return l(m,e[h],d);return!1}function G(m,e,d){if("object"!=typeof m||-1==e.indexOf("["))return!1;e=e.replace(/]| /gi,"").split("[");return l(e,m,d)}function ca(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("IAB TCF 2.0 DETECTED"),
|
6 |
__tcfapi("getTCData",2,function(m,e){e?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==m.eventStatus||"useractioncomplete"==m.eventStatus?(ai_tcData=m,m.gdprApplies?a("#ai-iab-tcf-status").text("IAB TCF 2.0 DATA LOADED"):jQuery("#ai-iab-tcf-status").text("IAB TCF 2.0 GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},10)):"cmpuishown"==m.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("IAB TCF 2.0 CMP UI SHOWN"),
|
7 |
a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("IAB TCF 2.0 __tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function K(m){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&H(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,ca(),cookies_need_tcData=!0)):m&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("IAB TCF 2.0 MISSING: __tcfapi function not found"))}
|
8 |
+
c=null==c?a("div.ai-list-data, meta.ai-list-data"):c.filter(".ai-list-data");if(c.length){c.removeClass("ai-list-data");var V=getAllUrlParams(window.location.search);if(null!=V.referrer)var y=V.referrer;else y=document.referrer,""!=y&&(y=n(y));var R=window.navigator.userAgent,S=R.toLowerCase(),W=navigator.language,L=W.toLowerCase();if("undefined"!==typeof MobileDetect)var X=new MobileDetect(R);c.each(function(){var m=document.cookie.split(";");m.forEach(function(A,g){m[g]=A.trim()});var e=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),
|
9 |
+
d=!0,h=a(this).attr("referer-list");if("undefined"!=typeof h){h=b64d(h).split(",");var r=a(this).attr("referer-list-type"),I=!1;a.each(h,function(A,g){g=g.trim();if(""==g)return!0;if("*"==g.charAt(0))if("*"==g.charAt(g.length-1)){if(g=g.substr(1,g.length-2),-1!=y.indexOf(g))return I=!0,!1}else{if(g=g.substr(1),y.substr(-g.length)==g)return I=!0,!1}else if("*"==g.charAt(g.length-1)){if(g=g.substr(0,g.length-1),0==y.indexOf(g))return I=!0,!1}else if("#"==g){if(""==y)return I=!0,!1}else if(g==y)return I=
|
10 |
+
!0,!1});var p=I;switch(r){case "B":p&&(d=!1);break;case "W":p||(d=!1)}}if(d&&(h=a(this).attr("client-list"),"undefined"!=typeof h&&"undefined"!==typeof X))switch(h=b64d(h).split(","),r=a(this).attr("client-list-type"),p=!1,a.each(h,function(A,g){if(""==g.trim())return!0;var M=g.split("&&");a.each(M,function(da,b){var u=!0,t=!1;for(b=b.trim();"!!"==b.substring(0,2);)u=!u,b=b.substring(2);"language:"==b.substring(0,9)&&(t=!0,b=b.substring(9).toLowerCase());var q=!1;t?"*"==b.charAt(0)?"*"==b.charAt(b.length-
|
11 |
1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=L.indexOf(b)&&(q=!0)):(b=b.substr(1).toLowerCase(),L.substr(-b.length)==b&&(q=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==L.indexOf(b)&&(q=!0)):b==L&&(q=!0):"*"==b.charAt(0)?"*"==b.charAt(b.length-1)?(b=b.substr(1,b.length-2).toLowerCase(),-1!=S.indexOf(b)&&(q=!0)):(b=b.substr(1).toLowerCase(),S.substr(-b.length)==b&&(q=!0)):"*"==b.charAt(b.length-1)?(b=b.substr(0,b.length-1).toLowerCase(),0==S.indexOf(b)&&(q=!0)):X.is(b)&&
|
12 |
+
(q=!0);p=q?u:!u;if(!p)return!1});if(p)return!1}),r){case "B":p&&(d=!1);break;case "W":p||(d=!1)}var N=h=!1;for(r=1;2>=r;r++)if(d){switch(r){case 1:var f=a(this).attr("cookie-list");break;case 2:f=a(this).attr("parameter-list")}if("undefined"!=typeof f){f=b64d(f);switch(r){case 1:var B=a(this).attr("cookie-list-type");break;case 2:B=a(this).attr("parameter-list-type")}f=f.replace("tcf-gdpr","tcf-v2[gdprApplies]=true");f=f.replace("tcf-no-gdpr","tcf-v2[gdprApplies]=false");f=f.replace("tcf-google",
|
13 |
+
"tcf-v2[vendor][consents][755]=true && tcf-v2[purpose][consents][1]=true");f=f.replace("tcf-no-google","!!tcf-v2[vendor][consents][755]");f=f.replace("tcf-media.net","tcf-v2[vendor][consents][142]=true && tcf-v2[purpose][consents][1]=true");f=f.replace("tcf-no-media.net","!!tcf-v2[vendor][consents][142]");f=f.replace("tcf-amazon","tcf-v2[vendor][consents][793]=true && tcf-v2[purpose][consents][1]=true");f=f.replace("tcf-no-amazon","!!tcf-v2[vendor][consents][793]");f=f.replace("tcf-ezoic","tcf-v2[vendor][consents][347]=true && tcf-v2[purpose][consents][1]=true");
|
14 |
+
f=f.replace("tcf-no-ezoic","!!tcf-v2[vendor][consents][347]");var D=f.split(","),Y=[];m.forEach(function(A){A=A.split("=");try{var g=JSON.parse(decodeURIComponent(A[1]))}catch(M){g=decodeURIComponent(A[1])}Y[A[0]]=g});p=!1;var O=a(this);a.each(D,function(A,g){var M=g.split("&&");a.each(M,function(da,b){var u=!0;for(b=b.trim();"!!"==b.substring(0,2);)u=!u,b=b.substring(2);var t=b,q="!@!",Z=-1!=b.indexOf("["),aa=(0==b.indexOf("tcf-v2")||0==b.indexOf("euconsent-v2"))&&-1!=b.indexOf("[");-1!=b.indexOf("=")&&
|
15 |
+
(q=b.split("="),t=q[0],q=q[1],Z=-1!=t.indexOf("["),aa=(0==t.indexOf("tcf-v2")||0==t.indexOf("euconsent-v2"))&&-1!=t.indexOf("["));if(aa)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?(a("#ai-iab-tcf-bar").addClass("status-ok"),t=t.replace(/]| /gi,"").split("["),t.shift(),p=(t=l(t,ai_tcData,q))?u:!u):(O.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?K(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){"function"==typeof __tcfapi?K(!1):setTimeout(function(){"function"==
|
16 |
+
typeof __tcfapi?K(!1):setTimeout(function(){K(!0)},3E3)},1E3)},600)));else if(Z)p=(t=G(Y,t,q))?u:!u;else{var T=!1;"!@!"==q?m.every(function(ea){return ea.split("=")[0]==b?(T=!0,!1):!0}):T=-1!=m.indexOf(b);p=T?u:!u}if(!p)return!1});if(p)return!1});p&&(N=!1);switch(B){case "B":p&&(d=!1);break;case "W":p||(d=!1)}}}a(this).hasClass("ai-list-manual")&&(d?(O.removeClass("ai-list-data"),O.removeClass("ai-list-manual")):(h=!0,O.addClass("ai-list-data")));if(d||!h&&!N)if(f=a(this).data("debug-info"),"undefined"!=
|
17 |
+
typeof f&&(f=a("."+f),0!=f.length)){var x=f.parent();x.hasClass("ai-debug-info")&&x.remove()}x=a(this).prevAll(".ai-debug-bar.ai-debug-lists");f=""==y?"#":y;x.find(".ai-debug-name.ai-list-info").text(f).attr("title",R+"\n"+W);x.find(".ai-debug-name.ai-list-status").text(d?ai_front.visible:ai_front.hidden);f=!1;if(d&&(r=a(this).attr("scheduling-start"),B=a(this).attr("scheduling-end"),D=a(this).attr("scheduling-days"),"undefined"!=typeof r&&"undefined"!=typeof B&&"undefined"!=typeof D)){f=!0;var z=
|
18 |
+
b64d(r),P=b64d(B),U=parseInt(a(this).attr("scheduling-fallback")),Q=parseInt(a(this).attr("gmt"));z.includes("-")||P.includes("-")?(B=v(z)+Q,r=v(P)+Q):(B=E(z),r=E(P));D=b64d(D).split(",");x=a(this).attr("scheduling-type");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(x){case "B":z=!z}z||(d=!1);F=F.toISOString().split(".")[0].replace("T",
|
19 |
+
" ");x=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");x.find(".ai-debug-name.ai-scheduling-info").text(F+" "+J+" current_time:"+Math.floor(C.toString()/1E3)+" start_date:"+Math.floor(B/1E3).toString()+" ="+(C>=B).toString()+" end_date:"+Math.floor(r/1E3).toString()+" =:"+(C<r).toString()+" days:"+D.toString()+" =:"+D.includes(J.toString()).toString());x.find(".ai-debug-name.ai-scheduling-status").text(d?ai_front.visible:ai_front.hidden);d||0==U||(x.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),
|
20 |
+
x.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":""});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))):f&&!z&&0!=U?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&
|
21 |
+
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")),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"),
|
22 |
+
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"),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"==
|
23 |
+
typeof ai_load_blocks){var l=function(G){"cmplzEnableScripts"!=G.type&&"all"!==G.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",l);jQuery(document).on("cmplz_event_marketing",l)}},50);jQuery(".ai-debug-page-type").dblclick(function(){jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES");jQuery("#ai-iab-tcf-bar").show()});jQuery("#ai-iab-tcf-bar").click(function(){k("euconsent-v2");k("__lxG__consent__v2");k("__lxG__consent__v2_daisybit");k("__lxG__consent__v2_gdaisybit");k("CookieLawInfoConsent");
|
24 |
+
k("cookielawinfo-checkbox-advertisement");k("cookielawinfo-checkbox-analytics");k("cookielawinfo-checkbox-necessary");k("complianz_policy_id");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")})},
|
25 |
+
5)})});
|
26 |
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&&
|
27 |
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)}
|
28 |
+
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 v=n[E].split("="),H=void 0,w=v[0].replace(/\[\d*\]/,function(k){H=k.slice(1,-1);return""});v="undefined"===typeof v[1]?"":v[1];w=w.toLowerCase();v=v.toLowerCase();a[w]?("string"===typeof a[w]&&(a[w]=[a[w]]),"undefined"===typeof H?a[w].push(v):a[w][H]=v):a[w]=v}}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;
|
1 |
+
var javascript_version = "2.7.16"
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
js/ad-inserter.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
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=
|
1 |
+
var javascript_version="2.7.16",ignore_key=!0,start=1,end=16,active_tab=1,active_tab_0=0,tabs_to_configure=[],debug=!1,debug_title=!1,save_enabled=!0,current_tab=0,next_tab=0,syntax_highlighting=!1,settings_page="",dateFormat="yy-mm-dd",timeFormat="H:i:s",list_search_reload=!1,website_list_search_reload=!1,AI_DISABLED=0,AI_BEFORE_POST=1,AI_AFTER_POST=2,AI_BEFORE_CONTENT=3,AI_AFTER_CONTENT=4,AI_BEFORE_PARAGRAPH=5,AI_AFTER_PARAGRAPH=6,AI_BEFORE_EXCERPT=7,AI_AFTER_EXCERPT=8,AI_BETWEEN_POSTS=9,AI_BEFORE_COMMENTS=
|
2 |
10,AI_BETWEEN_COMMENTS=11,AI_AFTER_COMMENTS=12,AI_FOOTER=13,AI_ABOVE_HEADER=14,AI_BEFORE_HTML_ELEMENT=15,AI_AFTER_HTML_ELEMENT=16,AI_INSIDE_HTML_ELEMENT=17,AI_BEFORE_IMAGE=18,AI_AFTER_IMAGE=19,AI_ALIGNMENT_DEFAULT=0,AI_ALIGNMENT_LEFT=1,AI_ALIGNMENT_RIGHT=2,AI_ALIGNMENT_CENTER=3,AI_ALIGNMENT_FLOAT_LEFT=4,AI_ALIGNMENT_FLOAT_RIGHT=5,AI_ALIGNMENT_NO_WRAPPING=6,AI_ALIGNMENT_CUSTOM_CSS=7,AI_ALIGNMENT_STICKY_LEFT=8,AI_ALIGNMENT_STICKY_RIGHT=9,AI_ALIGNMENT_STICKY_TOP=10,AI_ALIGNMENT_STICKY_BOTTOM=11,AI_ALIGNMENT_STICKY=
|
3 |
12,AI_ADB_ACTION_NONE=0,AI_ADB_ACTION_MESSAGE=1,AI_ADB_ACTION_REDIRECTION=2,AI_ADB_BLOCK_ACTION_DO_NOTHING=0,AI_ADB_BLOCK_ACTION_REPLACE=1,AI_ADB_BLOCK_ACTION_SHOW=2,AI_ADB_BLOCK_ACTION_HIDE=3,AI_CODE_UNKNOWN=100,AI_CODE_BANNER=0,AI_CODE_ADSENSE=1,AI_CODE_AMAZON=2,AI_ADSENSE_STANDARD=0,AI_ADSENSE_LINK=1,AI_ADSENSE_IN_ARTICLE=2,AI_ADSENSE_IN_FEED=3,AI_ADSENSE_MATCHED_CONTENT=4,AI_ADSENSE_SIZE_FIXED=0,AI_ADSENSE_SIZE_RESPONSIVE=1,AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT=2,AI_HTML_INSERTION_CLIENT_SIDE=0,AI_HTML_INSERTION_SEREVR_SIDE=
|
4 |
2,AI_STICK_TO_THE_LEFT=0,AI_STICK_TO_THE_CONTENT_LEFT=1,AI_STICK_HORIZONTAL_CENTER=2,AI_STICK_TO_THE_CONTENT_RIGHT=3,AI_STICK_TO_THE_RIGHT=4,AI_STICK_TO_THE_TOP=0,AI_STICK_VERTICAL_CENTER=1,AI_SCROLL_WITH_THE_CONTENT=2,AI_STICK_TO_THE_BOTTOM=3,AI_ANIMATION_NONE=0,AI_BACKGROUND_REPEAT_DEFAULT=0,AI_BACKGROUND_REPEAT_NO=1,AI_BACKGROUND_REPEAT_YES=2,AI_BACKGROUND_REPEAT_HORIZONTALY=3,AI_BACKGROUND_REPEAT_VERTICALLY=4,AI_BACKGROUND_REPEAT_SPACE=5,AI_BACKGROUND_REPEAT_ROUND=6,AI_BACKGROUND_SIZE_DEFAULT=
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection,
|
|
6 |
Requires at least: 4.9
|
7 |
Tested up to: 6.0
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 2.7.
|
10 |
License: GPLv3
|
11 |
|
12 |
Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky widgets, AMP ads, DFP, tracking, AdSense header and footer code
|
@@ -359,9 +359,14 @@ If you are not happy to reveal this information and you have opted in, simply di
|
|
359 |
|
360 |
== Changelog ==
|
361 |
|
|
|
|
|
|
|
|
|
|
|
362 |
= 2.7.15 =
|
363 |
- Added filter hooks for ad labels
|
364 |
-
- Added support for
|
365 |
- Added support for rotation option index attribute
|
366 |
- Added shortcodes for block number and block name
|
367 |
- Few minor bug fixes, cosmetic changes and code improvements
|
@@ -653,9 +658,14 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
|
|
653 |
|
654 |
== Upgrade Notice ==
|
655 |
|
|
|
|
|
|
|
|
|
|
|
656 |
= 2.7.15 =
|
657 |
Added filter hooks for ad labels;
|
658 |
-
Added support for
|
659 |
Added support for rotation option index attribute;
|
660 |
Added shortcodes for block number and block name;
|
661 |
Few minor bug fixes, cosmetic changes and code improvements
|
6 |
Requires at least: 4.9
|
7 |
Tested up to: 6.0
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 2.7.16
|
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
|
359 |
|
360 |
== Changelog ==
|
361 |
|
362 |
+
= 2.7.16 =
|
363 |
+
- Added support for adb redirection page with url queries
|
364 |
+
- Added support for tcf-no-google shortcut
|
365 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
366 |
+
|
367 |
= 2.7.15 =
|
368 |
- Added filter hooks for ad labels
|
369 |
+
- Added support for constants
|
370 |
- Added support for rotation option index attribute
|
371 |
- Added shortcodes for block number and block name
|
372 |
- Few minor bug fixes, cosmetic changes and code improvements
|
658 |
|
659 |
== Upgrade Notice ==
|
660 |
|
661 |
+
= 2.7.16 =
|
662 |
+
Added support for adb redirection page with url queries
|
663 |
+
Added support for tcf-no-google shortcut
|
664 |
+
Few minor bug fixes, cosmetic changes and code improvements
|
665 |
+
|
666 |
= 2.7.15 =
|
667 |
Added filter hooks for ad labels;
|
668 |
+
Added support for constants;
|
669 |
Added support for rotation option index attribute;
|
670 |
Added shortcodes for block number and block name;
|
671 |
Few minor bug fixes, cosmetic changes and code improvements
|
settings.php
CHANGED
@@ -2796,21 +2796,21 @@ function generate_settings_form (){
|
|
2796 |
<div class="rounded">
|
2797 |
|
2798 |
<div style="margin: 0 0 8px 0;">
|
2799 |
-
<strong><?php _e ('
|
2800 |
-
<pre class="select ai-block-number" style="display: inline-block; margin: 0 5px 0 35px; color: blue; font-size: 11px; white-space: pre-wrap; word-wrap: break-word;">[adinserter data="<?php _e('
|
2801 |
</div>
|
2802 |
<?php
|
2803 |
|
2804 |
-
for ($
|
2805 |
-
$bottom_margin = $
|
2806 |
-
$
|
2807 |
|
2808 |
?>
|
2809 |
<div style="margin: 4px 0 <?php echo $bottom_margin; ?>px 0;">
|
2810 |
-
<?php /* Translators: %d:
|
2811 |
-
<input style="margin-left: 0px;" type="text" name="
|
2812 |
<?php _e ('Value', 'ad-inserter'); ?>
|
2813 |
-
<input type="text" name="
|
2814 |
</div>
|
2815 |
<?php
|
2816 |
}
|
@@ -5557,7 +5557,7 @@ function ai_check_page () {
|
|
5557 |
$positions [] = (int) $position;
|
5558 |
}
|
5559 |
} else {
|
5560 |
-
@unlink ($tmp_file);
|
5561 |
$error_string = $tmp_file->get_error_message();
|
5562 |
echo $error_string;
|
5563 |
return;
|
2796 |
<div class="rounded">
|
2797 |
|
2798 |
<div style="margin: 0 0 8px 0;">
|
2799 |
+
<strong><?php _e ('Constants', 'ad-inserter'); ?></strong>
|
2800 |
+
<pre class="select ai-block-number" style="display: inline-block; margin: 0 5px 0 35px; color: blue; font-size: 11px; white-space: pre-wrap; word-wrap: break-word;">[adinserter data="<?php _e('Constant name', 'ad-inserter'); ?>"]</pre>
|
2801 |
</div>
|
2802 |
<?php
|
2803 |
|
2804 |
+
for ($constant = 1; $constant <= 6; $constant ++) {
|
2805 |
+
$bottom_margin = $constant == 6 ? 0 : 4;
|
2806 |
+
$constant_name = get_constant_name ($constant);
|
2807 |
|
2808 |
?>
|
2809 |
<div style="margin: 4px 0 <?php echo $bottom_margin; ?>px 0;">
|
2810 |
+
<?php /* Translators: %d: constant number */ printf (__('Constant %d name', 'ad-inserter'), $constant); ?>
|
2811 |
+
<input style="margin-left: 0px;" type="text" name="constant-name-<?php echo $constant; ?>" value="<?php echo $constant_name; ?>" default="" size="15" maxlength="40" />
|
2812 |
<?php _e ('Value', 'ad-inserter'); ?>
|
2813 |
+
<input type="text" name="constant-value-<?php echo $constant; ?>" value="<?php echo get_constant_value ($constant); ?>" default="" size="30" maxlength="50" />
|
2814 |
</div>
|
2815 |
<?php
|
2816 |
}
|
5557 |
$positions [] = (int) $position;
|
5558 |
}
|
5559 |
} else {
|
5560 |
+
// @unlink ($tmp_file);
|
5561 |
$error_string = $tmp_file->get_error_message();
|
5562 |
echo $error_string;
|
5563 |
return;
|