Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.136.2

Version Description

April 7 2020 = * Mod: bbPress is using role exclusions now. * Mod: Show info on SpamFirewall block page. * Mod: Log SpamFirewall tests. * Fix: get_fields_any() fixed. * Fix: Multiple requests on WooCommerce checkout. * Fix: The SpamFirewall block page.

Download this release

Release Info

Developer Safronik
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 5.136.2
Comparing to
See all releases

Code changes from version 5.136.1 to 5.136.2

cleantalk.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: https://cleantalk.org
5
  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
6
- Version: 5.136.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: https://cleantalk.org
9
  Text Domain: cleantalk
@@ -612,9 +612,9 @@ function apbct_sfw__check()
612
  }
613
  }
614
 
615
- if($sfw->test){
616
- $sfw->sfw_die($apbct->api_key, '', parse_url(get_option('siteurl'),PHP_URL_HOST), 'test');
617
- }
618
 
619
  if($sfw->pass === false){
620
  foreach($sfw->blocked_ips as $ip){
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: https://cleantalk.org
5
  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
6
+ Version: 5.136.2
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: https://cleantalk.org
9
  Text Domain: cleantalk
612
  }
613
  }
614
 
615
+ // if($sfw->test){
616
+ // $sfw->sfw_die($apbct->api_key, '', parse_url(get_option('siteurl'),PHP_URL_HOST), 'test');
617
+ // }
618
 
619
  if($sfw->pass === false){
620
  foreach($sfw->blocked_ips as $ip){
css/cleantalk-public-admin.min.css CHANGED
@@ -1 +1 @@
1
- .ct_hidden{display:none}.ct_comment_info{position:relative;font-size:11px;line-height:12px;margin-bottom:15px}.ct_comment_titles{border-bottom:1px solid gray!important;background:inherit;margin-bottom:15px}p.ct_comment_info_title{display:inline-block}p.ct_comment_logo_title{float:right;display:inline-block}.ct_comment_logo_img{height:12px;vertical-align:text-top;box-shadow:transparent 0 0 0!important}.ct_this_is{padding:2px 3px;cursor:pointer;white-space:nowrap;color:#000!important;background:rgba(230,230,230,1);border:1px solid #777;border-radius:4px}p.ct_feedback_wrap{display:none;position:absolute;top:37px;width:100%;height:27px;background:#fff;margin:0;padding:6px;border-radius:3px}.ct_feedback_result{display:none;text-decoration:underline}.ct_feedback_result_spam{color:red}.ct_feedback_result_not_spam{color:green}.ct_feedback_msg a{color:green!important;text-decoration:underline}.ct_feedback_success{color:green}.ct_feedback_error{color:red}.ct_feedback_no_hash{color:#00f}
1
+ .ct_hidden{display:none}.ct_comment_info a,.ct_comment_info img,p.ct_comment_info_title,p.ct_comment_logo_title{display:inline-block}.ct_comment_info{position:relative;font-size:11px;line-height:12px;margin-bottom:15px}.ct_comment_titles{border-bottom:1px solid gray!important;background:inherit;margin-bottom:15px}p.ct_comment_logo_title{float:right}.ct_comment_logo_img{height:12px;vertical-align:text-top;box-shadow:transparent 0 0 0!important}.ct_this_is{padding:2px 3px;cursor:pointer;white-space:nowrap;color:#000!important;background:rgba(230,230,230,1);border:1px solid #777;border-radius:4px}p.ct_feedback_wrap{display:none;position:absolute;top:37px;left:0;width:100%;height:27px;margin:0;padding:6px;border-radius:3px;background:#fff}.ct_feedback_result{display:none;text-decoration:underline}.ct_feedback_result_spam{color:red}.ct_feedback_result_not_spam{color:green}.ct_feedback_msg a{color:green!important;text-decoration:underline}.ct_feedback_success{color:green}.ct_feedback_error{color:red}.ct_feedback_no_hash{color:#00f}
inc/cleantalk-ajax.php CHANGED
@@ -298,6 +298,7 @@ function ct_ajax_hook($message_obj = false, $additional = false)
298
  'pp_lf_process_login', //Skip login form
299
  'check_email', //Ajax email checking
300
  'dflg_do_sign_in_user', // Unknown plugin
 
301
  );
302
 
303
  // Skip test if
298
  'pp_lf_process_login', //Skip login form
299
  'check_email', //Ajax email checking
300
  'dflg_do_sign_in_user', // Unknown plugin
301
+ 'cartflows_save_cart_abandonment_data', // WooCommerce cartflow
302
  );
303
 
304
  // Skip test if
inc/cleantalk-common.php CHANGED
@@ -378,9 +378,9 @@ function apbct_get_sender_info() {
378
  'source_url' => !empty($urls) ? json_encode($urls) : null,
379
  // Debug stuff
380
  'amp_detected' => $amp_detected,
381
- 'hook' => current_action(),
382
  'headers_sent' => !empty($apbct->headers_sent) ? $apbct->headers_sent : false,
383
- 'headers_sent__hook' => !empty($apbct->headers_sent__hook) ? $apbct->headers_sent__hook : false,
384
  'headers_sent__where' => !empty($apbct->headers_sent__where) ? $apbct->headers_sent__where : false,
385
  'request_type' => apbct_get_server_variable('REQUEST_METHOD') ? apbct_get_server_variable('REQUEST_METHOD') : 'UNKNOWN',
386
  );
@@ -805,14 +805,15 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
805
  continue(2);
806
  }
807
  }unset($needle);
808
-
809
- // Removes whitespaces
810
- $value = urldecode( trim( strip_shortcodes( $value ) ) ); // Fully cleaned message
811
- $value_for_email = trim( strip_shortcodes( $value ) ); // Removes shortcodes to do better spam filtration on server side.
812
 
813
  // Email
814
  if ( ! $email && preg_match( "/^\S+@\S+\.\S+$/", $value_for_email ) ) {
815
  $email = $value_for_email;
 
 
 
816
 
817
  // Names
818
  }elseif (preg_match("/name/i", $key)){
378
  'source_url' => !empty($urls) ? json_encode($urls) : null,
379
  // Debug stuff
380
  'amp_detected' => $amp_detected,
381
+ 'hook' => current_action() ? current_action() : 'no_hook',
382
  'headers_sent' => !empty($apbct->headers_sent) ? $apbct->headers_sent : false,
383
+ 'headers_sent__hook' => !empty($apbct->headers_sent__hook) ? $apbct->headers_sent__hook : 'no_hook',
384
  'headers_sent__where' => !empty($apbct->headers_sent__where) ? $apbct->headers_sent__where : false,
385
  'request_type' => apbct_get_server_variable('REQUEST_METHOD') ? apbct_get_server_variable('REQUEST_METHOD') : 'UNKNOWN',
386
  );
805
  continue(2);
806
  }
807
  }unset($needle);
808
+
809
+ $value_for_email = trim( strip_shortcodes( $value ) ); // Removes shortcodes to do better spam filtration on server side.
 
 
810
 
811
  // Email
812
  if ( ! $email && preg_match( "/^\S+@\S+\.\S+$/", $value_for_email ) ) {
813
  $email = $value_for_email;
814
+
815
+ // Removes whitespaces
816
+ $value = urldecode( trim( strip_shortcodes( $value ) ) ); // Fully cleaned message
817
 
818
  // Names
819
  }elseif (preg_match("/name/i", $key)){
inc/cleantalk-public.php CHANGED
@@ -1105,7 +1105,8 @@ function ct_bbp_new_pre_content ($comment) {
1105
 
1106
  // Skip processing for logged in users and admin.
1107
  if ( !$apbct->settings['protect_logged_in'] && is_user_logged_in() ||
1108
- in_array("administrator", $current_user->roles)) {
 
1109
  do_action( 'apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST );
1110
  return $comment;
1111
  }
@@ -3742,9 +3743,9 @@ function ct_comments_output($curr_comment, $param2, $wp_list_comments_args){
3742
 
3743
  echo "</div>";
3744
 
 
3745
  $ending_tag = $wp_list_comments_args['style'];
3746
-
3747
- if( $apbct->active_theme === 'Paperio' ){
3748
  $ending_tag = is_null($wp_list_comments_args['style']) ? 'div' : $wp_list_comments_args['style'];
3749
  };
3750
 
1105
 
1106
  // Skip processing for logged in users and admin.
1107
  if ( !$apbct->settings['protect_logged_in'] && is_user_logged_in() ||
1108
+ apbct_exclusions_check()
1109
+ ) {
1110
  do_action( 'apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST );
1111
  return $comment;
1112
  }
3743
 
3744
  echo "</div>";
3745
 
3746
+ // @todo research what such themes and make exception for them
3747
  $ending_tag = $wp_list_comments_args['style'];
3748
+ if( in_array( $apbct->active_theme, array( 'Paperio', 'Twenty Twenty' ) ) ){
 
3749
  $ending_tag = is_null($wp_list_comments_args['style']) ? 'div' : $wp_list_comments_args['style'];
3750
  };
3751
 
inc/sfw_die_page.html CHANGED
@@ -39,10 +39,6 @@
39
  set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_pass_key','{SFW_COOKIE}');
40
  set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_passed','1');
41
 
42
- if(location.search.search('debug=1') === -1){
43
- window.location.href = window.location.origin + window.location.pathname + '?sfw=pass' + Math.round(ct_date.getTime()/1000);
44
- window.stop();
45
- }
46
  </script>
47
  </head>
48
 
@@ -78,6 +74,10 @@
78
  document.getElementById('js_info').style.display = 'none';
79
  document.getElementById('js_passed').style.display = 'block';
80
  document.getElementById('curr_date').innerHTML = ct_date.toGMTString();
 
 
 
 
81
  </script>
82
  {DEBUG}
83
  </body>
39
  set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_pass_key','{SFW_COOKIE}');
40
  set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_passed','1');
41
 
 
 
 
 
42
  </script>
43
  </head>
44
 
74
  document.getElementById('js_info').style.display = 'none';
75
  document.getElementById('js_passed').style.display = 'block';
76
  document.getElementById('curr_date').innerHTML = ct_date.toGMTString();
77
+
78
+ if(location.search.search('debug=1') === -1) {
79
+ window.location.href = window.location.origin + window.location.pathname + '?sfw=pass' + Math.round(ct_date.getTime() / 1000);
80
+ }
81
  </script>
82
  {DEBUG}
83
  </body>
js/apbct-public--alt.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["apbct-public--alt.js"],"names":["apbct_fingerprint","Fingerprint","canvas","ie_activex","hasher","apbct_md5","get","apbct_cookie__get","names","prefixes","cookie","split","document","forEach","item","i","arr","curr","trim","name","all","prefix","indexOf","apbct_cookie__delete","date","Date","toUTCString","jQuery","ready","ajax","type","url","apbctPublicAlt","ajax_url","data","apbct_action","apbct_secret","nonce","session_id","async","success","msg","console","log","JSON","parse","result","cookies","error","err","window","onunload"],"mappings":"AACA,IAAIA,kBAAoB,IAAIC,YAAY,CAACC,QAAQ,EAAMC,YAAY,EAAMC,OAA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C,mBAEbuC,OAAO,EACPC,QAAS,SAASC,GAIjB,GAHAC,QAAQC,IAAI,YACZF,EAAMG,KAAKC,MAAMJ,IAEVK,OAEN,IAAIpC,UADJgC,QAAQC,IAAIF,GACEA,EAAIM,QACjBL,QAAQC,IAAIjC,QAEZE,SAASF,OAASA,OAAS,IAAM+B,EAAIM,QAAQrC,QAAU,iBAGxDgC,QAAQC,IAAIF,GACZC,QAAQC,IAAI,6BAGdK,MAAO,SAASC,GACfP,QAAQC,IAAI,OACZD,QAAQC,IAAIM,MAIfC,OAAOC,SAAW,WAGhBJ,QAAUxC,oBAEXmC,QAAQC,IAAI,SAEXhB,OAAOE,KAAK,CACZC,KAAM,OACNC,IAAKC,eAAeC,SACpBC,KAAM,CACLC,aAAc,eACdC,aAAcJ,eAAeK,MAC7BC,WAAYtC,kBACZkC,KAAMa,SAEPR,OAAO,EACPC,QAAS,SAASC,IACjBA,EAAMG,KAAKC,MAAMJ,IACVK,QACNJ,QAAQC,IAAI,WACZD,QAAQC,IAAIF,GAEZlB,uBACAmB,QAAQC,IAAI,oBAEZD,QAAQC,IAAI,4BACZD,QAAQC,IAAIF,KAGdO,MAAO,SAASC,GACfP,QAAQC,IAAI,OACZD,QAAQC,IAAIM","file":"apbct-public--alt.min.js","sourcesContent":["// Fingerprint\nvar apbct_fingerprint = new Fingerprint({canvas: true, ie_activex: true, hasher: apbct_md5}).get();\n\n/* Function: Reuturns cookie with prefix */\nfunction apbct_cookie__get(names, prefixes){\n\tvar cookie = {};\n\tnames = names || null;\n\tif(typeof names == 'string') names = names.split();\n\tprefixes = prefixes || ['apbct_', 'ct_'];\n\tif(prefixes == 'none') prefixes = null;\n\tif(typeof prefixes == 'string') prefixes = prefixes.split();\n\tdocument.cookie.split(';').forEach(function(item, i, arr){\n\t\tvar curr = item.trim().split('=');\n\t\t// Detect by full cookie name\n\t\tif(names){\n\t\t\tnames.forEach(function(name, i, all){\n\t\t\t\tif(curr[0] === name)\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\n\t\t\t});\n\t\t}\n\t\t// Detect by name prefix\n\t\tif(prefixes){\n\t\t\tprefixes.forEach(function(prefix, i, all){\n\t\t\t\tif(curr[0].indexOf(prefix) === 0)\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\n\t\t\t});\n\t\t}\n\t});\n\treturn cookie;\n}\n\n/* Function: Deletes cookie with prefix */\nfunction apbct_cookie__delete(names, prefixes){\n\tvar date = new Date(0);\n\tnames = names || null;\n\tif(typeof names == 'string') names = names.split();\n\tprefixes = prefixes || ['apbct_', 'ct_'];\n\tif(prefixes == 'none') prefixes = null;\n\tif(typeof prefixes == 'string') prefixes = prefixes.split();\t\n\tdocument.cookie.split(';').forEach(function(item, i, arr){\n\t\tvar curr = item.trim().split('=');\n\t\t// Detect by full cookie name\n\t\tif(names){\n\t\t\tnames.forEach(function(name, i, all){\n\t\t\t\tif(curr[0] === name)\n\t\t\t\t\tdocument.cookie = curr[0] + \"=; path=/; expires=\" + date.toUTCString();\n\t\t\t});\n\t\t}\n\t\t// Detect by name prefix\n\t\tif(prefixes){\n\t\t\tprefixes.forEach(function(prefix, i, all){\n\t\t\t\tif(curr[0].indexOf(prefix) === 0)\n\t\t\t\t\tdocument.cookie = curr[0] + \"=; path=/; expires=\" + date.toUTCString();\n\t\t\t});\n\t\t}\n\t});\n}\n\njQuery(document).ready(function(){\n\t\n\t jQuery.ajax({\n\t\t type: \"POST\",\n\t\t url: apbctPublicAlt.ajax_url,\n\t\t data: {\n\t\t\t apbct_action: 'get_sessions',\n\t\t\t apbct_secret: apbctPublicAlt.nonce,\n\t\t\t session_id: apbct_fingerprint,\n\t\t },\n\t\t async: true,\n\t\t success: function(msg){\n\t\t\t console.log('success');\n\t\t\t msg = JSON.parse(msg);\n\t\t\t\n\t\t\t if(msg.result){\n\t\t\t\t console.log(msg);\n\t\t\t\t for(cookie in msg.cookies){\n\t\t\t\t\t console.log(cookie);\n//\t\t\t\t\t console.log(msg.cookies[cookie]);\n\t\t\t\t\t document.cookie = cookie + \"=\" + msg.cookies[cookie] + \"; path=/;\";\n\t\t\t\t };\n\t\t\t }else{\n\t\t\t\t console.log(msg);\n\t\t\t\t console.log('APBCT SESSIONS GET ERROR');\n\t\t\t }\n\t\t },\n\t\t error: function(err){\n\t\t\t console.log('err');\n\t\t\t console.log(err);\n\t\t }\n\t });\n\t\n\twindow.onunload = function(){\n\t\t\n\t\t// Getting ct_ and apbct_ cookies\n\t\t cookies = apbct_cookie__get();\n\t\t\n\t\tconsole.log('leave');\n\t\t\n\t\t jQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: apbctPublicAlt.ajax_url,\n\t\t\tdata: {\n\t\t\t\tapbct_action: 'set_sessions',\n\t\t\t\tapbct_secret: apbctPublicAlt.nonce,\n\t\t\t\tsession_id: apbct_fingerprint,\n\t\t\t\tdata: cookies,\n\t\t\t},\n\t\t\tasync: false,\n\t\t\tsuccess: function(msg){\n\t\t\t\tmsg = JSON.parse(msg);\n\t\t\t\tif(msg.result){\n\t\t\t\t\tconsole.log('success');\n\t\t\t\t\tconsole.log(msg);\n\t\t\t\t\t// Deleting ct_ and apbct_ cookies on success\n\t\t\t\t\tapbct_cookie__delete();\n\t\t\t\t\tconsole.log('cookie DELETED');\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log('APBCT SESSIONS GET ERROR');\n\t\t\t\t\tconsole.log(msg);\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function(err){\n\t\t\t\tconsole.log('err');\n\t\t\t\tconsole.log(err);\n\t\t\t}\n\t\t}); \n\t}\n});"]}
1
+ {"version":3,"sources":["apbct-public--alt.js"],"names":["apbct_fingerprint","Fingerprint","canvas","ie_activex","hasher","apbct_md5","get","apbct_cookie__get","names","prefixes","cookie","split","document","forEach","item","i","arr","curr","trim","name","all","prefix","indexOf","apbct_cookie__delete","date","Date","toUTCString","jQuery","ready","ajax","type","url","apbctPublicAlt","ajax_url","data","apbct_action","apbct_secret","nonce","session_id","async","success","msg","console","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D,OAAOE,KAAK,CACXC,KAAM,OACNC,IAAKC,eAAeC,SACpBC,KAAM,CACLC,aAAc,eACdC,aAAcJ,eAAeK,MAC7BC,WAAYtC,mBAEbuC,OAAO,EACPC,QAAS,SAASC,GAIjB,GAHAC,QAAQC,IAAI,YACZF,EAAMG,KAAKC,MAAMJ,IAEVK,OAEN,IAAIpC,UADJgC,QAAQC,IAAIF,GACEA,EAAIM,QACjBL,QAAQC,IAAIjC,QAEZE,SAASF,OAASA,OAAS,IAAM+B,EAAIM,QAAQrC,QAAU,iBAGxDgC,QAAQC,IAAIF,GACZC,QAAQC,IAAI,6BAGdK,MAAO,SAASC,GACfP,QAAQC,IAAI,OACZD,QAAQC,IAAIM,MAIfC,OAAOC,SAAW,WAGhBJ,QAAUxC,oBAEXmC,QAAQC,IAAI,SAEXhB,OAAOE,KAAK,CACZC,KAAM,OACNC,IAAKC,eAAeC,SACpBC,KAAM,CACLC,aAAc,eACdC,aAAcJ,eAAeK,MAC7BC,WAAYtC,kBACZkC,KAAMa,SAEPR,OAAO,EACPC,QAAS,SAASC,IACjBA,EAAMG,KAAKC,MAAMJ,IACVK,QACNJ,QAAQC,IAAI,WACZD,QAAQC,IAAIF,GAEZlB,uBACAmB,QAAQC,IAAI,oBAEZD,QAAQC,IAAI,4BACZD,QAAQC,IAAIF,KAGdO,MAAO,SAASC,GACfP,QAAQC,IAAI,OACZD,QAAQC,IAAIM","file":"apbct-public--alt.min.js","sourcesContent":["// Fingerprint\r\nvar apbct_fingerprint = new Fingerprint({canvas: true, ie_activex: true, hasher: apbct_md5}).get();\r\n\r\n/* Function: Reuturns cookie with prefix */\r\nfunction apbct_cookie__get(names, prefixes){\r\n\tvar cookie = {};\r\n\tnames = names || null;\r\n\tif(typeof names == 'string') names = names.split();\r\n\tprefixes = prefixes || ['apbct_', 'ct_'];\r\n\tif(prefixes == 'none') prefixes = null;\r\n\tif(typeof prefixes == 'string') prefixes = prefixes.split();\r\n\tdocument.cookie.split(';').forEach(function(item, i, arr){\r\n\t\tvar curr = item.trim().split('=');\r\n\t\t// Detect by full cookie name\r\n\t\tif(names){\r\n\t\t\tnames.forEach(function(name, i, all){\r\n\t\t\t\tif(curr[0] === name)\r\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\r\n\t\t\t});\r\n\t\t}\r\n\t\t// Detect by name prefix\r\n\t\tif(prefixes){\r\n\t\t\tprefixes.forEach(function(prefix, i, all){\r\n\t\t\t\tif(curr[0].indexOf(prefix) === 0)\r\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\treturn cookie;\r\n}\r\n\r\n/* Function: Deletes cookie with prefix */\r\nfunction apbct_cookie__delete(names, prefixes){\r\n\tvar date = new Date(0);\r\n\tnames = names || null;\r\n\tif(typeof names == 'string') names = names.split();\r\n\tprefixes = prefixes || ['apbct_', 'ct_'];\r\n\tif(prefixes == 'none') prefixes = null;\r\n\tif(typeof prefixes == 'string') prefixes = prefixes.split();\t\r\n\tdocument.cookie.split(';').forEach(function(item, i, arr){\r\n\t\tvar curr = item.trim().split('=');\r\n\t\t// Detect by full cookie name\r\n\t\tif(names){\r\n\t\t\tnames.forEach(function(name, i, all){\r\n\t\t\t\tif(curr[0] === name)\r\n\t\t\t\t\tdocument.cookie = curr[0] + \"=; path=/; expires=\" + date.toUTCString();\r\n\t\t\t});\r\n\t\t}\r\n\t\t// Detect by name prefix\r\n\t\tif(prefixes){\r\n\t\t\tprefixes.forEach(function(prefix, i, all){\r\n\t\t\t\tif(curr[0].indexOf(prefix) === 0)\r\n\t\t\t\t\tdocument.cookie = curr[0] + \"=; path=/; expires=\" + date.toUTCString();\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n\r\njQuery(document).ready(function(){\r\n\t\r\n\t jQuery.ajax({\r\n\t\t type: \"POST\",\r\n\t\t url: apbctPublicAlt.ajax_url,\r\n\t\t data: {\r\n\t\t\t apbct_action: 'get_sessions',\r\n\t\t\t apbct_secret: apbctPublicAlt.nonce,\r\n\t\t\t session_id: apbct_fingerprint,\r\n\t\t },\r\n\t\t async: true,\r\n\t\t success: function(msg){\r\n\t\t\t console.log('success');\r\n\t\t\t msg = JSON.parse(msg);\r\n\t\t\t\r\n\t\t\t if(msg.result){\r\n\t\t\t\t console.log(msg);\r\n\t\t\t\t for(cookie in msg.cookies){\r\n\t\t\t\t\t console.log(cookie);\r\n//\t\t\t\t\t console.log(msg.cookies[cookie]);\r\n\t\t\t\t\t document.cookie = cookie + \"=\" + msg.cookies[cookie] + \"; path=/;\";\r\n\t\t\t\t };\r\n\t\t\t }else{\r\n\t\t\t\t console.log(msg);\r\n\t\t\t\t console.log('APBCT SESSIONS GET ERROR');\r\n\t\t\t }\r\n\t\t },\r\n\t\t error: function(err){\r\n\t\t\t console.log('err');\r\n\t\t\t console.log(err);\r\n\t\t }\r\n\t });\r\n\t\r\n\twindow.onunload = function(){\r\n\t\t\r\n\t\t// Getting ct_ and apbct_ cookies\r\n\t\t cookies = apbct_cookie__get();\r\n\t\t\r\n\t\tconsole.log('leave');\r\n\t\t\r\n\t\t jQuery.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: apbctPublicAlt.ajax_url,\r\n\t\t\tdata: {\r\n\t\t\t\tapbct_action: 'set_sessions',\r\n\t\t\t\tapbct_secret: apbctPublicAlt.nonce,\r\n\t\t\t\tsession_id: apbct_fingerprint,\r\n\t\t\t\tdata: cookies,\r\n\t\t\t},\r\n\t\t\tasync: false,\r\n\t\t\tsuccess: function(msg){\r\n\t\t\t\tmsg = JSON.parse(msg);\r\n\t\t\t\tif(msg.result){\r\n\t\t\t\t\tconsole.log('success');\r\n\t\t\t\t\tconsole.log(msg);\r\n\t\t\t\t\t// Deleting ct_ and apbct_ cookies on success\r\n\t\t\t\t\tapbct_cookie__delete();\r\n\t\t\t\t\tconsole.log('cookie DELETED');\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.log('APBCT SESSIONS GET ERROR');\r\n\t\t\t\t\tconsole.log(msg);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: function(err){\r\n\t\t\t\tconsole.log('err');\r\n\t\t\t\tconsole.log(err);\r\n\t\t\t}\r\n\t\t}); \r\n\t}\r\n});"]}
js/apbct-public--gdpr.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["apbct-public--gdpr.js"],"names":["jQuery","document","ready","ctPublicGDPR","gdpr_forms","forEach","item","i","arr","elem","is","find","children","first","attr","indexOf","append","gdpr_text"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAElBC,aAAaC,YAEjBD,aAAaC,WAAWC,QAAQ,SAASC,EAAMC,EAAGC,GAEjD,IAAIC,EAAOT,OAAO,IAAIM,EAAK,MAAMA,GAG7BG,EAAKC,GAAG,UAERD,EAAKE,KAAK,QAAQ,GACpBF,EAAOA,EAAKG,SAAS,QAAQC,QAEtBb,OAAO,qBAAqB,KAA0E,IAApEA,OAAO,qBAAqBc,KAAK,MAAMC,QAAQ,UAAUT,GAClGG,EAAOT,OAAO,qBAEPA,OAAO,cAAc,KAA6E,IAAvEA,OAAO,cAAca,QAAQC,KAAK,MAAMC,QAAQ,YAAYT,GAC9FG,EAAOT,OAAO,cAAca,QAAQD,SAAS,QAEtCZ,OAAO,iBAAiB,KAAoF,IAA9EA,OAAO,iBAAiBa,QAAQC,KAAK,MAAMC,QAAQ,gBAAgBT,KACxGG,EAAOT,OAAO,oBAIbS,EAAKC,GAAG,SAAiC,SAAtBD,EAAKK,KAAK,SAC/BL,EAAKO,OAAO,yBAAyBT,EAAE,wFACrCS,OAAO,mDAAmDT,EAAE,KAAKJ,aAAac,UAAU","file":"apbct-public--gdpr.min.js","sourcesContent":["jQuery(document).ready(function(){\n\t\n\tif(!ctPublicGDPR.gdpr_forms) return;\n\t\n\tctPublicGDPR.gdpr_forms.forEach(function(item, i, arr){\n\t\t\n\t\tvar elem = jQuery('#'+item+', .'+item);\n\t\t\n\t\t// Filter forms\n\t\tif(!elem.is('form')){\n\t\t\t// Caldera\n\t\t\tif(elem.find('form')[0])\n\t\t\t\telem = elem.children('form').first();\n\t\t\t// Contact Form 7\n\t\t\telse if(jQuery('.wpcf7[role=form]')[0] && jQuery('.wpcf7[role=form]').attr('id').indexOf('wpcf7-f'+item) !== -1)\n\t\t\t\telem = jQuery('.wpcf7[role=form]');\n\t\t\t// Formidable\n\t\t\telse if(jQuery('.frm_forms')[0] && jQuery('.frm_forms').first().attr('id').indexOf('frm_form_'+item) !== -1)\n\t\t\t\telem = jQuery('.frm_forms').first().children('form');\n\t\t\t// WPForms\n\t\t\telse if(jQuery('.wpforms-form')[0] && jQuery('.wpforms-form').first().attr('id').indexOf('wpforms-form-'+item) !== -1)\n\t\t\t\telem = jQuery('.wpforms-form');\n\t\t}\n\t\t\n\t\t// Adding notice\n\t\tif(elem.is('form') || elem.attr('role') === 'form'){\n\t\t\telem.append('<input id=\"apbct_gdpr_'+i+'\" type=\"checkbox\" required=\"required \" style=\"display: inline; margin-right: 10px;\">')\n\t\t\t\t.append('<label style=\"display: inline;\" for=\"apbct_gdpr_'+i+'\">'+ctPublicGDPR.gdpr_text+'</label>');\n\t\t}\n\t});\n\t\n});"]}
1
+ {"version":3,"sources":["apbct-public--gdpr.js"],"names":["jQuery","document","ready","ctPublicGDPR","gdpr_forms","forEach","item","i","arr","elem","is","find","children","first","attr","indexOf","append","gdpr_text"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAElBC,aAAaC,YAEjBD,aAAaC,WAAWC,QAAQ,SAASC,EAAMC,EAAGC,GAEjD,IAAIC,EAAOT,OAAO,IAAIM,EAAK,MAAMA,GAG7BG,EAAKC,GAAG,UAERD,EAAKE,KAAK,QAAQ,GACpBF,EAAOA,EAAKG,SAAS,QAAQC,QAEtBb,OAAO,qBAAqB,KAA0E,IAApEA,OAAO,qBAAqBc,KAAK,MAAMC,QAAQ,UAAUT,GAClGG,EAAOT,OAAO,qBAEPA,OAAO,cAAc,KAA6E,IAAvEA,OAAO,cAAca,QAAQC,KAAK,MAAMC,QAAQ,YAAYT,GAC9FG,EAAOT,OAAO,cAAca,QAAQD,SAAS,QAEtCZ,OAAO,iBAAiB,KAAoF,IAA9EA,OAAO,iBAAiBa,QAAQC,KAAK,MAAMC,QAAQ,gBAAgBT,KACxGG,EAAOT,OAAO,oBAIbS,EAAKC,GAAG,SAAiC,SAAtBD,EAAKK,KAAK,SAC/BL,EAAKO,OAAO,yBAAyBT,EAAE,wFACrCS,OAAO,mDAAmDT,EAAE,KAAKJ,aAAac,UAAU","file":"apbct-public--gdpr.min.js","sourcesContent":["jQuery(document).ready(function(){\r\n\t\r\n\tif(!ctPublicGDPR.gdpr_forms) return;\r\n\t\r\n\tctPublicGDPR.gdpr_forms.forEach(function(item, i, arr){\r\n\t\t\r\n\t\tvar elem = jQuery('#'+item+', .'+item);\r\n\t\t\r\n\t\t// Filter forms\r\n\t\tif(!elem.is('form')){\r\n\t\t\t// Caldera\r\n\t\t\tif(elem.find('form')[0])\r\n\t\t\t\telem = elem.children('form').first();\r\n\t\t\t// Contact Form 7\r\n\t\t\telse if(jQuery('.wpcf7[role=form]')[0] && jQuery('.wpcf7[role=form]').attr('id').indexOf('wpcf7-f'+item) !== -1)\r\n\t\t\t\telem = jQuery('.wpcf7[role=form]');\r\n\t\t\t// Formidable\r\n\t\t\telse if(jQuery('.frm_forms')[0] && jQuery('.frm_forms').first().attr('id').indexOf('frm_form_'+item) !== -1)\r\n\t\t\t\telem = jQuery('.frm_forms').first().children('form');\r\n\t\t\t// WPForms\r\n\t\t\telse if(jQuery('.wpforms-form')[0] && jQuery('.wpforms-form').first().attr('id').indexOf('wpforms-form-'+item) !== -1)\r\n\t\t\t\telem = jQuery('.wpforms-form');\r\n\t\t}\r\n\t\t\r\n\t\t// Adding notice\r\n\t\tif(elem.is('form') || elem.attr('role') === 'form'){\r\n\t\t\telem.append('<input id=\"apbct_gdpr_'+i+'\" type=\"checkbox\" required=\"required \" style=\"display: inline; margin-right: 10px;\">')\r\n\t\t\t\t.append('<label style=\"display: inline;\" for=\"apbct_gdpr_'+i+'\">'+ctPublicGDPR.gdpr_text+'</label>');\r\n\t\t}\r\n\t});\r\n\t\r\n});"]}
js/apbct-public.min.js CHANGED
@@ -1,2 +1,2 @@
1
- function apbct_js_keys__set_input_value(e,t,n,o){if(null!==document.getElementById(n.input_name)){var i=document.getElementById(n.input_name).value;document.getElementById(n.input_name).value=document.getElementById(n.input_name).value.replace(i,e.js_key)}}if(function(){var e=new Date,t=(new Date).getTime(),n=!0,o=[],i=0;function a(e,t){document.cookie=e+"="+encodeURIComponent(t)+"; path=/"}function u(e,t,n){"function"==typeof window.addEventListener?e.addEventListener(t,n):e.attachEvent(t,n)}function c(e,t,n){"function"==typeof window.removeEventListener?e.removeEventListener(t,n):e.detachEvent(t,n)}a("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),a("ct_fkp_timestamp","0"),a("ct_pointer_data","0"),a("ct_timezone","0"),setTimeout(function(){a("ct_timezone",e.getTimezoneOffset()/60*-1)},1e3);var r=function(e){a("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),c(window,"mousedown",r),c(window,"keydown",r)},s=setInterval(function(){n=!0},150),l=setInterval(function(){a("ct_pointer_data",JSON.stringify(o))},1200),m=function(e){!0===n&&(o.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-t)]),n=!1,50<=++i&&(c(window,"mousemove",m),clearInterval(s),clearInterval(l)))};u(window,"mousemove",m),u(window,"mousedown",r),u(window,"keydown",r),u(window,"DOMContentLoaded",function(){a("apbct_visible_fields",0),a("apbct_visible_fields_count",0),setTimeout(function(){for(var e=0;e<document.forms.length;e++){var t=document.forms[e];t.classList.contains("slp_search_form")||(t.onsubmit_prev=t.onsubmit,t.onsubmit=function(e){var t=[];for(var n in this.elements)isNaN(+n)||(t[n]=this.elements[n]);var o=(t=t.filter(function(o){return"none"!==getComputedStyle(o).display&&"hidden"!==getComputedStyle(o).visibility&&"0"!==getComputedStyle(o).opacity&&"hidden"!==o.getAttribute("type")&&"submit"!==o.getAttribute("type")&&""!==o.value&&null!==o.getAttribute("name")&&("radio"===o.getAttribute("type")&&t.forEach(function(e,t,n){o.getAttribute("name")!==e.getAttribute("name")||!1}),!0)})).length,i="";t.forEach(function(e,t,n){i+=" "+e.getAttribute("name")}),a("apbct_visible_fields",i=i.trim()),a("apbct_visible_fields_count",o),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}},1e3)})}(),"undefined"!=typeof jQuery){function apbct_sendAJAXRequest(o,t,n){var i=t.callback||null,a=t.notJson||null,e=t.timeout||15e3;n=n||null;o._ajax_nonce=ctPublic._ajax_nonce,jQuery.ajax({type:"POST",url:ctPublic._ajax_url,data:o,success:function(e){a||(e=JSON.parse(e)),e.error||i&&i(e,o,t,n)},error:function(e,t,n){console.log("APBCT_AJAX_ERROR"),console.log(o),console.log(e),console.log(t),console.log(n)},timeout:e})}jQuery(document).ajaxComplete(function(e,t,n){if(t.responseText&&-1!==t.responseText.indexOf('"apbct')){var o=JSON.parse(t.responseText);void 0!==o.apbct&&(o=o.apbct).blocked&&alert(o.comment)}})}
2
  //# sourceMappingURL=apbct-public.min.js.map
1
+ function apbct_js_keys__set_input_value(e,t,n,o){if(null!==document.getElementById(n.input_name)){var i=document.getElementById(n.input_name).value;document.getElementById(n.input_name).value=document.getElementById(n.input_name).value.replace(i,e.js_key)}}if(function(){var e=new Date,t=(new Date).getTime(),n=!0,o=[],i=0;function a(e,t){document.cookie=e+"="+encodeURIComponent(t)+"; path=/"}function u(e,t,n){"function"==typeof window.addEventListener?e.addEventListener(t,n):e.attachEvent(t,n)}function c(e,t,n){"function"==typeof window.removeEventListener?e.removeEventListener(t,n):e.detachEvent(t,n)}a("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),a("ct_fkp_timestamp","0"),a("ct_pointer_data","0"),a("ct_timezone","0"),setTimeout(function(){a("ct_timezone",e.getTimezoneOffset()/60*-1)},1e3);var r=function(e){a("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),c(window,"mousedown",r),c(window,"keydown",r)},s=setInterval(function(){n=!0},150),l=setInterval(function(){a("ct_pointer_data",JSON.stringify(o))},1200),m=function(e){!0===n&&(o.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-t)]),n=!1,50<=++i&&(c(window,"mousemove",m),clearInterval(s),clearInterval(l)))};u(window,"mousemove",m),u(window,"mousedown",r),u(window,"keydown",r),u(window,"DOMContentLoaded",function(){a("apbct_visible_fields",0),a("apbct_visible_fields_count",0),setTimeout(function(){for(var e=0;e<document.forms.length;e++){var t=document.forms[e];t.classList.contains("slp_search_form")||(t.onsubmit_prev=t.onsubmit,t.onsubmit=function(e){var t=[];for(var n in this.elements)isNaN(+n)||(t[n]=this.elements[n]);var o=(t=t.filter(function(o){return"none"!==getComputedStyle(o).display&&"hidden"!==getComputedStyle(o).visibility&&"0"!==getComputedStyle(o).opacity&&"hidden"!==o.getAttribute("type")&&"submit"!==o.getAttribute("type")&&""!==o.value&&null!==o.getAttribute("name")&&("radio"===o.getAttribute("type")&&t.forEach(function(e,t,n){o.getAttribute("name")!==e.getAttribute("name")||!1}),!0)})).length,i="";t.forEach(function(e,t,n){i+=" "+e.getAttribute("name")}),a("apbct_visible_fields",i=i.trim()),a("apbct_visible_fields_count",o),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}},1e3)})}(),"undefined"!=typeof jQuery){function apbct_sendAJAXRequest(o,t,n){var i=t.callback||null,a=t.notJson||null,e=t.timeout||15e3;n=n||null;o._ajax_nonce=ctPublic._ajax_nonce,jQuery.ajax({type:"POST",url:ctPublic._ajax_url,data:o,success:function(e){a||(e=JSON.parse(e)),e.error||i&&i(e,o,t,n)},error:function(e,t,n){console.log("APBCT_AJAX_ERROR"),console.log(o),console.log(e),console.log(t),console.log(n)},timeout:e})}jQuery(document).ajaxComplete(function(e,t,n){if(t.responseText&&-1!==t.responseText.indexOf('"apbct')){var o=JSON.parse(t.responseText);void 0!==o.apbct&&(o=o.apbct).blocked&&(alert(o.comment),window.stop())}})}
2
  //# sourceMappingURL=apbct-public.min.js.map
js/apbct-public.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["apbct-public.js"],"names":["apbct_js_keys__set_input_value","result","data","params","obj","document","getElementById","input_name","ct_input_value","value","replace","js_key","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctSetCookieSec","c_name","cookie","encodeURIComponent","apbct_attach_event_handler","elem","event","callback","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","Math","floor","setTimeout","getTimezoneOffset","ctFunctionFirstKey","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","JSON","stringify","ctFunctionMouseMove","push","round","clientY","clientX","clearInterval","i","forms","length","form","classList","contains","onsubmit_prev","onsubmit","elements","key","this","isNaN","visible_fields_count","filter","getComputedStyle","display","visibility","opacity","getAttribute","forEach","el","j","els","visible_fields","trim","target","Function","call","jQuery","apbct_sendAJAXRequest","notJson","timeout","_ajax_nonce","ctPublic","ajax","type","url","_ajax_url","success","parse","error","jqXHR","textStatus","errorThrown","console","log","ajaxComplete","xhr","settings","responseText","indexOf","response","apbct","blocked","alert","comment"],"mappings":"AAkKA,SAASA,+BAA+BC,EAAQC,EAAMC,EAAQC,GAC7D,GAAmD,OAA/CC,SAASC,eAAeH,EAAOI,YAAsB,CACxD,IAAIC,EAAiBH,SAASC,eAAeH,EAAOI,YAAYE,MAChEJ,SAASC,eAAeH,EAAOI,YAAYE,MAAQJ,SAASC,eAAeH,EAAOI,YAAYE,MAAMC,QAAQF,EAAgBP,EAAOU,SAIrI,GAzKC,WAEA,IAAIC,EAAU,IAAIC,KACjBC,GAAW,IAAID,MAAOE,UACtBC,GAAwB,EACxBC,EAAc,GACdC,EAAqB,EAEtB,SAASC,EAAeC,EAAQX,GA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F,KAAMA,EACNqF,QAAS,SAAUtF,GACb8E,IAAS9E,EAASwC,KAAK+C,MAAMvF,IAC9BA,EAAOwF,OAGN/D,GACHA,EAASzB,EAAQC,EAAMC,EAAQC,IAGlCqF,MAAO,SAAUC,EAAOC,EAAYC,GACnCC,QAAQC,IAAI,oBACZD,QAAQC,IAAI5F,GACZ2F,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,IAEbZ,QAASA,IA1CXH,OAAOxE,UAAU0F,aAAa,SAAUtE,EAAOuE,EAAKC,GACnD,GAAID,EAAIE,eAAwD,IAAxCF,EAAIE,aAAaC,QAAQ,UAAkB,CAClE,IAAIC,EAAW3D,KAAK+C,MAAMQ,EAAIE,mBACA,IAAnBE,EAASC,QACnBD,EAAWA,EAASC,OACPC,SACZC,MAAMH,EAASI","file":"apbct-public.min.js","sourcesContent":["(function() {\n\n\tvar ct_date = new Date(),\n\t\tctTimeMs = new Date().getTime(),\n\t\tctMouseEventTimerFlag = true, //Reading interval flag\n\t\tctMouseData = [],\n\t\tctMouseDataCounter = 0;\n\n\tfunction ctSetCookieSec(c_name, value) {\n\t\tdocument.cookie = c_name + \"=\" + encodeURIComponent(value) + \"; path=/\";\n\t}\n\n\tfunction apbct_attach_event_handler(elem, event, callback){\n\t\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\n\t\telse elem.attachEvent(event, callback);\n\t}\n\n\tfunction apbct_remove_event_handler(elem, event, callback){\n\t\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\n\t\telse elem.detachEvent(event, callback);\n\t}\n\n\tctSetCookieSec(\"ct_ps_timestamp\", Math.floor(new Date().getTime()/1000));\n\tctSetCookieSec(\"ct_fkp_timestamp\", \"0\");\n\tctSetCookieSec(\"ct_pointer_data\", \"0\");\n\tctSetCookieSec(\"ct_timezone\", \"0\");\n\n\tsetTimeout(function(){\n\t\tctSetCookieSec(\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1));\n\t},1000);\n\n\t//Writing first key press timestamp\n\tvar ctFunctionFirstKey = function output(event){\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\t\tctSetCookieSec(\"ct_fkp_timestamp\", KeyTimestamp);\n\t\tctKeyStopStopListening();\n\t};\n\n\t//Reading interval\n\tvar ctMouseReadInterval = setInterval(function(){\n\t\tctMouseEventTimerFlag = true;\n\t}, 150);\n\n\t//Writting interval\n\tvar ctMouseWriteDataInterval = setInterval(function(){\n\t\tctSetCookieSec(\"ct_pointer_data\", JSON.stringify(ctMouseData));\n\t}, 1200);\n\n\t//Logging mouse position each 150 ms\n\tvar ctFunctionMouseMove = function output(event){\n\t\tif(ctMouseEventTimerFlag === true){\n\n\t\t\tctMouseData.push([\n\t\t\t\tMath.round(event.clientY),\n\t\t\t\tMath.round(event.clientX),\n\t\t\t\tMath.round(new Date().getTime() - ctTimeMs)\n\t\t\t]);\n\n\t\t\tctMouseDataCounter++;\n\t\t\tctMouseEventTimerFlag = false;\n\t\t\tif(ctMouseDataCounter >= 50){\n\t\t\t\tctMouseStopData();\n\t\t\t}\n\t\t}\n\t};\n\n\t//Stop mouse observing function\n\tfunction ctMouseStopData(){\n\t\tapbct_remove_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\t\tclearInterval(ctMouseReadInterval);\n\t\tclearInterval(ctMouseWriteDataInterval);\n\t}\n\n\t//Stop key listening function\n\tfunction ctKeyStopStopListening(){\n\t\tapbct_remove_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\t\tapbct_remove_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\t}\n\n\tapbct_attach_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\tapbct_attach_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\n\t// Ready function\n\tfunction apbct_ready(){\n\t\tctSetCookieSec(\"apbct_visible_fields\", 0);\n\t\tctSetCookieSec(\"apbct_visible_fields_count\", 0);\n\t\tsetTimeout(function(){\n\t\t\tfor(var i = 0; i < document.forms.length; i++){\n\t\t\t\tvar form = document.forms[i];\n\n\t\t\t\t//Exclusion for StoreLocatorPlus form\n\t\t\t\tif (form.classList.contains('slp_search_form'))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\n\t\t\t\tform.onsubmit = function(event){\n\n\t\t\t\t\t// Get only fields\n\t\t\t\t\tvar elements = [];\n\t\t\t\t\tfor(var key in this.elements){\n\t\t\t\t\t\tif(!isNaN(+key))\n\t\t\t\t\t\t\telements[key] = this.elements[key];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Filter fields\n\t\t\t\t\telements = elements.filter(function(elem){\n\n\t\t\t\t\t\tvar pass = true;\n\n\t\t\t\t\t\t// Filter fields\n\t\t\t\t\t\tif( getComputedStyle(elem).display === \"none\" || // hidden\n\t\t\t\t\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\t\t\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\t\t\t\t\telem.getAttribute(\"type\") === \"hidden\" || // type == hidden\n\t\t\t\t\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\t\t\t\t\telem.value === \"\" || // empty value\n\t\t\t\t\t\t\telem.getAttribute('name') === null\n\t\t\t\t\t\t){\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Filter elements with same names for type == radio\n\t\t\t\t\t\tif(elem.getAttribute(\"type\") === \"radio\"){\n\t\t\t\t\t\t\telements.forEach(function(el, j, els){\n\t\t\t\t\t\t\t\tif(elem.getAttribute('name') === el.getAttribute('name')){\n\t\t\t\t\t\t\t\t\tpass = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t});\n\n\t\t\t\t\t// Visible fields count\n\t\t\t\t\tvar visible_fields_count = elements.length;\n\n\t\t\t\t\t// Visible fields\n\t\t\t\t\tvar visible_fields = '';\n\t\t\t\t\telements.forEach(function(elem, i, elements){\n\t\t\t\t\t\tvisible_fields += \" \" + elem.getAttribute(\"name\");\n\t\t\t\t\t});\n\t\t\t\t\tvisible_fields = visible_fields.trim();\n\n\t\t\t\t\tctSetCookieSec(\"apbct_visible_fields\", visible_fields);\n\t\t\t\t\tctSetCookieSec(\"apbct_visible_fields_count\", visible_fields_count);\n\n\t\t\t\t\t// Call previous submit action\n\t\t\t\t\tif(event.target.onsubmit_prev instanceof Function){\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t}, 1000);\n\t}\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\n\n}());\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif (document.getElementById(params.input_name) !== null) {\n\t\tvar ct_input_value = document.getElementById(params.input_name).value;\n\t\tdocument.getElementById(params.input_name).value = document.getElementById(params.input_name).value.replace(ct_input_value, result.js_key);\n\t}\n}\n\nif(typeof jQuery !== 'undefined') {\n\n\t// Capturing responses and output block message for unknown AJAX forms\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\n\t\t\tvar response = JSON.parse(xhr.responseText);\n\t\t\tif (typeof response.apbct !== 'undefined') {\n\t\t\t\tresponse = response.apbct;\n\t\t\t\tif (response.blocked) {\n\t\t\t\t\talert(response.comment);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction apbct_sendAJAXRequest(data, params, obj) {\n\n\t\t// Default params\n\t\tvar callback = params.callback || null;\n\t\tvar notJson = params.notJson || null;\n\t\tvar timeout = params.timeout || 15000;\n\t\tvar obj = obj || null;\n\n\t\tdata._ajax_nonce = ctPublic._ajax_nonce;\n\n\t\tjQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: ctPublic._ajax_url,\n\t\t\tdata: data,\n\t\t\tsuccess: function (result) {\n\t\t\t\tif (!notJson) result = JSON.parse(result);\n\t\t\t\tif (result.error) {\n\n\t\t\t\t} else {\n\t\t\t\t\tif (callback)\n\t\t\t\t\t\tcallback(result, data, params, obj);\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function (jqXHR, textStatus, errorThrown) {\n\t\t\t\tconsole.log('APBCT_AJAX_ERROR');\n\t\t\t\tconsole.log(data);\n\t\t\t\tconsole.log(jqXHR);\n\t\t\t\tconsole.log(textStatus);\n\t\t\t\tconsole.log(errorThrown);\n\t\t\t},\n\t\t\ttimeout: timeout\n\t\t});\n\t}\n}"]}
1
+ {"version":3,"sources":["apbct-public.js"],"names":["apbct_js_keys__set_input_value","result","data","params","obj","document","getElementById","input_name","ct_input_value","value","replace","js_key","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctSetCookieSec","c_name","cookie","encodeURIComponent","apbct_attach_event_handler","elem","event","callback","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","Math","floor","setTimeout","getTimezoneOffset","ctFunctionFirstKey","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","JSON","stringify","ctFunctionMouseMove","push","round","clientY","clientX","clearInterval","i","forms","length","form","classList","contains","onsubmit_prev","onsubmit","elements","key","this","isNaN","visible_fields_count","filter","getComputedStyle","display","visibility","opacity","getAttribute","forEach","el","j","els","visible_fields","trim","target","Function","call","jQuery","apbct_sendAJAXRequest","notJson","timeout","_ajax_nonce","ctPublic","ajax","type","url","_ajax_url","success","parse","error","jqXHR","textStatus","errorThrown","console","log","ajaxComplete","xhr","settings","responseText","indexOf","response","apbct","blocked","alert","comment","stop"],"mappings":"AAkKA,SAASA,+BAA+BC,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,WAAW,WACVV,EAAMiD,OAAOnB,cAAcqB,KAAKnD,EAAMiD,OAAQjD,IAC5C,SAIJ,OA5JL,GAyKqB,oBAAXoD,OAAwB,CAiBjC,SAASC,sBAAsB5E,EAAMC,EAAQC,GAG5C,IAAIsB,EAAWvB,EAAOuB,UAAY,KAC9BqD,EAAU5E,EAAO4E,SAAW,KAC5BC,EAAU7E,EAAO6E,SAAW,KAC5B5E,EAAMA,GAAO,KAEjBF,EAAK+E,YAAcC,SAASD,YAE5BJ,OAAOM,KAAK,CACXC,KAAM,OACNC,IAAKH,SAASI,UACdpF,KAAMA,EACNqF,QAAS,SAAUtF,GACb8E,IAAS9E,EAASwC,KAAK+C,MAAMvF,IAC9BA,EAAOwF,OAGN/D,GACHA,EAASzB,EAAQC,EAAMC,EAAQC,IAGlCqF,MAAO,SAAUC,EAAOC,EAAYC,GACnCC,QAAQC,IAAI,oBACZD,QAAQC,IAAI5F,GACZ2F,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,IAEbZ,QAASA,IA5CXH,OAAOxE,UAAU0F,aAAa,SAAUtE,EAAOuE,EAAKC,GACnD,GAAID,EAAIE,eAAwD,IAAxCF,EAAIE,aAAaC,QAAQ,UAAkB,CAClE,IAAIC,EAAW3D,KAAK+C,MAAMQ,EAAIE,mBACA,IAAnBE,EAASC,QACnBD,EAAWA,EAASC,OACPC,UACZC,MAAMH,EAASI,SACf7E,OAAO8E","file":"apbct-public.min.js","sourcesContent":["(function() {\n\n\tvar ct_date = new Date(),\n\t\tctTimeMs = new Date().getTime(),\n\t\tctMouseEventTimerFlag = true, //Reading interval flag\n\t\tctMouseData = [],\n\t\tctMouseDataCounter = 0;\n\n\tfunction ctSetCookieSec(c_name, value) {\n\t\tdocument.cookie = c_name + \"=\" + encodeURIComponent(value) + \"; path=/\";\n\t}\n\n\tfunction apbct_attach_event_handler(elem, event, callback){\n\t\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\n\t\telse elem.attachEvent(event, callback);\n\t}\n\n\tfunction apbct_remove_event_handler(elem, event, callback){\n\t\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\n\t\telse elem.detachEvent(event, callback);\n\t}\n\n\tctSetCookieSec(\"ct_ps_timestamp\", Math.floor(new Date().getTime()/1000));\n\tctSetCookieSec(\"ct_fkp_timestamp\", \"0\");\n\tctSetCookieSec(\"ct_pointer_data\", \"0\");\n\tctSetCookieSec(\"ct_timezone\", \"0\");\n\n\tsetTimeout(function(){\n\t\tctSetCookieSec(\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1));\n\t},1000);\n\n\t//Writing first key press timestamp\n\tvar ctFunctionFirstKey = function output(event){\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\t\tctSetCookieSec(\"ct_fkp_timestamp\", KeyTimestamp);\n\t\tctKeyStopStopListening();\n\t};\n\n\t//Reading interval\n\tvar ctMouseReadInterval = setInterval(function(){\n\t\tctMouseEventTimerFlag = true;\n\t}, 150);\n\n\t//Writting interval\n\tvar ctMouseWriteDataInterval = setInterval(function(){\n\t\tctSetCookieSec(\"ct_pointer_data\", JSON.stringify(ctMouseData));\n\t}, 1200);\n\n\t//Logging mouse position each 150 ms\n\tvar ctFunctionMouseMove = function output(event){\n\t\tif(ctMouseEventTimerFlag === true){\n\n\t\t\tctMouseData.push([\n\t\t\t\tMath.round(event.clientY),\n\t\t\t\tMath.round(event.clientX),\n\t\t\t\tMath.round(new Date().getTime() - ctTimeMs)\n\t\t\t]);\n\n\t\t\tctMouseDataCounter++;\n\t\t\tctMouseEventTimerFlag = false;\n\t\t\tif(ctMouseDataCounter >= 50){\n\t\t\t\tctMouseStopData();\n\t\t\t}\n\t\t}\n\t};\n\n\t//Stop mouse observing function\n\tfunction ctMouseStopData(){\n\t\tapbct_remove_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\t\tclearInterval(ctMouseReadInterval);\n\t\tclearInterval(ctMouseWriteDataInterval);\n\t}\n\n\t//Stop key listening function\n\tfunction ctKeyStopStopListening(){\n\t\tapbct_remove_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\t\tapbct_remove_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\t}\n\n\tapbct_attach_event_handler(window, \"mousemove\", ctFunctionMouseMove);\n\tapbct_attach_event_handler(window, \"mousedown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(window, \"keydown\", ctFunctionFirstKey);\n\n\t// Ready function\n\tfunction apbct_ready(){\n\t\tctSetCookieSec(\"apbct_visible_fields\", 0);\n\t\tctSetCookieSec(\"apbct_visible_fields_count\", 0);\n\t\tsetTimeout(function(){\n\t\t\tfor(var i = 0; i < document.forms.length; i++){\n\t\t\t\tvar form = document.forms[i];\n\n\t\t\t\t//Exclusion for StoreLocatorPlus form\n\t\t\t\tif (form.classList.contains('slp_search_form'))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\n\t\t\t\tform.onsubmit = function(event){\n\n\t\t\t\t\t// Get only fields\n\t\t\t\t\tvar elements = [];\n\t\t\t\t\tfor(var key in this.elements){\n\t\t\t\t\t\tif(!isNaN(+key))\n\t\t\t\t\t\t\telements[key] = this.elements[key];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Filter fields\n\t\t\t\t\telements = elements.filter(function(elem){\n\n\t\t\t\t\t\tvar pass = true;\n\n\t\t\t\t\t\t// Filter fields\n\t\t\t\t\t\tif( getComputedStyle(elem).display === \"none\" || // hidden\n\t\t\t\t\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\t\t\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\t\t\t\t\telem.getAttribute(\"type\") === \"hidden\" || // type == hidden\n\t\t\t\t\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\t\t\t\t\telem.value === \"\" || // empty value\n\t\t\t\t\t\t\telem.getAttribute('name') === null\n\t\t\t\t\t\t){\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Filter elements with same names for type == radio\n\t\t\t\t\t\tif(elem.getAttribute(\"type\") === \"radio\"){\n\t\t\t\t\t\t\telements.forEach(function(el, j, els){\n\t\t\t\t\t\t\t\tif(elem.getAttribute('name') === el.getAttribute('name')){\n\t\t\t\t\t\t\t\t\tpass = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t});\n\n\t\t\t\t\t// Visible fields count\n\t\t\t\t\tvar visible_fields_count = elements.length;\n\n\t\t\t\t\t// Visible fields\n\t\t\t\t\tvar visible_fields = '';\n\t\t\t\t\telements.forEach(function(elem, i, elements){\n\t\t\t\t\t\tvisible_fields += \" \" + elem.getAttribute(\"name\");\n\t\t\t\t\t});\n\t\t\t\t\tvisible_fields = visible_fields.trim();\n\n\t\t\t\t\tctSetCookieSec(\"apbct_visible_fields\", visible_fields);\n\t\t\t\t\tctSetCookieSec(\"apbct_visible_fields_count\", visible_fields_count);\n\n\t\t\t\t\t// Call previous submit action\n\t\t\t\t\tif(event.target.onsubmit_prev instanceof Function){\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t}, 1000);\n\t}\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\n\n}());\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif (document.getElementById(params.input_name) !== null) {\n\t\tvar ct_input_value = document.getElementById(params.input_name).value;\n\t\tdocument.getElementById(params.input_name).value = document.getElementById(params.input_name).value.replace(ct_input_value, result.js_key);\n\t}\n}\n\nif(typeof jQuery !== 'undefined') {\n\n\t// Capturing responses and output block message for unknown AJAX forms\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\n\t\t\tvar response = JSON.parse(xhr.responseText);\n\t\t\tif (typeof response.apbct !== 'undefined') {\n\t\t\t\tresponse = response.apbct;\n\t\t\t\tif (response.blocked) {\n\t\t\t\t\talert(response.comment);\n\t\t\t\t\twindow.stop();\n\t\t\t\t\t// die();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction apbct_sendAJAXRequest(data, params, obj) {\n\n\t\t// Default params\n\t\tvar callback = params.callback || null;\n\t\tvar notJson = params.notJson || null;\n\t\tvar timeout = params.timeout || 15000;\n\t\tvar obj = obj || null;\n\n\t\tdata._ajax_nonce = ctPublic._ajax_nonce;\n\n\t\tjQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: ctPublic._ajax_url,\n\t\t\tdata: data,\n\t\t\tsuccess: function (result) {\n\t\t\t\tif (!notJson) result = JSON.parse(result);\n\t\t\t\tif (result.error) {\n\n\t\t\t\t} else {\n\t\t\t\t\tif (callback)\n\t\t\t\t\t\tcallback(result, data, params, obj);\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function (jqXHR, textStatus, errorThrown) {\n\t\t\t\tconsole.log('APBCT_AJAX_ERROR');\n\t\t\t\tconsole.log(data);\n\t\t\t\tconsole.log(jqXHR);\n\t\t\t\tconsole.log(textStatus);\n\t\t\t\tconsole.log(errorThrown);\n\t\t\t},\n\t\t\ttimeout: timeout\n\t\t});\n\t}\n}"]}
js/cleantalk-admin-settings-page.min.js CHANGED
@@ -1,2 +1 @@
1
- function apbct_banner_check(){var i=setInterval(function(){apbct_sendAJAX({action:"apbct_settings__check_renew_banner"},{callback:function(e,t,n,c){e.close_renew_banner&&(jQuery("#apbct_renew_notice").length&&jQuery("#apbct_renew_notice").hide("slow"),jQuery("#apbct_trial_notice").length&&jQuery("#apbct_trial_notice").hide("slow"),clearInterval(i))}})},6e4)}function apbct_get_elems(e){for(var t,n=0,c=(e=e.split(",")).length;n<c;n++)t=jQuery("#"+e[n]),e[n]=0===t.length?jQuery("."+e[n]):t;return e}function apbct_get_elems__native(e){"string"==typeof e&&(e=e.split(","));var i=[];return e.forEach(function(e,t,n){var c=document.getElementById(e);if(null===c){if(null!==(c=document.getElementsByClassName(e))&&0!==c.length)for(key in c)0<=+key&&i.push(c[key])}else i.push(c[key])}),i}function apbct_show_hide_elem(e){for(var t=0,n=(e=apbct_get_elems(e)).length;t<n;t++)e[t].each(function(e,t){var n=(t=jQuery(t)).next("label")||t.prev("label")||null;t.is(":visible")?(t.hide(),n&&n.hide()):(t.show(),n&&n.show())})}function apbctSettingsDependencies(e,a){a=+a||null,apbct_get_elems__native(e).forEach(function(e,t,n){function c(){console.log(e),e.setAttribute("disabled","disabled")}function i(){e.removeAttribute("disabled")}null!==a?1===a?i():c():null===e.getAttribute("disabled")?c():i()})}function apbct_settings__showDescription(e,t){var i=function(e){void 0!==e&&(0!=jQuery(e.target).parent(".apbct_long_desc").length&&!jQuery(e.target).hasClass("apbct_long_desc__cancel")||jQuery(e.target).hasClass("apbct_long_description__show"))||(jQuery(".apbct_long_desc").remove(),jQuery(document).off("click",i))};i(),e.after("<div id='apbct_long_desc__"+t+"' class='apbct_long_desc'></div>");var n=jQuery("#apbct_long_desc__"+t);n.append("<i class='icon-spin1 animate-spin'></i>").append("<div class='apbct_long_desc__angle'></div>").css({top:e.position().top-5,left:e.position().left+25}),apbct_sendAJAX({action:"apbct_settings__get_description",setting_id:t},{spinner:n.children("img"),callback:function(e,t,n,c){c.empty().append("<div class='apbct_long_desc__angle'></div>").append("<i class='apbct_long_desc__cancel icon-cancel'></i>").append("<h3 class='apbct_long_desc__title'>"+e.title+"</h3>").append("<p>"+e.desc+"</p>"),jQuery(document).on("click",i)}},n)}jQuery(document).ready(function(){jQuery("#apbct_showApiKey").on("click",function(){jQuery(".apbct_setting---apikey").val(jQuery(".apbct_setting---apikey").attr("key")),jQuery(".apbct_setting---apikey+div").show(),jQuery(this).fadeOut(300)});var e=new Date;jQuery("#ct_admin_timezone").val(e.getTimezoneOffset()/60*-1),jQuery("#apbct_gdpr_open_modal").on("click",function(){jQuery("#gdpr_dialog").dialog({modal:!0,show:!0,position:{my:"center",at:"center",of:window},width:+jQuery("#wpbody").width()/100*70,height:"auto",title:"GDPR compliance",draggable:!1,resizable:!1,closeText:"Close"})}),jQuery(document).on("click",".apbct_settings-long_description---show",function(){self=jQuery(this),apbct_settings__showDescription(self,self.attr("setting"))}),(jQuery("#apbct_renew_notice").length||jQuery("#apbct_trial_notice").length)&&apbct_banner_check()});
2
- //# sourceMappingURL=cleantalk-admin-settings-page.min.js.map
1
+ function apbct_banner_check(){var i=setInterval(function(){apbct_sendAJAX({action:"apbct_settings__check_renew_banner"},{callback:function(e,t,n,c){e.close_renew_banner&&(jQuery("#apbct_renew_notice").length&&jQuery("#apbct_renew_notice").hide("slow"),jQuery("#apbct_trial_notice").length&&jQuery("#apbct_trial_notice").hide("slow"),clearInterval(i))}})},6e4)}function apbct_get_elems(e){for(var t,n=0,c=(e=e.split(",")).length;n<c;n++)t=jQuery("#"+e[n]),e[n]=0===t.length?jQuery("."+e[n]):t;return e}function apbct_get_elems__native(e){"string"==typeof e&&(e=e.split(","));var i=[];return e.forEach(function(e,t,n){var c=document.getElementById(e);if(null===c){if(null!==(c=document.getElementsByClassName(e))&&0!==c.length)for(key in c)0<=+key&&i.push(c[key])}else i.push(c[key])}),i}function apbct_show_hide_elem(e){for(var t=0,n=(e=apbct_get_elems(e)).length;t<n;t++)e[t].each(function(e,t){var n=(t=jQuery(t)).next("label")||t.prev("label")||null;t.is(":visible")?(t.hide(),n&&n.hide()):(t.show(),n&&n.show())})}function apbctSettingsDependencies(e,a){a=+a||null,apbct_get_elems__native(e).forEach(function(e,t,n){function c(){console.log(e),e.setAttribute("disabled","disabled")}function i(){e.removeAttribute("disabled")}(null!==a?1===a?i:c:null===e.getAttribute("disabled")?c:i)()})}function apbct_settings__showDescription(e,t){var i=function(e){void 0!==e&&(0!=jQuery(e.target).parent(".apbct_long_desc").length&&!jQuery(e.target).hasClass("apbct_long_desc__cancel")||jQuery(e.target).hasClass("apbct_long_description__show"))||(jQuery(".apbct_long_desc").remove(),jQuery(document).off("click",i))};i(),e.after("<div id='apbct_long_desc__"+t+"' class='apbct_long_desc'></div>");var n=jQuery("#apbct_long_desc__"+t);n.append("<i class='icon-spin1 animate-spin'></i>").append("<div class='apbct_long_desc__angle'></div>").css({top:e.position().top-5,left:e.position().left+25}),apbct_sendAJAX({action:"apbct_settings__get_description",setting_id:t},{spinner:n.children("img"),callback:function(e,t,n,c){c.empty().append("<div class='apbct_long_desc__angle'></div>").append("<i class='apbct_long_desc__cancel icon-cancel'></i>").append("<h3 class='apbct_long_desc__title'>"+e.title+"</h3>").append("<p>"+e.desc+"</p>"),jQuery(document).on("click",i)}},n)}jQuery(document).ready(function(){jQuery("#apbct_showApiKey").on("click",function(){jQuery(".apbct_setting---apikey").val(jQuery(".apbct_setting---apikey").attr("key")),jQuery(".apbct_setting---apikey+div").show(),jQuery(this).fadeOut(300)});var e=new Date;jQuery("#ct_admin_timezone").val(e.getTimezoneOffset()/60*-1),jQuery("#apbct_gdpr_open_modal").on("click",function(){jQuery("#gdpr_dialog").dialog({modal:!0,show:!0,position:{my:"center",at:"center",of:window},width:+jQuery("#wpbody").width()/100*70,height:"auto",title:"GDPR compliance",draggable:!1,resizable:!1,closeText:"Close"})}),jQuery(document).on("click",".apbct_settings-long_description---show",function(){self=jQuery(this),apbct_settings__showDescription(self,self.attr("setting"))}),(jQuery("#apbct_renew_notice").length||jQuery("#apbct_trial_notice").length)&&apbct_banner_check()});
 
js/cleantalk-admin-settings-page.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-admin-settings-page.js"],"names":["apbct_banner_check","bannerChecker","setInterval","apbct_sendAJAX","action","callback","result","data","params","obj","close_renew_banner","jQuery","length","hide","clearInterval","apbct_get_elems","elems","tmp","i","len","split","apbct_get_elems__native","out","forEach","elem","arr","document","getElementById","getElementsByClassName","key","push","apbct_show_hide_elem","each","label","next","prev","is","show","apbctSettingsDependencies","ids","enable","do_disable","console","log","setAttribute","do_enable","removeAttribute","getAttribute","apbct_settings__showDescription","setting_id","remove_desc_func","e","target","parent","hasClass","remove","off","after","append","css","top","position","left","spinner","children","empty","title","desc","on","ready","val","attr","this","fadeOut","d","Date","getTimezoneOffset","dialog","modal","my","at","of","window","width","height","draggable","resizable","closeText","self"],"mappings":"AAwCA,SAASA,qBACR,IAAIC,EAAgBC,YAAa,WAChCC,eACC,CAACC,OAAQ,sCACT,CACCC,SAAU,SAASC,EAAQC,EAAMC,EAAQC,GACpCH,EAAOI,qBACNC,OAAO,uBAAuBC,QACjCD,OAAO,uBAAuBE,KAAK,QAChCF,OAAO,uBAAuBC,QACjCD,OAAO,uBAAuBE,KAAK,QACpCC,cAAcb,QAKhB,KAUJ,SAASc,gBAAgBC,GAErB,IAAK,IAA6BC,EAAzBC,EAAE,EAAGC,GADdH,EAAQA,EAAMI,MAAM,MACMR,OAAaM,EAAIC,EAAKD,IAC5CD,EAAMN,OAAO,IAAIK,EAAME,IACvBF,EAAME,GAAoB,IAAfD,EAAIL,OAAeD,OAAO,IAAIK,EAAME,IAAMD,EAEzD,OAAOD,EAUX,SAASK,wBAAwBL,GAGZ,iBAAVA,IACTA,EAAQA,EAAMI,MAAM,MAErB,IAAIE,EAAM,GAuBV,OArBAN,EAAMO,QAAQ,SAASC,EAAMN,EAAGO,GAG/B,IAAIR,EAAMS,SAASC,eAAeH,GAClC,GAAY,OAARP,GAQJ,GAAY,QADZA,EAAMS,SAASE,uBAAuBJ,KACJ,IAAdP,EAAIL,OACvB,IAAIiB,OAAOZ,EACE,IAAPY,KACJP,EAAIQ,KAAMb,EAAIY,WAVhBP,EAAIQ,KAAMb,EAAIY,QAgBTP,EAGR,SAASS,qBAAqBf,GAE1B,IAAK,IAAIE,EAAE,EAAGC,GADjBH,EAAQD,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R,OAAO,MAAMpD,EAAO6D,KAAK,QAE3BxD,OAAOe,UAAU0C,GAAG,QAASlB,KAG/BzC,GAtMFE,OAAOe,UAAU2C,MAAM,WAGnB1D,OAAO,qBAAqByD,GAAG,QAAS,WACpCzD,OAAO,2BAA2B2D,IAAI3D,OAAO,2BAA2B4D,KAAK,QAC7E5D,OAAO,+BAA+B0B,OACtC1B,OAAO6D,MAAMC,QAAQ,OAG5B,IAAIC,EAAI,IAAIC,KACZhE,OAAO,sBAAsB2D,IAAII,EAAEE,oBAAoB,IAAK,GAG5DjE,OAAO,0BAA0ByD,GAAG,QAAS,WAC5CzD,OAAO,gBAAgBkE,OAAO,CAC7BC,OAAM,EACNzC,MAAM,EACNwB,SAAU,CAAEkB,GAAI,SAAUC,GAAI,SAAUC,GAAIC,QAC5CC,OAASxE,OAAO,WAAWwE,QAAU,IAAM,GAC3CC,OAAQ,OACRlB,MAAO,kBACPmB,WAAW,EACXC,WAAW,EACXC,UAAW,YAIb5E,OAAOe,UAAU0C,GAAG,QAAS,0CAA2C,WACvEoB,KAAO7E,OAAO6D,MACdxB,gCAAgCwC,KAAMA,KAAKjB,KAAK,eAG7C5D,OAAO,uBAAuBC,QAAUD,OAAO,uBAAuBC,SACzEZ","file":"cleantalk-admin-settings-page.min.js","sourcesContent":["jQuery(document).ready(function(){\n\n // Show/Hide access key\n jQuery('#apbct_showApiKey').on('click', function(){\n jQuery('.apbct_setting---apikey').val(jQuery('.apbct_setting---apikey').attr('key'));\n jQuery('.apbct_setting---apikey+div').show();\n jQuery(this).fadeOut(300);\n });\n\n\tvar d = new Date();\n\tjQuery('#ct_admin_timezone').val(d.getTimezoneOffset()/60*(-1));\n\t\n\t// GDPR modal window\n\tjQuery('#apbct_gdpr_open_modal').on('click', function(){\n\t\tjQuery('#gdpr_dialog').dialog({\n\t\t\tmodal:true, \n\t\t\tshow: true,\n\t\t\tposition: { my: \"center\", at: \"center\", of: window },\n\t\t\twidth: +(jQuery('#wpbody').width() / 100 * 70), // 70% of #wpbody\n\t\t\theight: 'auto',\n\t\t\ttitle: 'GDPR compliance',\n\t\t\tdraggable: false,\n\t\t\tresizable: false,\n\t\t\tcloseText: \"Close\",\n\t\t});\n\t});\n\n\tjQuery(document).on('click', '.apbct_settings-long_description---show', function(){\n\t\tself = jQuery(this);\n\t\tapbct_settings__showDescription(self, self.attr('setting'));\n\t});\n\n\tif (jQuery('#apbct_renew_notice').length || jQuery('#apbct_trial_notice').length) \n\t\tapbct_banner_check();\n\t\n});\n\n/**\n * Checking current account status for renew notice\n */\nfunction apbct_banner_check() {\n\tvar bannerChecker = setInterval( function() {\n\t\tapbct_sendAJAX(\n\t\t\t{action: 'apbct_settings__check_renew_banner'},\n\t\t\t{\n\t\t\t\tcallback: function(result, data, params, obj){\n\t\t\t\t\tif (result.close_renew_banner) {\n\t\t\t\t\t\tif (jQuery('#apbct_renew_notice').length)\n\t\t\t\t\t\t\tjQuery('#apbct_renew_notice').hide('slow');\n\t\t\t\t\t\tif (jQuery('#apbct_trial_notice').length)\n\t\t\t\t\t\t\tjQuery('#apbct_trial_notice').hide('slow');\n\t\t\t\t\t\tclearInterval(bannerChecker);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}, 60000);\n}\n\n/**\n * Select elems like #{selector} or .{selector}\n * Selector passed in string separated by ,\n *\n * @param elems\n * @returns {*}\n */\nfunction apbct_get_elems(elems){\n elems = elems.split(',');\n for( var i=0, len = elems.length, tmp; i < len; i++){\n tmp = jQuery('#'+elems[i]);\n elems[i] = tmp.length === 0 ? jQuery('.'+elems[i]) : tmp;\n }\n return elems;\n}\n\n/**\n * Select elems like #{selector} or .{selector}\n * Selector could be passed in a string ( separated by comma ) or in array ( [ elem1, elem2, ... ] )\n *\n * @param elems string|array\n * @returns array\n */\nfunction apbct_get_elems__native(elems){\n\n\t// Make array from a string\n\tif(typeof elems === 'string')\n\t\telems = elems.split(',');\n\n\tvar out = [];\n\n\telems.forEach(function(elem, i, arr) {\n\n\t\t// try to get elements with such IDs\n\t\tvar tmp = document.getElementById(elem);\n\t\tif (tmp !== null){\n\t\t\tout.push( tmp[key] );\n\t\t\treturn;\n\t\t}\n\n\t\t// try to get elements with such class name\n\t\t// write each elem from collection to new element of outpur array\n\t\ttmp = document.getElementsByClassName(elem);\n\t\tif (tmp !== null && tmp.length !==0 ){\n\t\t\tfor(key in tmp){\n\t\t\t\tif( +key >= 0 ){\n\t\t\t\t\tout.push( tmp[key] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn out;\n}\n\nfunction apbct_show_hide_elem(elems){\n\telems = apbct_get_elems(elems);\n for( var i=0, len = elems.length; i < len; i++){\n elems[i].each(function (i, elem) {\n elem = jQuery(elem);\n var label = elem.next('label') || elem.prev('label') || null;\n if (elem.is(\":visible\")) {\n elem.hide();\n if (label) label.hide();\n } else {\n elem.show();\n if (label) label.show();\n }\n });\n }\n}\n\n/**\n * Settings dependences. Switch|toggle depended elements state (disabled|enabled)\n * Recieve list of selectors ( without class mark (.) or id mark (#) )\n *\n * @param ids string|array Selectors\n * @param enable\n */\nfunction apbctSettingsDependencies(ids, enable){\n\n\tenable = +enable || null;\n\n\t// Get elements\n\tvar elems = apbct_get_elems__native( ids );\n\n\telems.forEach(function(elem, i, arr){\n\n\t\tvar do_disable = function(){console.log( elem ); elem.setAttribute('disabled', 'disabled');},\n\t\t\tdo_enable = function(){elem.removeAttribute('disabled');};\n\n\t\t// Set defined state\n\t\tif(enable !== null) // Set\n\t\t\tenable === 1 ? do_enable() : do_disable();\n\n\t\t// Toggle\n\t\telse{\n\t\t\telem.getAttribute('disabled') === null ? do_disable() : do_enable();\n\t\t}\n\n\t});\n}\n\nfunction apbct_settings__showDescription(label, setting_id){\n\n\tvar remove_desc_func = function(e){\n\t\tif(typeof e === 'undefined' || ((jQuery(e.target).parent('.apbct_long_desc').length == 0 || jQuery(e.target).hasClass('apbct_long_desc__cancel')) && !jQuery(e.target).hasClass('apbct_long_description__show'))){\n\t\t\tjQuery('.apbct_long_desc').remove();\n\t\t\tjQuery(document).off('click', remove_desc_func);\n\t\t}\n\t};\n\n\tremove_desc_func();\n\n\tlabel.after(\"<div id='apbct_long_desc__\"+setting_id+\"' class='apbct_long_desc'></div>\");\n\tvar obj = jQuery('#apbct_long_desc__'+setting_id);\n\tobj.append(\"<i class='icon-spin1 animate-spin'></i>\")\n\t\t.append(\"<div class='apbct_long_desc__angle'></div>\")\n\t\t.css({\n\t\t\ttop: label.position().top - 5,\n\t\t\tleft: label.position().left + 25\n\t\t});\n\n\n\tapbct_sendAJAX(\n\t\t{action: 'apbct_settings__get_description', setting_id: setting_id},\n\t\t{\n\t\t\tspinner: obj.children('img'),\n\t\t\tcallback: function(result, data, params, obj){\n\n\t\t\t\tobj.empty()\n\t\t\t\t\t.append(\"<div class='apbct_long_desc__angle'></div>\")\n\t\t\t\t\t.append(\"<i class='apbct_long_desc__cancel icon-cancel'></i>\")\n\t\t\t\t\t.append(\"<h3 class='apbct_long_desc__title'>\"+result.title+\"</h3>\")\n\t\t\t\t\t.append(\"<p>\"+result.desc+\"</p>\");\n\n\t\t\t\tjQuery(document).on('click', remove_desc_func);\n\t\t\t}\n\t\t},\n\t\tobj\n\t);\n}"]}
1
+ {"version":3,"sources":["cleantalk-admin-settings-page.js"],"names":["apbct_banner_check","bannerChecker","setInterval","apbct_sendAJAX","action","callback","result","data","params","obj","close_renew_banner","jQuery","length","hide","clearInterval","apbct_get_elems","elems","tmp","i","len","split","apbct_get_elems__native","out","forEach","elem","arr","document","getElementById","getElementsByClassName","key","push","apbct_show_hide_elem","each","label","next","prev","is","show","apbctSettingsDependencies","ids","enable","do_disable","console","log","setAttribute","do_enable","removeAttribute","getAttribute","apbct_settings__showDescription","setting_id","remove_desc_func","e","target","parent","hasClass","remove","off","after","append","css","top","position","left","spinner","children","empty","title","desc","on","ready","val","attr","this","fadeOut","d","Date","getTimezoneOffset","dialog","modal","my","at","of","window","width","height","draggable","resizable","closeText","self"],"mappings":"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AEE,oBAAoB,IAAK,GAG5DjE,OAAO,0BAA0ByD,GAAG,QAAS,WAC5CzD,OAAO,gBAAgBkE,OAAO,CAC7BC,OAAM,EACNzC,MAAM,EACNwB,SAAU,CAAEkB,GAAI,SAAUC,GAAI,SAAUC,GAAIC,QAC5CC,OAASxE,OAAO,WAAWwE,QAAU,IAAM,GAC3CC,OAAQ,OACRlB,MAAO,kBACPmB,WAAW,EACXC,WAAW,EACXC,UAAW,YAIb5E,OAAOe,UAAU0C,GAAG,QAAS,0CAA2C,WACvEoB,KAAO7E,OAAO6D,MACdxB,gCAAgCwC,KAAMA,KAAKjB,KAAK,eAG7C5D,OAAO,uBAAuBC,QAAUD,OAAO,uBAAuBC,SACzEZ"}
js/cleantalk-admin.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-admin.js"],"names":["apbct_sendAJAX","data","params","obj","callback","notJson","timeout","button","spinner","progressbar","setAttribute","style","cursor","jQuery","css","_ajax_nonce","ctAdminCommon","ajax","type","url","_ajax_url","success","result","removeAttribute","JSON","parse","error","setTimeout","fadeOut","alert","jqXHR","textStatus","errorThrown","console","log","document","ready","on","ct_date","Date","getTime","cookie","toUTCString"],"mappings":"AAYA,SAASA,eAAeC,EAAMC,EAAQC,GAGrC,IAAIC,EAAcF,EAAOE,UAAe,KACpCC,EAAcH,EAAOG,SAAe,KACpCC,EAAcJ,EAAOI,SAAe,KAEpCC,GADAJ,EAAcA,GAAsB,KACtBD,EAAOK,QAAe,MACpCC,EAAcN,EAAOM,SAAe,KACpCC,EAAcP,EAAOO,aAAe,KAGrCF,IAAUA,EAAOG,aAAa,WAAY,YAAaH,EAAOI,MAAMC,OAAS,eAC7EJ,GAASK,OAAOL,GAASM,IAAI,UAAW,UAG3Cb,EAAKc,YAAcC,cAAcD,YAEjCF,OAAOI,KAAK,CACXC,KAAM,OACNC,IAAKH,cAAcI,UACnBnB,KAAMA,EACNoB,QAAS,SAASC,GACdf,IAAUA,EAAOgB,gBAAgB,YAAahB,EAAOI,MAAMC,OAAS,WACpEJ,GAAUK,OAAOL,GAASM,IAAI,UAAW,QACxCT,IAASiB,EAASE,KAAKC,MAAMH,IAC9BA,EAAOI,OACTC,WAAW,WAAelB,GAAaA,EAAYmB,QAAQ,SAAY,KACvEC,MAAM,mBAAqBP,EAAOI,OAAS,YAExCtB,GACFA,EAASkB,EAAQrB,EAAMC,EAAQC,IAGlCuB,MAAO,SAASI,EAAOC,EAAYC,GAC/BzB,IAAUA,EAAOgB,gBAAgB,YAAahB,EAAOI,MAAMC,OAAS,WACpEJ,GAASK,OAAOL,GAASM,IAAI,UAAW,QAC3CmB,QAAQC,IAAI,oBACZD,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,GACTA,GACFH,MAAMG,IAER1B,QAASA,IAxDXO,OAAOsB,UAAUC,MAAM,WAGtBvB,OAAO,wBAAwBwB,GAAG,QAAS,SAAU,WACpD,IAAIC,EAAU,IAAIC,MAAK,IAAIA,MAAOC,UAAY,QAC9CL,SAASM,OAAS,iDAAmDH,EAAQI,gBAG9E7B,OAAO,mDAAmDC,IAAI,cAAc","file":"cleantalk-admin.min.js","sourcesContent":["jQuery(document).ready(function(){\n\t\n\t// Auto update banner close handler\n\tjQuery('.apbct_update_notice').on('click', 'button', function(){\n\t\tvar ct_date = new Date(new Date().getTime() + 1000 * 86400 * 30 );\n\t\tdocument.cookie = \"apbct_update_banner_closed=1; path=/; expires=\" + ct_date.toUTCString();\n\t});\n\t\n\tjQuery('li a[href=\"options-general.php?page=cleantalk\"]').css('white-space','nowrap');\n\t\n});\n\nfunction apbct_sendAJAX(data, params, obj){\n\n\t// Default params\n\tvar callback = params.callback || null;\n\tvar notJson = params.notJson || null;\n\tvar timeout = params.timeout || 15000;\n\tvar obj = obj || null;\n\tvar button = params.button || null;\n\tvar spinner = params.spinner || null;\n\tvar progressbar = params.progressbar || null;\n\n\t// Button and spinner\n\tif(button) {button.setAttribute('disabled', 'disabled'); button.style.cursor = 'not-allowed'; }\n\tif(spinner) jQuery(spinner).css('display', 'inline');\n\n\t// Adding security code\n\tdata._ajax_nonce = ctAdminCommon._ajax_nonce;\n\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ctAdminCommon._ajax_url,\n\t\tdata: data,\n\t\tsuccess: function(result){\n\t\t\tif(button){ button.removeAttribute('disabled'); button.style.cursor = 'pointer'; }\n\t\t\tif(spinner) jQuery(spinner).css('display', 'none');\n\t\t\tif(!notJson) result = JSON.parse(result);\n\t\t\tif(result.error){\n\t\t\t\tsetTimeout(function(){ if(progressbar) progressbar.fadeOut('slow'); }, 1000);\n\t\t\t\talert('Error happens: ' + (result.error || 'Unkown'));\n\t\t\t}else{\n\t\t\t\tif(callback)\n\t\t\t\t\tcallback(result, data, params, obj);\n\t\t\t}\n\t\t},\n\t\terror: function(jqXHR, textStatus, errorThrown){\n\t\t\tif(button){ button.removeAttribute('disabled'); button.style.cursor = 'pointer'; }\n\t\t\tif(spinner) jQuery(spinner).css('display', 'none');\n\t\t\tconsole.log('APBCT_AJAX_ERROR');\n\t\t\tconsole.log(jqXHR);\n\t\t\tconsole.log(textStatus);\n\t\t\tconsole.log(errorThrown);\n\t\t\tif(errorThrown)\n\t\t\t\talert(errorThrown);\n\t\t},\n\t\ttimeout: timeout,\n\t});\n}"]}
1
+ {"version":3,"sources":["cleantalk-admin.js"],"names":["apbct_sendAJAX","data","params","obj","callback","notJson","timeout","button","spinner","progressbar","setAttribute","style","cursor","jQuery","css","_ajax_nonce","ctAdminCommon","ajax","type","url","_ajax_url","success","result","removeAttribute","JSON","parse","error","setTimeout","fadeOut","alert","jqXHR","textStatus","errorThrown","console","log","document","ready","on","ct_date","Date","getTime","cookie","toUTCString"],"mappings":"AAYA,SAASA,eAAeC,EAAMC,EAAQC,GAGrC,IAAIC,EAAcF,EAAOE,UAAe,KACpCC,EAAcH,EAAOG,SAAe,KACpCC,EAAcJ,EAAOI,SAAe,KAEpCC,GADAJ,EAAcA,GAAsB,KACtBD,EAAOK,QAAe,MACpCC,EAAcN,EAAOM,SAAe,KACpCC,EAAcP,EAAOO,aAAe,KAGrCF,IAAUA,EAAOG,aAAa,WAAY,YAAaH,EAAOI,MAAMC,OAAS,eAC7EJ,GAASK,OAAOL,GAASM,IAAI,UAAW,UAG3Cb,EAAKc,YAAcC,cAAcD,YAEjCF,OAAOI,KAAK,CACXC,KAAM,OACNC,IAAKH,cAAcI,UACnBnB,KAAMA,EACNoB,QAAS,SAASC,GACdf,IAAUA,EAAOgB,gBAAgB,YAAahB,EAAOI,MAAMC,OAAS,WACpEJ,GAAUK,OAAOL,GAASM,IAAI,UAAW,QACxCT,IAASiB,EAASE,KAAKC,MAAMH,IAC9BA,EAAOI,OACTC,WAAW,WAAelB,GAAaA,EAAYmB,QAAQ,SAAY,KACvEC,MAAM,mBAAqBP,EAAOI,OAAS,YAExCtB,GACFA,EAASkB,EAAQrB,EAAMC,EAAQC,IAGlCuB,MAAO,SAASI,EAAOC,EAAYC,GAC/BzB,IAAUA,EAAOgB,gBAAgB,YAAahB,EAAOI,MAAMC,OAAS,WACpEJ,GAASK,OAAOL,GAASM,IAAI,UAAW,QAC3CmB,QAAQC,IAAI,oBACZD,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,GACTA,GACFH,MAAMG,IAER1B,QAASA,IAxDXO,OAAOsB,UAAUC,MAAM,WAGtBvB,OAAO,wBAAwBwB,GAAG,QAAS,SAAU,WACpD,IAAIC,EAAU,IAAIC,MAAK,IAAIA,MAAOC,UAAY,QAC9CL,SAASM,OAAS,iDAAmDH,EAAQI,gBAG9E7B,OAAO,mDAAmDC,IAAI,cAAc","file":"cleantalk-admin.min.js","sourcesContent":["jQuery(document).ready(function(){\r\n\t\r\n\t// Auto update banner close handler\r\n\tjQuery('.apbct_update_notice').on('click', 'button', function(){\r\n\t\tvar ct_date = new Date(new Date().getTime() + 1000 * 86400 * 30 );\r\n\t\tdocument.cookie = \"apbct_update_banner_closed=1; path=/; expires=\" + ct_date.toUTCString();\r\n\t});\r\n\t\r\n\tjQuery('li a[href=\"options-general.php?page=cleantalk\"]').css('white-space','nowrap');\r\n\t\r\n});\r\n\r\nfunction apbct_sendAJAX(data, params, obj){\r\n\r\n\t// Default params\r\n\tvar callback = params.callback || null;\r\n\tvar notJson = params.notJson || null;\r\n\tvar timeout = params.timeout || 15000;\r\n\tvar obj = obj || null;\r\n\tvar button = params.button || null;\r\n\tvar spinner = params.spinner || null;\r\n\tvar progressbar = params.progressbar || null;\r\n\r\n\t// Button and spinner\r\n\tif(button) {button.setAttribute('disabled', 'disabled'); button.style.cursor = 'not-allowed'; }\r\n\tif(spinner) jQuery(spinner).css('display', 'inline');\r\n\r\n\t// Adding security code\r\n\tdata._ajax_nonce = ctAdminCommon._ajax_nonce;\r\n\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ctAdminCommon._ajax_url,\r\n\t\tdata: data,\r\n\t\tsuccess: function(result){\r\n\t\t\tif(button){ button.removeAttribute('disabled'); button.style.cursor = 'pointer'; }\r\n\t\t\tif(spinner) jQuery(spinner).css('display', 'none');\r\n\t\t\tif(!notJson) result = JSON.parse(result);\r\n\t\t\tif(result.error){\r\n\t\t\t\tsetTimeout(function(){ if(progressbar) progressbar.fadeOut('slow'); }, 1000);\r\n\t\t\t\talert('Error happens: ' + (result.error || 'Unkown'));\r\n\t\t\t}else{\r\n\t\t\t\tif(callback)\r\n\t\t\t\t\tcallback(result, data, params, obj);\r\n\t\t\t}\r\n\t\t},\r\n\t\terror: function(jqXHR, textStatus, errorThrown){\r\n\t\t\tif(button){ button.removeAttribute('disabled'); button.style.cursor = 'pointer'; }\r\n\t\t\tif(spinner) jQuery(spinner).css('display', 'none');\r\n\t\t\tconsole.log('APBCT_AJAX_ERROR');\r\n\t\t\tconsole.log(jqXHR);\r\n\t\t\tconsole.log(textStatus);\r\n\t\t\tconsole.log(errorThrown);\r\n\t\t\tif(errorThrown)\r\n\t\t\t\talert(errorThrown);\r\n\t\t},\r\n\t\ttimeout: timeout,\r\n\t});\r\n}"]}
js/cleantalk-comments-checkspam.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-comments-checkspam.js"],"names":["ct_working","String","prototype","printf","formatted","this","arg","arguments","before_formatted","substring","indexOf","after_formatted","length","ct_new_check","ct_cooling_down_flag","ct_close_animate","ct_accurate_check","ct_pause","ct_prev_accurate","ctCommentsCheck","ct_prev_from","ct_prev_till","ct_cool_down_time","ct_requests_counter","ct_max_requests","ct_ajax_nonce","ct_comments_total","ct_comments_checked","ct_comments_spam","ct_comments_bad","ct_unchecked","ct_date_from","ct_date_till","animate_comment","to","id","jQuery","fadeTo","ct_clear_comments","from","till","is","val","data","action","security","ajax","type","url","ajaxurl","success","msg","ct_show_info","ct_send_comments","ct_cooling_down_toggle","setTimeout","new_check","unchecked","parseJSON","parseInt","error","confirm","error_message","new_href","location","href","end","document","cookie","hide","checked","spam","bad","status_string","ct_status_string","ct_status_string_warning","html","jqXHR","textStatus","errorThrown","show","timeout","message","total","ct_toggle_depended","obj","secondary","depended","prop","removeProp","ct_delete_all","e","target","addClass","css","removeClass","ready","state","on","datepicker","setDefaults","regional","dates","dateFormat","maxDate","changeMonth","changeYear","showAnim","onSelect","selectedDate","option","instance","date","parseDate","settings","_defaults","not","ct_start_check","continue_check","alert","click","ct_check","accurate","JSON","stringify","start","Date","toUTCString","ct_confirm_deletion_all"],"mappings":"AAYA,IAAIA,aAXJC,OAAOC,UAAUC,OAAS,WACtB,IAAIC,EAAYC,KAChB,IAAK,IAAIC,KAAOC,UAAY,CAC9B,IAAIC,EAAmBJ,EAAUK,UAAU,EAAGL,EAAUM,QAAQ,KAAM,IAClEC,EAAmBP,EAAUK,UAAUL,EAAUM,QAAQ,KAAM,GAAG,EAAGN,EAAUQ,QACnFR,EAAYI,EAAmBD,UAAUD,GAAOK,EAE9C,OAAOP,IAKVS,cAAe,EACfC,sBAAuB,EACvBC,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AAsBK,GAAG,cAClCzB,mBAAoB,GAGrBoB,OAAO,eAAeiC,OACtBjC,OAAO,uBAAuB4C,OAC9B5C,OAAO,iBAAiB4C,OACxB5C,OAAO,aAAa4C,OAEpBhF,YAAW,EAERsH,GACFlE,eACAC,oBAEAf,qBAKFF,OAAO,yBAAyBoF,MAAM,WAErCH,IADAlD,SAASC,OAAS,yCAGnBhC,OAAO,4BAA4BoF,MAAM,WACxCH,GAAe,KAIhBjF,OAAO,aAAa8D,GAAG,QAAS,WAC/BjF,UAAW,EACX,IAAIwG,EAAW,CACdC,SAAY1G,kBACZuB,KAAYR,aACZS,KAAYR,cAEbmC,SAASC,OAAS,4BAA8BuD,KAAKC,UAAUH,GAAY,aAI/C,MAA1BtG,gBAAgB0G,QAClB1D,SAASC,OAAS,sCAAwC,IAAI0D,KAAK,GAAGC,cAAgB,WACtF3F,OAAO,yBAAyBoF,SAIjCpF,OAAO,kBAAkBoF,MAAM,SAAU7B,GAExC,IAAK9B,QAAQ1C,gBAAgB6G,yBAC5B,OAAO,EAERtC,cAAeC","file":"cleantalk-comments-checkspam.min.js","sourcesContent":["// Printf for JS\nString.prototype.printf = function(){\n var formatted = this;\n for( var arg in arguments ) {\n\t\tvar before_formatted = formatted.substring(0, formatted.indexOf(\"%s\", 0));\n\t\tvar after_formatted = formatted.substring(formatted.indexOf(\"%s\", 0)+2, formatted.length);\n\t\tformatted = before_formatted + arguments[arg] + after_formatted;\n }\n return formatted;\n};\n\n// Flags\nvar ct_working = false,\n\tct_new_check = true,\n\tct_cooling_down_flag = false,\n\tct_close_animate = true,\n\tct_accurate_check = false,\n\tct_pause = false,\n\tct_prev_accurate = ctCommentsCheck.ct_prev_accurate,\n\tct_prev_from = ctCommentsCheck.ct_prev_from,\t\n\tct_prev_till = ctCommentsCheck.ct_prev_till;\n// Settings\nvar ct_cool_down_time = 90000,\n\tct_requests_counter = 0,\n\tct_max_requests = 60;\n// Variables\nvar ct_ajax_nonce = ctCommentsCheck.ct_ajax_nonce,\n\tct_comments_total = 0,\n\tct_comments_checked = 0,\n\tct_comments_spam = 0,\n\tct_comments_bad = 0,\n\tct_unchecked = 'unset',\n\tct_date_from = 0,\n\tct_date_till = 0;\n\nfunction animate_comment(to,id){\n\tif(ct_close_animate){\n\t\tif(to==0.3){\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\n\t\t\t\tanimate_comment(1,id)\n\t\t\t});\n\t\t}else{\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\n\t\t\t\tanimate_comment(0.3,id)\n\t\t\t});\n\t\t}\n\t}else{\n\t\tct_close_animate=true;\n\t}\n}\n\nfunction ct_clear_comments(){\n\n\tvar from = 0, till = 0;\n\tif(jQuery('#ct_allow_date_range').is(':checked')) {\n\t\tfrom = jQuery('#ct_date_range_from').val();\n\t\ttill = jQuery('#ct_date_range_till').val();\n\t}\n\tvar data = {\n\t\t'action' : 'ajax_clear_comments',\n\t\t'security' : ct_ajax_nonce,\n\t\t'from' : from,\n\t\t'till' : till\n\t};\n\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\tct_show_info();\n\t\t\tct_send_comments();\n\t\t}\n\t});\n}\n\n//Continues the check after cooldown time\n//Called by ct_send_users();\nfunction ct_cooling_down_toggle(){\n\tct_cooling_down_flag = false;\n\tct_send_comments();\n\tct_show_info();\n}\n\nfunction ct_send_comments(){\n\t\n\tif(ct_cooling_down_flag === true)\n\t\treturn;\n\t\n\tif(ct_requests_counter >= ct_max_requests){\n\t\tsetTimeout(ct_cooling_down_toggle, ct_cool_down_time);\n\t\tct_requests_counter = 0;\n\t\tct_cooling_down_flag = true;\n\t\treturn;\n\t}else{\n\t\tct_requests_counter++;\n\t}\n\t\n\tvar data = {\n\t\t'action': 'ajax_check_comments',\n\t\t'security': ct_ajax_nonce,\n\t\t'new_check': ct_new_check,\n\t\t'unchecked': ct_unchecked\n\t};\n\t\n\tif(ct_accurate_check)\n\t\tdata['accurate_check'] = true;\n\t\n\tif(ct_date_from && ct_date_till){\n\t\tdata['from'] = ct_date_from;\n\t\tdata['till'] = ct_date_till;\n\t}\n\t\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\t\n\t\t\tmsg = jQuery.parseJSON(msg);\n\t\t\t\n\t\t\tif(parseInt(msg.error)){\n\t\t\t\tct_working=false;\n\t\t\t\tif(!confirm(msg.error_message+\". Do you want to proceed?\")){\n\t\t\t\t\tvar new_href = 'edit-comments.php?page=ct_check_spam';\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\n\t\t\t\t\tlocation.href = new_href;\n\t\t\t\t}else\n\t\t\t\t\tct_send_comments();\n\t\t\t}else{\n\t\t\t\tct_new_check = false;\n\t\t\t\tif(parseInt(msg.end) == 1 || ct_pause === true){\n\t\t\t\t\tif(parseInt(msg.end) == 1)\n\t\t\t\t\t\tdocument.cookie = 'ct_paused_comments_check=0; path=/';\n\t\t\t\t\tct_working=false;\n\t\t\t\t\tjQuery('#ct_working_message').hide();\n\t\t\t\t\tvar new_href = 'edit-comments.php?page=ct_check_spam';\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\n\t\t\t\t\tlocation.href = new_href;\n\t\t\t\t}else if(parseInt(msg.end) == 0){\n\t\t\t\t\tct_comments_checked += msg.checked;\n\t\t\t\t\tct_comments_spam += msg.spam;\n\t\t\t\t\tct_comments_bad += msg.bad;\n\t\t\t\t\tct_unchecked = ct_comments_total - ct_comments_checked - ct_comments_bad;\n\t\t\t\t\tvar status_string = String(ctCommentsCheck.ct_status_string);\n\t\t\t\t\tvar status_string = status_string.printf(ct_comments_total, ct_comments_checked, ct_comments_spam, ct_comments_bad);\n\t\t\t\t\tif(parseInt(ct_comments_spam) > 0)\n\t\t\t\t\t\tstatus_string += ctCommentsCheck.ct_status_string_warning;\n\t\t\t\t\tjQuery('#ct_checking_status').html(status_string);\n\t\t\t\t\tjQuery('#ct_error_message').hide();\n\t\t\t\t\t// If DB woks not properly\n\t\t\t\t\tif(+ct_comments_total < ct_comments_checked + ct_comments_bad){\n\t\t\t\t\t\tdocument.cookie = 'ct_comments_start_check=1; path=/';\n\t\t\t\t\t\tdocument.cookie = 'ct_comments_safe_check=1; path=/';\n\t\t\t\t\t\tlocation.href = 'edit-comments.php?page=ct_check_spam';\n\t\t\t\t\t}\n\t\t\t\t\tct_send_comments();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n error: function(jqXHR, textStatus, errorThrown) {\n\t\t\tjQuery('#ct_error_message').show();\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\n\t\t\tjQuery('#cleantalk_js_func').html('Check comments');\n\t\t\tsetTimeout(ct_send_comments(), 3000); \n },\n timeout: 25000\n\t});\n}\nfunction ct_show_info(){\n\t\n\tif(ct_working){\n\t\t\n\t\tif(ct_cooling_down_flag == true){\n\t\t\tjQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');\n\t\t\tjQuery('#ct_cooling_notice').show();\n\t\t\treturn;\t\t\t\n\t\t}else{\n\t\t\tjQuery('#ct_cooling_notice').hide();\n\t\t}\n\t\t\n\t\tif(!ct_comments_total){\n\t\t\t\n\t\t\tvar data = {\n\t\t\t\t'action': 'ajax_info_comments',\n\t\t\t\t'security': ct_ajax_nonce\n\t\t\t};\n\t\t\t\n\t\t\tif(ct_date_from && ct_date_till){\n\t\t\t\tdata['from'] = ct_date_from;\n\t\t\t\tdata['till'] = ct_date_till;\n\t\t\t}\n\t\t\t\n\t\t\tjQuery.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: data,\n\t\t\t\tsuccess: function(msg){\n\t\t\t\t\tmsg = jQuery.parseJSON(msg);\n\t\t\t\t\tjQuery('#ct_checking_status').html(msg.message);\n\t\t\t\t\tct_comments_total = msg.total;\n\t\t\t\t\tct_comments_spam = msg.spam;\n\t\t\t\t\tct_comments_checked = msg.checked;\n\t\t\t\t\tct_comments_bad = msg.bad;\n\t\t\t\t},\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tjQuery('#ct_error_message').show();\n\t\t\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\n\t\t\t\t\tjQuery('#cleantalk_js_func').html('Check comments');\n\t\t\t\t\tsetTimeout(ct_show_info(), 3000); \n\t\t\t\t},\n\t\t\t\ttimeout: 15000\n\t\t\t});\n\t\t}\n\t}\n}\n\n// Function to toggle dependences\nfunction ct_toggle_depended(obj, secondary){\n\n secondary = secondary || null;\n\n\tvar depended = jQuery(obj.data('depended')),\n\t\tstate = obj.data('state');\n\t\t\n\tif(!state && !secondary){\n\t\tobj.data('state', true);\n\t\tdepended.removeProp('disabled');\n\t}else{\n\t\tobj.data('state', false);\n\t\tdepended.prop('disabled', true);\n\t\tdepended.removeProp('checked');\n\t\tif(depended.data('depended'))\n\t\t\tct_toggle_depended(depended, true);\n\t}\n}\n\nfunction ct_delete_all( e ) {\n\n\tvar data = {\n\t\t'action': 'ajax_delete_all',\n\t\t'security': ct_ajax_nonce\n\t};\n\n\tjQuery('.' + e.target.id).addClass('disabled');\n\tjQuery('.spinner').css('visibility', 'visible');\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function( msg ){\n\t\t\tif( msg > 0 ){\n\t\t\t\tjQuery('#cleantalk_comments_left').html(msg);\n\t\t\t\tct_delete_all( e );\n\t\t\t}else{\n\t\t\t\tjQuery('.' + e.target.id).removeClass('disabled');\n\t\t\t\tjQuery('.spinner').css('visibility', 'hidden');\n\t\t\t\tlocation.href='edit-comments.php?page=ct_check_spam_total';\n\t\t\t}\n\t\t},\n\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\tjQuery('#ct_error_message').show();\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\n\t\t\tjQuery('#cleantalk_js_func').html('Check comments');\n\t\t\tsetTimeout(ct_delete_all( e ), 3000);\n\t\t},\n\t\ttimeout: 25000\n\t});\n\n}\n\njQuery(document).ready(function(){\n\n\t// Setting dependences\n\t// jQuery('#ct_accurate_check') .data({'depended': '#ct_allow_date_range', 'state': false});\n\tjQuery('#ct_allow_date_range').data({'depended': '.ct_date', 'state': false});\n\t\n\t// Prev check parameters\n\tif(ct_prev_accurate){\n\t\tjQuery(\"#ct_accurate_check\").prop('checked', true);\n\t}\n\tif(ct_prev_from){\n\t\tjQuery(\"#ct_allow_date_range\").prop('checked', true).data('state', true);\n\t\tjQuery(\"#ct_date_range_from\").removeProp('disabled').val(ct_prev_from);\n\t\tjQuery(\"#ct_date_range_till\").removeProp('disabled').val(ct_prev_till);\n\t}\n\t\n\t// Toggle dependences\n\tjQuery(\"#ct_allow_date_range, #ct_accurate_check\").on('change', function(){\n\t\tct_toggle_depended(jQuery(this));\n\t});\n\n jQuery.datepicker.setDefaults(jQuery.datepicker.regional['en']);\n\tvar dates = jQuery('#ct_date_range_from, #ct_date_range_till').datepicker(\n\t\t{\n\t\t\tdateFormat: 'M d yy',\n\t\t\tmaxDate:\"+0D\",\n\t\t\tchangeMonth:true,\n\t\t\tchangeYear:true,\n\t\t\tshowAnim: 'slideDown',\n\t\t\tonSelect: function(selectedDate){\n\t\t\tvar option = this.id == \"ct_date_range_from\" ? \"minDate\" : \"maxDate\",\n\t\t\t\tinstance = jQuery( this ).data( \"datepicker\" ),\n\t\t\t\tdate = jQuery.datepicker.parseDate(\n\t\t\t\t\tinstance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat,\n\t\t\t\t\tselectedDate, instance.settings);\n\t\t\t\tdates.not(this).datepicker(\"option\", option, date);\n\t\t\t}\n\t\t}\n\t);\n\t\n\tfunction ct_start_check(continue_check){\n\n continue_check = continue_check || null;\n\n\t\tif(jQuery('#ct_allow_date_range').is(':checked')){\n\t\t\t\n\t\t\tct_date_from = jQuery('#ct_date_range_from').val(),\n\t\t\tct_date_till = jQuery('#ct_date_range_till').val();\n\t\t\t\t\t\t\n\t\t\tif(!(ct_date_from != '' && ct_date_till != '')){\n\t\t\t\talert('Please, specify a date range.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(jQuery('#ct_accurate_check').is(':checked')){\n\t\t\tct_accurate_check = true;\n\t\t}\n\t\t\n\t\tjQuery('.ct_to_hide').hide();\n\t\tjQuery('#ct_working_message').show();\n\t\tjQuery('#ct_preloader').show();\n\t\tjQuery('#ct_pause').show();\n\n\t\tct_working=true;\n\t\t\n\t\tif(continue_check){\n\t\t\tct_show_info();\n\t\t\tct_send_comments();\n\t\t}else\n\t\t\tct_clear_comments();\n\t\t\n\t}\n\t\n\t// Check comments\n\tjQuery(\"#ct_check_spam_button\").click(function(){\n\t\tdocument.cookie = 'ct_paused_comments_check=0; path=/';\n\t\tct_start_check(false);\n\t});\n\tjQuery(\"#ct_proceed_check_button\").click(function(){\n\t\tct_start_check(true);\n\t});\n\n\t// Pause the check\n\tjQuery('#ct_pause').on('click', function(){\n\t\tct_pause = true;\n\t\tvar ct_check = {\n\t\t\t'accurate': ct_accurate_check,\n\t\t\t'from' : ct_date_from,\n\t\t\t'till' : ct_date_till\n\t\t};\n\t\tdocument.cookie = 'ct_paused_comments_check=' + JSON.stringify(ct_check) + '; path=/';\n\t});\n\n\n\tif(ctCommentsCheck.start === '1'){\n\t\tdocument.cookie = 'ct_comments_start_check=0; expires=' + new Date(0).toUTCString() + '; path=/';\n\t\tjQuery('#ct_check_spam_button').click();\t\n\t}\n\n\t// Delete all spam comments\n\tjQuery(\".ct_delete_all\").click(function( e ){\n\n\t\tif (!confirm(ctCommentsCheck.ct_confirm_deletion_all))\n\t\t\treturn false;\n\n\t\tct_delete_all( e );\n\n\t});\n\n});"]}
1
+ {"version":3,"sources":["cleantalk-comments-checkspam.js"],"names":["ct_working","String","prototype","printf","formatted","this","arg","arguments","before_formatted","substring","indexOf","after_formatted","length","ct_new_check","ct_cooling_down_flag","ct_close_animate","ct_accurate_check","ct_pause","ct_prev_accurate","ctCommentsCheck","ct_prev_from","ct_prev_till","ct_cool_down_time","ct_requests_counter","ct_max_requests","ct_ajax_nonce","ct_comments_total","ct_comments_checked","ct_comments_spam","ct_comments_bad","ct_unchecked","ct_date_from","ct_date_till","animate_comment","to","id","jQuery","fadeTo","ct_clear_comments","from","till","is","val","data","action","security","ajax","type","url","ajaxurl","success","msg","ct_show_info","ct_send_comments","ct_cooling_down_toggle","setTimeout","new_check","unchecked","parseJSON","parseInt","error","confirm","error_message","new_href","location","href","end","document","cookie","hide","checked","spam","bad","status_string","ct_status_string","ct_status_string_warning","html","jqXHR","textStatus","errorThrown","show","timeout","message","total","ct_toggle_depended","obj","secondary","depended","prop","removeProp","ct_delete_all","e","target","addClass","css","removeClass","ready","state","on","datepicker","setDefaults","regional","dates","dateFormat","maxDate","changeMonth","changeYear","showAnim","onSelect","selectedDate","option","instance","date","parseDate","settings","_defaults","not","ct_start_check","continue_check","alert","click","ct_check","accurate","JSON","stringify","start","Date","toUTCString","ct_confirm_deletion_all"],"mappings":"AAYA,IAAIA,aAXJC,OAAOC,UAAUC,OAAS,WACtB,IAAIC,EAAYC,KAChB,IAAK,IAAIC,KAAOC,UAAY,CAC9B,IAAIC,EAAmBJ,EAAUK,UAAU,EAAGL,EAAUM,QAAQ,KAAM,IAClEC,EAAmBP,EAAUK,UAAUL,EAAUM,QAAQ,KAAM,GAAG,EAAGN,EAAUQ,QACnFR,EAAYI,EAAmBD,UAAUD,GAAOK,EAE9C,OAAOP,IAKVS,cAAe,EACfC,sBAAuB,EACvBC,kBAAmB,EACnBC,mBAAoB,EACpBC,UAAW,EACXC,iBAAmBC,gBAAgBD,iBACnCE,aAAeD,gBAAgBC,aAC/BC,aAAeF,gBAAgBE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C,OAAO,aAAa4C,OAEpBhF,YAAW,EAERsH,GACFlE,eACAC,oBAEAf,qBAKFF,OAAO,yBAAyBoF,MAAM,WAErCH,IADAlD,SAASC,OAAS,yCAGnBhC,OAAO,4BAA4BoF,MAAM,WACxCH,GAAe,KAIhBjF,OAAO,aAAa8D,GAAG,QAAS,WAC/BjF,UAAW,EACX,IAAIwG,EAAW,CACdC,SAAY1G,kBACZuB,KAAYR,aACZS,KAAYR,cAEbmC,SAASC,OAAS,4BAA8BuD,KAAKC,UAAUH,GAAY,aAI/C,MAA1BtG,gBAAgB0G,QAClB1D,SAASC,OAAS,sCAAwC,IAAI0D,KAAK,GAAGC,cAAgB,WACtF3F,OAAO,yBAAyBoF,SAIjCpF,OAAO,kBAAkBoF,MAAM,SAAU7B,GAExC,IAAK9B,QAAQ1C,gBAAgB6G,yBAC5B,OAAO,EAERtC,cAAeC","file":"cleantalk-comments-checkspam.min.js","sourcesContent":["// Printf for JS\r\nString.prototype.printf = function(){\r\n var formatted = this;\r\n for( var arg in arguments ) {\r\n\t\tvar before_formatted = formatted.substring(0, formatted.indexOf(\"%s\", 0));\r\n\t\tvar after_formatted = formatted.substring(formatted.indexOf(\"%s\", 0)+2, formatted.length);\r\n\t\tformatted = before_formatted + arguments[arg] + after_formatted;\r\n }\r\n return formatted;\r\n};\r\n\r\n// Flags\r\nvar ct_working = false,\r\n\tct_new_check = true,\r\n\tct_cooling_down_flag = false,\r\n\tct_close_animate = true,\r\n\tct_accurate_check = false,\r\n\tct_pause = false,\r\n\tct_prev_accurate = ctCommentsCheck.ct_prev_accurate,\r\n\tct_prev_from = ctCommentsCheck.ct_prev_from,\t\r\n\tct_prev_till = ctCommentsCheck.ct_prev_till;\r\n// Settings\r\nvar ct_cool_down_time = 90000,\r\n\tct_requests_counter = 0,\r\n\tct_max_requests = 60;\r\n// Variables\r\nvar ct_ajax_nonce = ctCommentsCheck.ct_ajax_nonce,\r\n\tct_comments_total = 0,\r\n\tct_comments_checked = 0,\r\n\tct_comments_spam = 0,\r\n\tct_comments_bad = 0,\r\n\tct_unchecked = 'unset',\r\n\tct_date_from = 0,\r\n\tct_date_till = 0;\r\n\r\nfunction animate_comment(to,id){\r\n\tif(ct_close_animate){\r\n\t\tif(to==0.3){\r\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\r\n\t\t\t\tanimate_comment(1,id)\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\r\n\t\t\t\tanimate_comment(0.3,id)\r\n\t\t\t});\r\n\t\t}\r\n\t}else{\r\n\t\tct_close_animate=true;\r\n\t}\r\n}\r\n\r\nfunction ct_clear_comments(){\r\n\r\n\tvar from = 0, till = 0;\r\n\tif(jQuery('#ct_allow_date_range').is(':checked')) {\r\n\t\tfrom = jQuery('#ct_date_range_from').val();\r\n\t\ttill = jQuery('#ct_date_range_till').val();\r\n\t}\r\n\tvar data = {\r\n\t\t'action' : 'ajax_clear_comments',\r\n\t\t'security' : ct_ajax_nonce,\r\n\t\t'from' : from,\r\n\t\t'till' : till\r\n\t};\r\n\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function(msg){\r\n\t\t\tct_show_info();\r\n\t\t\tct_send_comments();\r\n\t\t}\r\n\t});\r\n}\r\n\r\n//Continues the check after cooldown time\r\n//Called by ct_send_users();\r\nfunction ct_cooling_down_toggle(){\r\n\tct_cooling_down_flag = false;\r\n\tct_send_comments();\r\n\tct_show_info();\r\n}\r\n\r\nfunction ct_send_comments(){\r\n\t\r\n\tif(ct_cooling_down_flag === true)\r\n\t\treturn;\r\n\t\r\n\tif(ct_requests_counter >= ct_max_requests){\r\n\t\tsetTimeout(ct_cooling_down_toggle, ct_cool_down_time);\r\n\t\tct_requests_counter = 0;\r\n\t\tct_cooling_down_flag = true;\r\n\t\treturn;\r\n\t}else{\r\n\t\tct_requests_counter++;\r\n\t}\r\n\t\r\n\tvar data = {\r\n\t\t'action': 'ajax_check_comments',\r\n\t\t'security': ct_ajax_nonce,\r\n\t\t'new_check': ct_new_check,\r\n\t\t'unchecked': ct_unchecked\r\n\t};\r\n\t\r\n\tif(ct_accurate_check)\r\n\t\tdata['accurate_check'] = true;\r\n\t\r\n\tif(ct_date_from && ct_date_till){\r\n\t\tdata['from'] = ct_date_from;\r\n\t\tdata['till'] = ct_date_till;\r\n\t}\r\n\t\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function(msg){\r\n\t\t\t\r\n\t\t\tmsg = jQuery.parseJSON(msg);\r\n\t\t\t\r\n\t\t\tif(parseInt(msg.error)){\r\n\t\t\t\tct_working=false;\r\n\t\t\t\tif(!confirm(msg.error_message+\". Do you want to proceed?\")){\r\n\t\t\t\t\tvar new_href = 'edit-comments.php?page=ct_check_spam';\r\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\r\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\r\n\t\t\t\t\tlocation.href = new_href;\r\n\t\t\t\t}else\r\n\t\t\t\t\tct_send_comments();\r\n\t\t\t}else{\r\n\t\t\t\tct_new_check = false;\r\n\t\t\t\tif(parseInt(msg.end) == 1 || ct_pause === true){\r\n\t\t\t\t\tif(parseInt(msg.end) == 1)\r\n\t\t\t\t\t\tdocument.cookie = 'ct_paused_comments_check=0; path=/';\r\n\t\t\t\t\tct_working=false;\r\n\t\t\t\t\tjQuery('#ct_working_message').hide();\r\n\t\t\t\t\tvar new_href = 'edit-comments.php?page=ct_check_spam';\r\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\r\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\r\n\t\t\t\t\tlocation.href = new_href;\r\n\t\t\t\t}else if(parseInt(msg.end) == 0){\r\n\t\t\t\t\tct_comments_checked += msg.checked;\r\n\t\t\t\t\tct_comments_spam += msg.spam;\r\n\t\t\t\t\tct_comments_bad += msg.bad;\r\n\t\t\t\t\tct_unchecked = ct_comments_total - ct_comments_checked - ct_comments_bad;\r\n\t\t\t\t\tvar status_string = String(ctCommentsCheck.ct_status_string);\r\n\t\t\t\t\tvar status_string = status_string.printf(ct_comments_total, ct_comments_checked, ct_comments_spam, ct_comments_bad);\r\n\t\t\t\t\tif(parseInt(ct_comments_spam) > 0)\r\n\t\t\t\t\t\tstatus_string += ctCommentsCheck.ct_status_string_warning;\r\n\t\t\t\t\tjQuery('#ct_checking_status').html(status_string);\r\n\t\t\t\t\tjQuery('#ct_error_message').hide();\r\n\t\t\t\t\t// If DB woks not properly\r\n\t\t\t\t\tif(+ct_comments_total < ct_comments_checked + ct_comments_bad){\r\n\t\t\t\t\t\tdocument.cookie = 'ct_comments_start_check=1; path=/';\r\n\t\t\t\t\t\tdocument.cookie = 'ct_comments_safe_check=1; path=/';\r\n\t\t\t\t\t\tlocation.href = 'edit-comments.php?page=ct_check_spam';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tct_send_comments();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n error: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\tjQuery('#ct_error_message').show();\r\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\r\n\t\t\tjQuery('#cleantalk_js_func').html('Check comments');\r\n\t\t\tsetTimeout(ct_send_comments(), 3000); \r\n },\r\n timeout: 25000\r\n\t});\r\n}\r\nfunction ct_show_info(){\r\n\t\r\n\tif(ct_working){\r\n\t\t\r\n\t\tif(ct_cooling_down_flag == true){\r\n\t\t\tjQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');\r\n\t\t\tjQuery('#ct_cooling_notice').show();\r\n\t\t\treturn;\t\t\t\r\n\t\t}else{\r\n\t\t\tjQuery('#ct_cooling_notice').hide();\r\n\t\t}\r\n\t\t\r\n\t\tif(!ct_comments_total){\r\n\t\t\t\r\n\t\t\tvar data = {\r\n\t\t\t\t'action': 'ajax_info_comments',\r\n\t\t\t\t'security': ct_ajax_nonce\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(ct_date_from && ct_date_till){\r\n\t\t\t\tdata['from'] = ct_date_from;\r\n\t\t\t\tdata['till'] = ct_date_till;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tjQuery.ajax({\r\n\t\t\t\ttype: \"POST\",\r\n\t\t\t\turl: ajaxurl,\r\n\t\t\t\tdata: data,\r\n\t\t\t\tsuccess: function(msg){\r\n\t\t\t\t\tmsg = jQuery.parseJSON(msg);\r\n\t\t\t\t\tjQuery('#ct_checking_status').html(msg.message);\r\n\t\t\t\t\tct_comments_total = msg.total;\r\n\t\t\t\t\tct_comments_spam = msg.spam;\r\n\t\t\t\t\tct_comments_checked = msg.checked;\r\n\t\t\t\t\tct_comments_bad = msg.bad;\r\n\t\t\t\t},\r\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\t\t\tjQuery('#ct_error_message').show();\r\n\t\t\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\r\n\t\t\t\t\tjQuery('#cleantalk_js_func').html('Check comments');\r\n\t\t\t\t\tsetTimeout(ct_show_info(), 3000); \r\n\t\t\t\t},\r\n\t\t\t\ttimeout: 15000\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Function to toggle dependences\r\nfunction ct_toggle_depended(obj, secondary){\r\n\r\n secondary = secondary || null;\r\n\r\n\tvar depended = jQuery(obj.data('depended')),\r\n\t\tstate = obj.data('state');\r\n\t\t\r\n\tif(!state && !secondary){\r\n\t\tobj.data('state', true);\r\n\t\tdepended.removeProp('disabled');\r\n\t}else{\r\n\t\tobj.data('state', false);\r\n\t\tdepended.prop('disabled', true);\r\n\t\tdepended.removeProp('checked');\r\n\t\tif(depended.data('depended'))\r\n\t\t\tct_toggle_depended(depended, true);\r\n\t}\r\n}\r\n\r\nfunction ct_delete_all( e ) {\r\n\r\n\tvar data = {\r\n\t\t'action': 'ajax_delete_all',\r\n\t\t'security': ct_ajax_nonce\r\n\t};\r\n\r\n\tjQuery('.' + e.target.id).addClass('disabled');\r\n\tjQuery('.spinner').css('visibility', 'visible');\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function( msg ){\r\n\t\t\tif( msg > 0 ){\r\n\t\t\t\tjQuery('#cleantalk_comments_left').html(msg);\r\n\t\t\t\tct_delete_all( e );\r\n\t\t\t}else{\r\n\t\t\t\tjQuery('.' + e.target.id).removeClass('disabled');\r\n\t\t\t\tjQuery('.spinner').css('visibility', 'hidden');\r\n\t\t\t\tlocation.href='edit-comments.php?page=ct_check_spam_total';\r\n\t\t\t}\r\n\t\t},\r\n\t\terror: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\tjQuery('#ct_error_message').show();\r\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\r\n\t\t\tjQuery('#cleantalk_js_func').html('Check comments');\r\n\t\t\tsetTimeout(ct_delete_all( e ), 3000);\r\n\t\t},\r\n\t\ttimeout: 25000\r\n\t});\r\n\r\n}\r\n\r\njQuery(document).ready(function(){\r\n\r\n\t// Setting dependences\r\n\t// jQuery('#ct_accurate_check') .data({'depended': '#ct_allow_date_range', 'state': false});\r\n\tjQuery('#ct_allow_date_range').data({'depended': '.ct_date', 'state': false});\r\n\t\r\n\t// Prev check parameters\r\n\tif(ct_prev_accurate){\r\n\t\tjQuery(\"#ct_accurate_check\").prop('checked', true);\r\n\t}\r\n\tif(ct_prev_from){\r\n\t\tjQuery(\"#ct_allow_date_range\").prop('checked', true).data('state', true);\r\n\t\tjQuery(\"#ct_date_range_from\").removeProp('disabled').val(ct_prev_from);\r\n\t\tjQuery(\"#ct_date_range_till\").removeProp('disabled').val(ct_prev_till);\r\n\t}\r\n\t\r\n\t// Toggle dependences\r\n\tjQuery(\"#ct_allow_date_range, #ct_accurate_check\").on('change', function(){\r\n\t\tct_toggle_depended(jQuery(this));\r\n\t});\r\n\r\n jQuery.datepicker.setDefaults(jQuery.datepicker.regional['en']);\r\n\tvar dates = jQuery('#ct_date_range_from, #ct_date_range_till').datepicker(\r\n\t\t{\r\n\t\t\tdateFormat: 'M d yy',\r\n\t\t\tmaxDate:\"+0D\",\r\n\t\t\tchangeMonth:true,\r\n\t\t\tchangeYear:true,\r\n\t\t\tshowAnim: 'slideDown',\r\n\t\t\tonSelect: function(selectedDate){\r\n\t\t\tvar option = this.id == \"ct_date_range_from\" ? \"minDate\" : \"maxDate\",\r\n\t\t\t\tinstance = jQuery( this ).data( \"datepicker\" ),\r\n\t\t\t\tdate = jQuery.datepicker.parseDate(\r\n\t\t\t\t\tinstance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat,\r\n\t\t\t\t\tselectedDate, instance.settings);\r\n\t\t\t\tdates.not(this).datepicker(\"option\", option, date);\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\t\r\n\tfunction ct_start_check(continue_check){\r\n\r\n continue_check = continue_check || null;\r\n\r\n\t\tif(jQuery('#ct_allow_date_range').is(':checked')){\r\n\t\t\t\r\n\t\t\tct_date_from = jQuery('#ct_date_range_from').val(),\r\n\t\t\tct_date_till = jQuery('#ct_date_range_till').val();\r\n\t\t\t\t\t\t\r\n\t\t\tif(!(ct_date_from != '' && ct_date_till != '')){\r\n\t\t\t\talert('Please, specify a date range.');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(jQuery('#ct_accurate_check').is(':checked')){\r\n\t\t\tct_accurate_check = true;\r\n\t\t}\r\n\t\t\r\n\t\tjQuery('.ct_to_hide').hide();\r\n\t\tjQuery('#ct_working_message').show();\r\n\t\tjQuery('#ct_preloader').show();\r\n\t\tjQuery('#ct_pause').show();\r\n\r\n\t\tct_working=true;\r\n\t\t\r\n\t\tif(continue_check){\r\n\t\t\tct_show_info();\r\n\t\t\tct_send_comments();\r\n\t\t}else\r\n\t\t\tct_clear_comments();\r\n\t\t\r\n\t}\r\n\t\r\n\t// Check comments\r\n\tjQuery(\"#ct_check_spam_button\").click(function(){\r\n\t\tdocument.cookie = 'ct_paused_comments_check=0; path=/';\r\n\t\tct_start_check(false);\r\n\t});\r\n\tjQuery(\"#ct_proceed_check_button\").click(function(){\r\n\t\tct_start_check(true);\r\n\t});\r\n\r\n\t// Pause the check\r\n\tjQuery('#ct_pause').on('click', function(){\r\n\t\tct_pause = true;\r\n\t\tvar ct_check = {\r\n\t\t\t'accurate': ct_accurate_check,\r\n\t\t\t'from' : ct_date_from,\r\n\t\t\t'till' : ct_date_till\r\n\t\t};\r\n\t\tdocument.cookie = 'ct_paused_comments_check=' + JSON.stringify(ct_check) + '; path=/';\r\n\t});\r\n\r\n\r\n\tif(ctCommentsCheck.start === '1'){\r\n\t\tdocument.cookie = 'ct_comments_start_check=0; expires=' + new Date(0).toUTCString() + '; path=/';\r\n\t\tjQuery('#ct_check_spam_button').click();\t\r\n\t}\r\n\r\n\t// Delete all spam comments\r\n\tjQuery(\".ct_delete_all\").click(function( e ){\r\n\r\n\t\tif (!confirm(ctCommentsCheck.ct_confirm_deletion_all))\r\n\t\t\treturn false;\r\n\r\n\t\tct_delete_all( e );\r\n\r\n\t});\r\n\r\n});"]}
js/cleantalk-comments-editscreen.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-comments-editscreen.js"],"names":["ct_is_email","str","search","ct_is_ip","ct_send_feedback_request","ct_comment_id","ct_comment_status","ct_undo","data","action","security","ctCommentsScreen","ct_ajax_nonce","comment_id","comment_status","jQuery","ajax","type","url","ajaxurl","success","msg","ct_feedback_message_output","error","jqXHR","textStatus","errorThrown","console","log","timeout","ct_result","html","show","append","children","css","ct_feedback_msg_whitelisted","ct_feedback_msg","is","ct_feedback_msg_blacklisted","document","ready","parseInt","ct_show_check_links","each","ct_curr_str","this","after","ct_img_src_new_tab","on","result","attr","match","undo_comment_id","set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ourcesContent":["function ct_is_email(str){\n\treturn str.search(/.*@.*\\..*/);\n}\nfunction ct_is_ip(str){\n\treturn str.search(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/);\n}\n\njQuery(document).ready(function(){\n\n\t/* Shows link to blacklists near every email and IP address */\n\tif(parseInt(ctCommentsScreen.ct_show_check_links))\n\t\tjQuery('.column-author a, .comment-author a').each(function(){\n\t\t\tvar ct_curr_str = jQuery(this).html();\n\t\t\tif(ct_is_email(ct_curr_str) != -1 || ct_is_ip(ct_curr_str) != -1){\n\t\t\t\tjQuery(this).after('&nbsp;<a href=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" target=\"_blank\" title=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" class=\"ct_link_new_tab\"><img src=\"'+ctCommentsScreen.ct_img_src_new_tab+'\"></a>');\n\t\t\t}\n\t\t});\n\t\t\n\t/* Feedback for comments */\n\tvar ct_comment_id;\n\t\n\t// For approved\n\tjQuery('span.approve').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\n\t});\n\t\n\t// For unapprove\n\tjQuery('span.unapprove').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\t\t\n\t});\n\t\n\t// For spammed\n\tjQuery('span.spam').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\n\t\t\n\t\tsetTimeout(function(){\n\t\t\tjQuery('tr#undo-'+ct_comment_id+' span.unspam a').click(function(){\n\t\t\t\tvar result = jQuery(this).attr('href');\n\t\t\t\tresult = result.match(/^comment\\.php\\?.*&c=(\\d*).*/);\n\t\t\t\tct_comment_id = result[1];\n\t\t\t\tct_send_feedback_request(ct_comment_id, 'approve', 1);\n\t\t\t});\n\t\t}, 202);\n\t\t\n\t});\n\t\n\t// For unspammed\n\tjQuery('span.unspam').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\n\t});\n\t\n\t// For untrashed\n\tjQuery('span.untrash a').on('click', function(){\n\t\tvar result = jQuery(this).attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tfeedback_result = ct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\n\t});\t\n});\n\n// Send feedback to backend\nfunction ct_send_feedback_request(ct_comment_id, ct_comment_status, ct_undo){\n\t\n\tvar data = {\n\t\t'action': 'ct_feedback_comment',\n\t\t'security': ctCommentsScreen.ct_ajax_nonce,\n\t\t'comment_id': ct_comment_id,\n\t\t'comment_status': ct_comment_status\n\t};\n\t\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\tct_feedback_message_output(ct_comment_id, ct_comment_status, msg, ct_undo);\n\t\t},\n error: function(jqXHR, textStatus, errorThrown) {\n\t\t\tconsole.log(jqXHR);\n\t\t\tconsole.log(textStatus);\n\t\t\tconsole.log(errorThrown);\n\t\t},\n timeout: 5000\n\t});\n}\n\n// Outputs CT message about feedback\nfunction ct_feedback_message_output(ct_comment_id, ct_comment_status, ct_result, ct_undo){\n\tif(ct_result == 1){\n\t\tif(ct_comment_status == 'approve' && !ct_undo){\n\t\t\tjQuery('tr#comment-'+ct_comment_id)\n\t\t\t\t.html('')\n\t\t\t\t.show()\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\n\t\t\t\t\t.css('background', 'rgba(110,240,110,0.7)')\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg_whitelisted+\" \"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\t\t\t\t\t\t\n\t\t}\n\t\tif(ct_comment_status == 'spam'){\n\t\t\tif(jQuery('tr').is('#undo-'+ct_comment_id)){\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id)\n\t\t\t\t\t.css('background', 'rgba(240,110,110,0.7)');\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id+' div.spam-undo-inside')\n\t\t\t\t\t.append(\" \"+ctCommentsScreen.ct_feedback_msg_blacklisted+\" \"+ctCommentsScreen.ct_feedback_msg);\n\t\t\t}else{\n\t\t\t\tjQuery('tr#comment-'+ct_comment_id)\n\t\t\t\t.html('')\n\t\t\t\t.show()\n\t\t\t\t.css('background', 'rgba(240,110,110,0.7)')\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg_blacklisted+\" \"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tif(ct_result == 0){\n\t\t// Error occurred\n\t}if(ct_result == 'no_hash'){\n\t\t// No hash for this comment\n\t}\n}\n"]}
1
+ {"version":3,"sources":["cleantalk-comments-editscreen.js"],"names":["ct_is_email","str","search","ct_is_ip","ct_send_feedback_request","ct_comment_id","ct_comment_status","ct_undo","data","action","security","ctCommentsScreen","ct_ajax_nonce","comment_id","comment_status","jQuery","ajax","type","url","ajaxurl","success","msg","ct_feedback_message_output","error","jqXHR","textStatus","errorThrown","console","log","timeout","ct_result","html","show","append","children","css","ct_feedback_msg_whitelisted","ct_feedback_msg","is","ct_feedback_msg_blacklisted","document","ready","parseInt","ct_show_check_links","each","ct_curr_str","this","after","ct_img_src_new_tab","on","result","attr","match","undo_comment_id","setTimeout","click","feedback_result"],"mappings":"AAAA,SAASA,YAAYC,GACpB,OAAOA,EAAIC,OAAO,aAEnB,SAASC,SAASF,GACjB,OAAOA,EAAIC,OAAO,wCAwEnB,SAASE,yBAAyBC,EAAeC,EAAmBC,GAEnE,IAAIC,EAAO,CACVC,OAAU,sBACVC,SAAYC,iBAAiBC,cAC7BC,WAAcR,EACdS,eAAkBR,GAGnBS,OAAOC,KAAK,CACXC,KAAM,OACNC,IAAKC,QACLX,KAAMA,EACNY,QAAS,SAASC,GACjBC,2BAA2BjB,EAAeC,EAAmBe,EAAKd,IAE7DgB,MAAO,SAASC,EAAOC,EAAYC,GACxCC,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,IAEPG,QAAS,MAKjB,SAASP,2BAA2BjB,EAAeC,EAAmBwB,EAAWvB,GAChE,GAAbuB,IACsB,WAArBxB,GAAmCC,GACrCQ,OAAO,cAAcV,GACnB0B,KAAK,IACLC,OACAC,OAAO,yBAAyBC,SAAS,MACxCC,IAAI,aAAc,yBAClBF,OAAO,iCAAiCtB,iBAAiByB,4BAA4B,IAAIzB,iBAAiB0B,gBAAgB,UAEtG,QAArB/B,IACCS,OAAO,MAAMuB,GAAG,SAASjC,IAC3BU,OAAO,WAAWV,GAChB8B,IAAI,aAAc,yBACpBpB,OAAO,WAAWV,EAAc,yBAC9B4B,OAAO,IAAItB,iBAAiB4B,4BAA4B,IAAI5B,iBAAiB0B,kBAE/EtB,OAAO,cAAcV,GACpB0B,KAAK,IACLC,OACAG,IAAI,aAAc,yBAClBF,OAAO,yBAAyBC,SAAS,MACxCD,OAAO,iCAAiCtB,iBAAiB4B,4BAA4B,IAAI5B,iBAAiB0B,gBAAgB,YArHhItB,OAAOyB,UAAUC,MAAM,WAYtB,IAAIpC,EATDqC,SA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ASA,EAAOE,MAAM,8BACtB/C,EAAgB6C,EAAO,GACvBM,gBAAkBpD,yBAAyBC,EAAe,UAAW","file":"cleantalk-comments-editscreen.min.js","sourcesContent":["function ct_is_email(str){\r\n\treturn str.search(/.*@.*\\..*/);\r\n}\r\nfunction ct_is_ip(str){\r\n\treturn str.search(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/);\r\n}\r\n\r\njQuery(document).ready(function(){\r\n\r\n\t/* Shows link to blacklists near every email and IP address */\r\n\tif(parseInt(ctCommentsScreen.ct_show_check_links))\r\n\t\tjQuery('.column-author a, .comment-author a').each(function(){\r\n\t\t\tvar ct_curr_str = jQuery(this).html();\r\n\t\t\tif(ct_is_email(ct_curr_str) != -1 || ct_is_ip(ct_curr_str) != -1){\r\n\t\t\t\tjQuery(this).after('&nbsp;<a href=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" target=\"_blank\" title=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" class=\"ct_link_new_tab\"><img src=\"'+ctCommentsScreen.ct_img_src_new_tab+'\"></a>');\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t/* Feedback for comments */\r\n\tvar ct_comment_id;\r\n\t\r\n\t// For approved\r\n\tjQuery('span.approve').on('click', function(){\r\n\t\tvar result = jQuery(this).children('a').attr('href');\r\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\r\n\t\tct_comment_id = result[1];\r\n\t\tundo_comment_id = ct_comment_id;\r\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\r\n\t});\r\n\t\r\n\t// For unapprove\r\n\tjQuery('span.unapprove').on('click', function(){\r\n\t\tvar result = jQuery(this).children('a').attr('href');\r\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\r\n\t\tct_comment_id = result[1];\r\n\t\tundo_comment_id = ct_comment_id;\r\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\t\t\r\n\t});\r\n\t\r\n\t// For spammed\r\n\tjQuery('span.spam').on('click', function(){\r\n\t\tvar result = jQuery(this).children('a').attr('href');\r\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\r\n\t\tct_comment_id = result[1];\r\n\t\tundo_comment_id = ct_comment_id;\r\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\r\n\t\t\r\n\t\tsetTimeout(function(){\r\n\t\t\tjQuery('tr#undo-'+ct_comment_id+' span.unspam a').click(function(){\r\n\t\t\t\tvar result = jQuery(this).attr('href');\r\n\t\t\t\tresult = result.match(/^comment\\.php\\?.*&c=(\\d*).*/);\r\n\t\t\t\tct_comment_id = result[1];\r\n\t\t\t\tct_send_feedback_request(ct_comment_id, 'approve', 1);\r\n\t\t\t});\r\n\t\t}, 202);\r\n\t\t\r\n\t});\r\n\t\r\n\t// For unspammed\r\n\tjQuery('span.unspam').on('click', function(){\r\n\t\tvar result = jQuery(this).children('a').attr('href');\r\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\r\n\t\tct_comment_id = result[1];\r\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\r\n\t});\r\n\t\r\n\t// For untrashed\r\n\tjQuery('span.untrash a').on('click', function(){\r\n\t\tvar result = jQuery(this).attr('href');\r\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\r\n\t\tct_comment_id = result[1];\r\n\t\tfeedback_result = ct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\r\n\t});\t\r\n});\r\n\r\n// Send feedback to backend\r\nfunction ct_send_feedback_request(ct_comment_id, ct_comment_status, ct_undo){\r\n\t\r\n\tvar data = {\r\n\t\t'action': 'ct_feedback_comment',\r\n\t\t'security': ctCommentsScreen.ct_ajax_nonce,\r\n\t\t'comment_id': ct_comment_id,\r\n\t\t'comment_status': ct_comment_status\r\n\t};\r\n\t\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function(msg){\r\n\t\t\tct_feedback_message_output(ct_comment_id, ct_comment_status, msg, ct_undo);\r\n\t\t},\r\n error: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\tconsole.log(jqXHR);\r\n\t\t\tconsole.log(textStatus);\r\n\t\t\tconsole.log(errorThrown);\r\n\t\t},\r\n timeout: 5000\r\n\t});\r\n}\r\n\r\n// Outputs CT message about feedback\r\nfunction ct_feedback_message_output(ct_comment_id, ct_comment_status, ct_result, ct_undo){\r\n\tif(ct_result == 1){\r\n\t\tif(ct_comment_status == 'approve' && !ct_undo){\r\n\t\t\tjQuery('tr#comment-'+ct_comment_id)\r\n\t\t\t\t.html('')\r\n\t\t\t\t.show()\r\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\r\n\t\t\t\t\t.css('background', 'rgba(110,240,110,0.7)')\r\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg_whitelisted+\" \"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\t\t\t\t\t\t\r\n\t\t}\r\n\t\tif(ct_comment_status == 'spam'){\r\n\t\t\tif(jQuery('tr').is('#undo-'+ct_comment_id)){\r\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id)\r\n\t\t\t\t\t.css('background', 'rgba(240,110,110,0.7)');\r\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id+' div.spam-undo-inside')\r\n\t\t\t\t\t.append(\" \"+ctCommentsScreen.ct_feedback_msg_blacklisted+\" \"+ctCommentsScreen.ct_feedback_msg);\r\n\t\t\t}else{\r\n\t\t\t\tjQuery('tr#comment-'+ct_comment_id)\r\n\t\t\t\t.html('')\r\n\t\t\t\t.show()\r\n\t\t\t\t.css('background', 'rgba(240,110,110,0.7)')\r\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\r\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg_blacklisted+\" \"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif(ct_result == 0){\r\n\t\t// Error occurred\r\n\t}if(ct_result == 'no_hash'){\r\n\t\t// No hash for this comment\r\n\t}\r\n}\r\n"]}
js/cleantalk-dashboard-widget.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-dashboard-widget.js"],"names":["jQuery","document","ready","on","show","setTimeout","window","scrollTo","offset","top","submit","location","hash","parent","css","ct_chart","getElementById","locale","navigator","language","userLanguage","google","charts","load","packages","setOnLoadCallback","data","visualization","DataTable","addColumn","date","date_formatter","Intl","DateTimeFormat","month","day","sort","a","b","Date","forEach","d","parse","format","ctParseData","apbctDashboardWidget","addRows","options","width","first","height","colors","legend","bar","groupWidth","chartArea","left","vAxis","gridlines","count","ColumnChart","draw"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAGtBF,OAAO,2BAA2BG,GAAG,QAAS,WAC7CH,OAAO,iBAAiBI,OACxBC,WAAW,WAAWC,OAAOC,SAAS,EAAGP,OAAO,sBAAsBQ,SAASC,IAAM,MAAQ,GAC7FJ,WAAW,WAAWL,OAAO,oBAAoBU,UAAY,QAG1C,cAAjBC,SAASC,MACXP,WAAW,WAAWC,OAAOC,SAAS,EAAGP,OAAO,sBAAsBQ,SAASC,IAAM,MAAQ,GAG9FT,OAAO,sBAAsBa,SAASC,IAAI,UAAW,GAGrD,IAAIC,EAAWd,SAASe,eAAe,mBACtCC,EAASC,UAAUC,UAAYD,UAAUE,aAgB1CC,OAAOC,OAAOC,KAAK,UAAW,CAACC,SAAS,CAAC,YAAa,SACtDH,OAAOC,OAAOG,kBAEd,WACC,IAAIC,EAAO,IAAIL,OAAOM,cAAcC,UACpCF,EAAKG,UAAU,SAAU,gBACzBH,EAAKG,UAAU,SAAU,aApB1B,SAAqBC,GACpB,IAAIC,EAAiB,IAAIC,KAAKC,eAAehB,EAAQ,CACpDiB,MAAO,QACPC,IAAK,YAENL,EAAKM,KAAK,SAASC,EAAEC,GACpB,OAAO,IAAIC,KAAKF,EAAE,IAAM,IAAIE,KAAKD,EAAE,MAEpCR,EAAKU,QAAQ,SAASC,GACrBA,EAAE,GAAKF,KAAKG,MAAMD,EAAE,IACpBA,EAAE,GAAKV,EAAeY,OAAOF,EAAE,MAYhCG,CAAYC,qBAAqBnB,MACjCA,EAAKoB,QAAQD,qBAAqBnB,MAElC,IAAIqB,EAAU,CACbC,MAAOhD,OAAO,oBAAoBiD,QAAQD,QAC1CE,OAAQ,IACRC,OAAQ,CAAC,aACTC,OAAQ,OACRC,IAAK,CAACC,WAAY,OAClBC,UAAU,CAACC,KAAK,GAAG/C,IAAI,GAAGuC,MAAM,MAAME,OAAO,OAC7CO,MAAO,CAAEC,UAAW,CAAEC,MAAO,KAG9B,GAAG5C,EAAS,CACC,IAAIM,OAAOM,cAAciC,YAAY7C,GAC3C8C,KAAKnC,EAAMqB","file":"cleantalk-dashboard-widget.min.js","sourcesContent":["jQuery(document).ready(function(){\n\t\n\t// Set \"refresh\" link handler\n\tjQuery(\".ct_widget_refresh_link\").on('click', function(){\n\t\tjQuery('.ct_preloader').show();\n\t\tsetTimeout(function(){window.scrollTo(0, jQuery('#ct_widget_wrapper').offset().top - 130);}, 1);\t\t\n\t\tsetTimeout(function(){jQuery(\"#ct_refresh_form\").submit();}, 2500);\n\t});\n\t\n\tif(location.hash == '#ct_widget')\n\t\tsetTimeout(function(){window.scrollTo(0, jQuery('#ct_widget_wrapper').offset().top - 130);}, 1);\n\t\n\t// Fixing default wrapper style\n\tjQuery(\"#ct_widget_wrapper\").parent().css('padding', 0);\n\t\n\t// Chart \n\tvar ct_chart = document.getElementById('ct_widget_chart'),\n\t\tlocale = navigator.language || navigator.userLanguage;\n\t\t\n\tfunction ctParseData(date){\n\t\tvar date_formatter = new Intl.DateTimeFormat(locale, {\n\t\t\tmonth: \"short\",\n\t\t\tday: \"numeric\"\n\t\t});\t\n\t\tdate.sort(function(a,b){\n\t\t\treturn new Date(a[0]) - new Date(b[0]) \n\t\t});\t\t\t\n\t\tdate.forEach(function(d){\t\n\t\t\td[0] = Date.parse(d[0]);\n\t\t\td[0] = date_formatter.format(d[0]);\n\t\t});\t\t\n\t}\n\t\t\n\tgoogle.charts.load('current', {packages:['corechart', 'bar']});\n\tgoogle.charts.setOnLoadCallback(drawStuff);\n\n\tfunction drawStuff() {\n\t\tvar data = new google.visualization.DataTable();\n\t\tdata.addColumn('string', 'Spam Blocked');\n\t\tdata.addColumn('number', 'Frequency');\n\t\t\n\t\tctParseData(apbctDashboardWidget.data);\n\t\tdata.addRows(apbctDashboardWidget.data);\n\t\n\t\tvar options = {\n\t\t\twidth: jQuery(\".ct_widget_block\").first().width(),\n\t\t\theight: 300,\n\t\t\tcolors: ['steelblue'],\n\t\t\tlegend: 'none',\n\t\t\tbar: {groupWidth: '95%'},\n\t\t\tchartArea:{left:30,top:20,width:'93%',height:'80%'},\n\t\t\tvAxis: { gridlines: { count: 5 } }\n\t\t};\n\n\t\tif(ct_chart){\n\t\t\tvar chart = new google.visualization.ColumnChart(ct_chart);\n\t\t\tchart.draw(data, options);\n\t\t}\n\t};\t\n});"]}
1
+ {"version":3,"sources":["cleantalk-dashboard-widget.js"],"names":["jQuery","document","ready","on","show","setTimeout","window","scrollTo","offset","top","submit","location","hash","parent","css","ct_chart","getElementById","locale","navigator","language","userLanguage","google","charts","load","packages","setOnLoadCallback","data","visualization","DataTable","addColumn","date","date_formatter","Intl","DateTimeFormat","month","day","sort","a","b","Date","forEach","d","parse","format","ctParseData","apbctDashboardWidget","addRows","options","width","first","height","colors","legend","bar","groupWidth","chartArea","left","vAxis","gridlines","count","ColumnChart","draw"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAGtBF,OAAO,2BAA2BG,GAAG,QAAS,WAC7CH,OAAO,iBAAiBI,OACxBC,WAAW,WAAWC,OAAOC,SAAS,EAAGP,OAAO,sBAAsBQ,SAASC,IAAM,MAAQ,GAC7FJ,WAAW,WAAWL,OAAO,oBAAoBU,UAAY,QAG1C,cAAjBC,SAASC,MACXP,WAAW,WAAWC,OAAOC,SAAS,EAAGP,OAAO,sBAAsBQ,SAASC,IAAM,MAAQ,GAG9FT,OAAO,sBAAsBa,SAASC,IAAI,UAAW,GAGrD,IAAIC,EAAWd,SAASe,eAAe,mBACtCC,EAASC,UAAUC,UAAYD,UAAUE,aAgB1CC,OAAOC,OAAOC,KAAK,UAAW,CAACC,SAAS,CAAC,YAAa,SACtDH,OAAOC,OAAOG,kBAEd,WACC,IAAIC,EAAO,IAAIL,OAAOM,cAAcC,UACpCF,EAAKG,UAAU,SAAU,gBACzBH,EAAKG,UAAU,SAAU,aApB1B,SAAqBC,GACpB,IAAIC,EAAiB,IAAIC,KAAKC,eAAehB,EAAQ,CACpDiB,MAAO,QACPC,IAAK,YAENL,EAAKM,KAAK,SAASC,EAAEC,GACpB,OAAO,IAAIC,KAAKF,EAAE,IAAM,IAAIE,KAAKD,EAAE,MAEpCR,EAAKU,QAAQ,SAASC,GACrBA,EAAE,GAAKF,KAAKG,MAAMD,EAAE,IACpBA,EAAE,GAAKV,EAAeY,OAAOF,EAAE,MAYhCG,CAAYC,qBAAqBnB,MACjCA,EAAKoB,QAAQD,qBAAqBnB,MAElC,IAAIqB,EAAU,CACbC,MAAOhD,OAAO,oBAAoBiD,QAAQD,QAC1CE,OAAQ,IACRC,OAAQ,CAAC,aACTC,OAAQ,OACRC,IAAK,CAACC,WAAY,OAClBC,UAAU,CAACC,KAAK,GAAG/C,IAAI,GAAGuC,MAAM,MAAME,OAAO,OAC7CO,MAAO,CAAEC,UAAW,CAAEC,MAAO,KAG9B,GAAG5C,EAAS,CACC,IAAIM,OAAOM,cAAciC,YAAY7C,GAC3C8C,KAAKnC,EAAMqB","file":"cleantalk-dashboard-widget.min.js","sourcesContent":["jQuery(document).ready(function(){\r\n\t\r\n\t// Set \"refresh\" link handler\r\n\tjQuery(\".ct_widget_refresh_link\").on('click', function(){\r\n\t\tjQuery('.ct_preloader').show();\r\n\t\tsetTimeout(function(){window.scrollTo(0, jQuery('#ct_widget_wrapper').offset().top - 130);}, 1);\t\t\r\n\t\tsetTimeout(function(){jQuery(\"#ct_refresh_form\").submit();}, 2500);\r\n\t});\r\n\t\r\n\tif(location.hash == '#ct_widget')\r\n\t\tsetTimeout(function(){window.scrollTo(0, jQuery('#ct_widget_wrapper').offset().top - 130);}, 1);\r\n\t\r\n\t// Fixing default wrapper style\r\n\tjQuery(\"#ct_widget_wrapper\").parent().css('padding', 0);\r\n\t\r\n\t// Chart \r\n\tvar ct_chart = document.getElementById('ct_widget_chart'),\r\n\t\tlocale = navigator.language || navigator.userLanguage;\r\n\t\t\r\n\tfunction ctParseData(date){\r\n\t\tvar date_formatter = new Intl.DateTimeFormat(locale, {\r\n\t\t\tmonth: \"short\",\r\n\t\t\tday: \"numeric\"\r\n\t\t});\t\r\n\t\tdate.sort(function(a,b){\r\n\t\t\treturn new Date(a[0]) - new Date(b[0]) \r\n\t\t});\t\t\t\r\n\t\tdate.forEach(function(d){\t\r\n\t\t\td[0] = Date.parse(d[0]);\r\n\t\t\td[0] = date_formatter.format(d[0]);\r\n\t\t});\t\t\r\n\t}\r\n\t\t\r\n\tgoogle.charts.load('current', {packages:['corechart', 'bar']});\r\n\tgoogle.charts.setOnLoadCallback(drawStuff);\r\n\r\n\tfunction drawStuff() {\r\n\t\tvar data = new google.visualization.DataTable();\r\n\t\tdata.addColumn('string', 'Spam Blocked');\r\n\t\tdata.addColumn('number', 'Frequency');\r\n\t\t\r\n\t\tctParseData(apbctDashboardWidget.data);\r\n\t\tdata.addRows(apbctDashboardWidget.data);\r\n\t\r\n\t\tvar options = {\r\n\t\t\twidth: jQuery(\".ct_widget_block\").first().width(),\r\n\t\t\theight: 300,\r\n\t\t\tcolors: ['steelblue'],\r\n\t\t\tlegend: 'none',\r\n\t\t\tbar: {groupWidth: '95%'},\r\n\t\t\tchartArea:{left:30,top:20,width:'93%',height:'80%'},\r\n\t\t\tvAxis: { gridlines: { count: 5 } }\r\n\t\t};\r\n\r\n\t\tif(ct_chart){\r\n\t\t\tvar chart = new google.visualization.ColumnChart(ct_chart);\r\n\t\t\tchart.draw(data, options);\r\n\t\t}\r\n\t};\t\r\n});"]}
js/cleantalk-debug-ajax.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-debug-ajax.js"],"names":["jQuery","document","ready","console","log","ajaxComplete","event","xhr","settings","data"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAEtBC,QAAQC,IAAI,YAGZJ,OAAOC,UAAUI,aAAa,SAASC,EAAOC,EAAKC,EAAUC,GAC5DN,QAAQC,IAAI,YACZD,QAAQC,IAAI,YACZD,QAAQC,IAAIE,GACZH,QAAQC,IAAI,eACZD,QAAQC,IAAIG,GACZJ,QAAQC,IAAI,uBACZD,QAAQC,IAAII,GACZL,QAAQC,IAAI,WACZD,QAAQC,IAAIK","file":"cleantalk-debug-ajax.min.js","sourcesContent":["jQuery(document).ready(function(){\n\n\tconsole.log('CT debug');\n\n\t// Debug. Console all AJAX requests.\n\tjQuery(document).ajaxComplete(function(event, xhr, settings, data) {\n\t\tconsole.log(\"Success!\")\n\t\tconsole.log('Event:\\n');\n\t\tconsole.log(event);\n\t\tconsole.log('Response:\\n');\n\t\tconsole.log(xhr);\n\t\tconsole.log('Request settings:\\n');\n\t\tconsole.log(settings);\n\t\tconsole.log('Data:\\n');\n\t\tconsole.log(data);\n\t});\n\t\t\n});"]}
1
+ {"version":3,"sources":["cleantalk-debug-ajax.js"],"names":["jQuery","document","ready","console","log","ajaxComplete","event","xhr","settings","data"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAEtBC,QAAQC,IAAI,YAGZJ,OAAOC,UAAUI,aAAa,SAASC,EAAOC,EAAKC,EAAUC,GAC5DN,QAAQC,IAAI,YACZD,QAAQC,IAAI,YACZD,QAAQC,IAAIE,GACZH,QAAQC,IAAI,eACZD,QAAQC,IAAIG,GACZJ,QAAQC,IAAI,uBACZD,QAAQC,IAAII,GACZL,QAAQC,IAAI,WACZD,QAAQC,IAAIK","file":"cleantalk-debug-ajax.min.js","sourcesContent":["jQuery(document).ready(function(){\r\n\r\n\tconsole.log('CT debug');\r\n\r\n\t// Debug. Console all AJAX requests.\r\n\tjQuery(document).ajaxComplete(function(event, xhr, settings, data) {\r\n\t\tconsole.log(\"Success!\")\r\n\t\tconsole.log('Event:\\n');\r\n\t\tconsole.log(event);\r\n\t\tconsole.log('Response:\\n');\r\n\t\tconsole.log(xhr);\r\n\t\tconsole.log('Request settings:\\n');\r\n\t\tconsole.log(settings);\r\n\t\tconsole.log('Data:\\n');\r\n\t\tconsole.log(data);\r\n\t});\r\n\t\t\r\n});"]}
js/cleantalk-public-admin.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-public-admin.js"],"names":["jQuery","document","ready","parents","each","e","this","css","length","ct_post_float","prev","last","ct_posts","indx","elem","curr_elem","parent","prepend","on","ct_comment_status","ct_current_button","ct_feedback_wrap","siblings","ct_feedback_msg","hasClass","data","action","security","ctPublicAdmin","ct_ajax_nonce","comment_id","attr","comment_status","change_status","ajax","type","url","ajaxurl","success","msg","hide","show","addClass","html","ct_feedback_error","ct_feedback_no_hash","ct_timeout_id","clearInterval","setTimeout","fadeOut","error","jqXHR","textStatus","errorThrown","console","log","timeout"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAGvBF,OAAO,oBAAoBG,UAAUC,KAAK,WACxC,GAAwD,GAAnDC,EAAIL,OAAOM,MAAMC,IAAI,qBAAqBC,QAAmB,oBAALH,EAE5D,OADAL,OAAO,oBAAoBO,IAAI,aAAcF,IACtC,IAKT,IAAII,EAAgBT,OAAO,oBAAoBU,OAAOC,OAAOJ,IAAI,SACjEP,OAAO,oBAAoBO,IAAI,QAASE,GAExC,IAAIG,EAAWZ,OAAO,oBAEtBA,OAAOY,GAAUR,KAAK,SAASS,EAAMC,GACpCC,UAAYf,OAAOc,GACnBC,UAAUC,SAASC,QAAQF,aAI5Bf,OAAO,eAAekB,GAAG,QAAS,WAEjC,IAGCC,EAHGC,EAAoBpB,OAAOM,MAC9Be,EAAmBrB,OAAOM,MAAMgB,SAAS,qBACzCC,EAAkBvB,OAAO,oBAIzBmB,EADEC,EAAkBI,SAAS,mBACT,OAEA,UAErB,IAAIC,EAAO,CACVC,OAAU,sBACVC,SAAYC,cAAcC,cAC1BC,WAAcV,EAAkBW,KAAK,aACrCC,eAAkBb,EAClBc,cAAiB,GAGlBjC,OAAOkC,KAAK,CACXC,KAAM,OACNC,IAAKR,cAAcS,QACnBZ,KAAMA,EACNa,QAAS,SAASC,GACjBnB,EAAkBoB,OAClBpB,EAAkBE,SAAS,mBAAmBmB,OAE9CzC,OAAO,uBAAuBwC,OACN,WAArBrB,EACFnB,OAAO,gCAAgCyC,OAEvCzC,OAAO,4BAA4ByC,OAE1B,GAAPF,GACFhB,EAAgBmB,SAAS,uBACzBnB,EAAgBoB,KAAKf,cAAcL,kBACpB,GAAPgB,GAERhB,EAAgBmB,SAAS,qBACzBnB,EAAgBoB,KAAKf,cAAcgB,oBACpB,WAAPL,IAERhB,EAAgBmB,SAAS,uBACzBnB,EAAgBoB,KAAKf,cAAciB,sBAGpCxB,EAAiBoB,OACjBpB,EAAiBd,IAAI,UAAW,gBAEhC,IAAIuC,EAAgBzB,EAAiBI,KAAK,eAC1CsB,cAAcD,GACdA,EAAgBE,WAAW,WAC1B3B,EAAiB4B,QAAQ,MACvB,KACH5B,EAAiBI,KAAK,cAAeqB,IAEtCI,MAAO,SAASC,EAAOC,EAAYC,GAClCC,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,IAEbG,QAAS","file":"cleantalk-public-admin.min.js","sourcesContent":["jQuery(document).ready(function(){\n\t\n\t// Set background-color similar to parents\njQuery('.ct_comment_info').parents().each(function() {\n if ((e = jQuery(this).css('background-color')).length > 0 && e != 'rgba(0, 0, 0, 0)'){ \n \tjQuery('.ct_comment_info').css('background', e);\n \treturn false;\n }\n});\n\t\n\t// Set same float style with article\n\tvar ct_post_float = jQuery('.ct_comment_info').prev().last().css('float');\n\tjQuery('.ct_comment_info').css('float', ct_post_float);\n\t\n\tvar ct_posts = jQuery('.ct_comment_info');\n\t\n\tjQuery(ct_posts).each(function(indx, elem){\n\t\tcurr_elem = jQuery(elem);\n\t\tcurr_elem.parent().prepend(curr_elem);\n\t});\n\t\n\t// Handler for buttons\n\tjQuery('.ct_this_is').on('click', function(){\n\t\t\n\t\tvar ct_current_button = jQuery(this),\n\t\t\tct_feedback_wrap = jQuery(this).siblings('.ct_feedback_wrap'),\n\t\t\tct_feedback_msg = jQuery('.ct_feedback_msg'),\n\t\t\tct_comment_status;\n\t\t\t\n\t\tif(ct_current_button.hasClass('ct_this_is_spam'))\n\t\t\tct_comment_status = 'spam';\n\t\telse\n\t\t\tct_comment_status = 'approve';\n\t\t\n\t\tvar data = {\n\t\t\t'action': 'ct_feedback_comment',\n\t\t\t'security': ctPublicAdmin.ct_ajax_nonce,\n\t\t\t'comment_id': ct_current_button.attr('commentid'),\n\t\t\t'comment_status': ct_comment_status,\n\t\t\t'change_status': 1\n\t\t};\n\t\t\n\t\tjQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: ctPublicAdmin.ajaxurl,\n\t\t\tdata: data,\n\t\t\tsuccess: function(msg){\n\t\t\t\tct_current_button.hide();\n\t\t\t\tct_current_button.siblings('span.ct_this_is').show();\n\t\t\t\t\n\t\t\t\tjQuery('.ct_feedback_result').hide();\n\t\t\t\tif(ct_comment_status == 'approve')\n\t\t\t\t\tjQuery('.ct_feedback_result_not_spam').show();\n\t\t\t\telse\n\t\t\t\t\tjQuery('.ct_feedback_result_spam').show();\n\t\t\t\t\n\t\t\t\tif(msg == 1){\n\t\t\t\t\tct_feedback_msg.addClass('ct_feedback_success');\n\t\t\t\t\tct_feedback_msg.html(ctPublicAdmin.ct_feedback_msg);\n\t\t\t\t}else if(msg == 0){\n\t\t\t\t\t// Error occurred\n\t\t\t\t\tct_feedback_msg.addClass('ct_feedback_error');\n\t\t\t\t\tct_feedback_msg.html(ctPublicAdmin.ct_feedback_error);\n\t\t\t\t}else if(msg == 'no_hash'){\n\t\t\t\t\t// No hash for this comment\n\t\t\t\t\tct_feedback_msg.addClass('ct_feedback_no_hash');\n\t\t\t\t\tct_feedback_msg.html(ctPublicAdmin.ct_feedback_no_hash);\n\t\t\t\t}\n\t\t\t\t// Hidding feedback message for every message type\n\t\t\t\tct_feedback_wrap.show();\n\t\t\t\tct_feedback_wrap.css('display', 'inline-block');\n\t\t\t\t\n\t\t\t\tvar ct_timeout_id = ct_feedback_wrap.data('interval_id');\n\t\t\t\tclearInterval(ct_timeout_id);\n\t\t\t\tct_timeout_id = setTimeout(function(){\n\t\t\t\t\tct_feedback_wrap.fadeOut(1000);\n\t\t\t\t}, 5000);\n\t\t\t\tct_feedback_wrap.data('interval_id', ct_timeout_id);\n\t\t\t},\n\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\tconsole.log(jqXHR);\n\t\t\t\tconsole.log(textStatus);\n\t\t\t\tconsole.log(errorThrown);\n\t\t\t},\n\t\t\ttimeout: 5000\n\t\t});\n\t});\n\t\n});"]}
1
+ {"version":3,"sources":["cleantalk-public-admin.js"],"names":["jQuery","document","ready","parents","each","e","this","css","length","ct_post_float","prev","last","ct_posts","indx","elem","curr_elem","parent","prepend","on","ct_comment_status","ct_current_button","ct_feedback_wrap","siblings","ct_feedback_msg","hasClass","data","action","security","ctPublicAdmin","ct_ajax_nonce","comment_id","attr","comment_status","change_status","ajax","type","url","ajaxurl","success","msg","hide","show","addClass","html","ct_feedback_error","ct_feedback_no_hash","ct_timeout_id","clearInterval","setTimeout","fadeOut","error","jqXHR","textStatus","errorThrown","console","log","timeout"],"mappings":"AAAAA,OAAOC,UAAUC,MAAM,WAGvBF,OAAO,oBAAoBG,UAAUC,KAAK,WACxC,GAAwD,GAAnDC,EAAIL,OAAOM,MAAM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,MAAO,SAASC,EAAOC,EAAYC,GAClCC,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GACZE,QAAQC,IAAIF,IAEbG,QAAS","file":"cleantalk-public-admin.min.js","sourcesContent":["jQuery(document).ready(function(){\r\n\t\r\n\t// Set background-color similar to parents\r\njQuery('.ct_comment_info').parents().each(function() {\r\n if ((e = jQuery(this).css('background-color')).length > 0 && e != 'rgba(0, 0, 0, 0)'){ \r\n \tjQuery('.ct_comment_info').css('background', e);\r\n \treturn false;\r\n }\r\n});\r\n\t\r\n\t// Set same float style with article\r\n\tvar ct_post_float = jQuery('.ct_comment_info').prev().last().css('float');\r\n\tjQuery('.ct_comment_info').css('float', ct_post_float);\r\n\t\r\n\tvar ct_posts = jQuery('.ct_comment_info');\r\n\t\r\n\tjQuery(ct_posts).each(function(indx, elem){\r\n\t\tcurr_elem = jQuery(elem);\r\n\t\tcurr_elem.parent().prepend(curr_elem);\r\n\t});\r\n\t\r\n\t// Handler for buttons\r\n\tjQuery('.ct_this_is').on('click', function(){\r\n\t\t\r\n\t\tvar ct_current_button = jQuery(this),\r\n\t\t\tct_feedback_wrap = jQuery(this).siblings('.ct_feedback_wrap'),\r\n\t\t\tct_feedback_msg = jQuery('.ct_feedback_msg'),\r\n\t\t\tct_comment_status;\r\n\t\t\t\r\n\t\tif(ct_current_button.hasClass('ct_this_is_spam'))\r\n\t\t\tct_comment_status = 'spam';\r\n\t\telse\r\n\t\t\tct_comment_status = 'approve';\r\n\t\t\r\n\t\tvar data = {\r\n\t\t\t'action': 'ct_feedback_comment',\r\n\t\t\t'security': ctPublicAdmin.ct_ajax_nonce,\r\n\t\t\t'comment_id': ct_current_button.attr('commentid'),\r\n\t\t\t'comment_status': ct_comment_status,\r\n\t\t\t'change_status': 1\r\n\t\t};\r\n\t\t\r\n\t\tjQuery.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: ctPublicAdmin.ajaxurl,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: function(msg){\r\n\t\t\t\tct_current_button.hide();\r\n\t\t\t\tct_current_button.siblings('span.ct_this_is').show();\r\n\t\t\t\t\r\n\t\t\t\tjQuery('.ct_feedback_result').hide();\r\n\t\t\t\tif(ct_comment_status == 'approve')\r\n\t\t\t\t\tjQuery('.ct_feedback_result_not_spam').show();\r\n\t\t\t\telse\r\n\t\t\t\t\tjQuery('.ct_feedback_result_spam').show();\r\n\t\t\t\t\r\n\t\t\t\tif(msg == 1){\r\n\t\t\t\t\tct_feedback_msg.addClass('ct_feedback_success');\r\n\t\t\t\t\tct_feedback_msg.html(ctPublicAdmin.ct_feedback_msg);\r\n\t\t\t\t}else if(msg == 0){\r\n\t\t\t\t\t// Error occurred\r\n\t\t\t\t\tct_feedback_msg.addClass('ct_feedback_error');\r\n\t\t\t\t\tct_feedback_msg.html(ctPublicAdmin.ct_feedback_error);\r\n\t\t\t\t}else if(msg == 'no_hash'){\r\n\t\t\t\t\t// No hash for this comment\r\n\t\t\t\t\tct_feedback_msg.addClass('ct_feedback_no_hash');\r\n\t\t\t\t\tct_feedback_msg.html(ctPublicAdmin.ct_feedback_no_hash);\r\n\t\t\t\t}\r\n\t\t\t\t// Hidding feedback message for every message type\r\n\t\t\t\tct_feedback_wrap.show();\r\n\t\t\t\tct_feedback_wrap.css('display', 'inline-block');\r\n\t\t\t\t\r\n\t\t\t\tvar ct_timeout_id = ct_feedback_wrap.data('interval_id');\r\n\t\t\t\tclearInterval(ct_timeout_id);\r\n\t\t\t\tct_timeout_id = setTimeout(function(){\r\n\t\t\t\t\tct_feedback_wrap.fadeOut(1000);\r\n\t\t\t\t}, 5000);\r\n\t\t\t\tct_feedback_wrap.data('interval_id', ct_timeout_id);\r\n\t\t\t},\r\n\t\t\terror: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\t\tconsole.log(jqXHR);\r\n\t\t\t\tconsole.log(textStatus);\r\n\t\t\t\tconsole.log(errorThrown);\r\n\t\t\t},\r\n\t\t\ttimeout: 5000\r\n\t\t});\r\n\t});\r\n\t\r\n});"]}
js/cleantalk-users-checkspam.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-users-checkspam.js"],"names":["String","prototype","printf","formatted","this","arg","arguments","before_formatted","substring","indexOf","after_formatted","length","ct_working","document","cookie","ct_new_check","ct_cooling_down_flag","ct_close_animate","ct_accurate_check","ct_pause","ct_prev_accurate","ctUsersCheck","ct_prev_from","ct_prev_till","ct_cool_down_time","ct_requests_counter","ct_max_requests","ct_ajax_nonce","ct_users_total","ct_users_checked","ct_users_spam","ct_users_bad","ct_unchecked","ct_date_from","ct_date_till","apbct_cookie__get","names","prefixes","split","forEach","item","i","arr","curr","trim","name","all","prefix","apbct_get_cookie","animate_comment","to","id","jQuery","fadeTo","ct_clear_users","from","till","is","val","data","action","security","ajax","type","url","ajaxurl","success","msg","ct_show_users_info","ct_send_users","ct_cooling_down_toggle","setTimeout","check_amount","new_check","unchecked","amount","parseJSON","parseInt","error","confirm","error_message","new_href","location","href","end","hide","checked","spam","bad","status_string","ct_status_string","ct_status_string_warning","html","jqXHR","textStatus","errorThrown","show","timeout","message","ct_toggle_depended","obj","secondary","depended","prop","removeProp","ct_start_check","continue_check","alert","ct_delete_all_users","e","target","addClass","css","removeClass","ready","state","on","datepicker","setDefaults","regional","dates","dateFormat","maxDate","changeMonth","changeYear","showAnim","onSelect","selectedDate","option","instance","date","parseDate","settings","_defaults","not","click","ct_check","accurate","JSON","stringify","ct_id","attr","fadeOut","remove","user_id","status","filename","ct_csv_filename","ct_bad_csv","URL","createObjectURL","Blob","dummy","createElement","download","body","appendChild","ct_confirm_deletion_all"],"mappings":"AACAA,OAAOC,UAAUC,OAAS,WACtB,IAAIC,EAAYC,KAChB,IAAK,IAAIC,KAAOC,UAAY,CAC9B,IAAIC,EAAmBJ,EAAUK,UAAU,EAAGL,EAAUM,QAAQ,KAAM,IAClEC,EAAmBP,EAAUK,UAAUL,EAAUM,QAAQ,KAAM,GAAG,EAAGN,EAAUQ,QACn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K,WAG1B,IAAIlF,EAAO,CACVC,OAAU,uBACVC,SAAYlC,cACZwB,GAAMyF,OAEPxF,OAAOU,KAAK,CACXC,KAAM,OACNC,IAAKC,QACLN,KAAMA,EACNO,QAAS,SAASC,GACjBf,OAAO,YAAYwF,OAAOE,QAAQ,OAAQ,WACzC1F,OAAO,YAAYwF,OAAOG,cAMzBpF,EAAO,CACVC,OAAU,mBACVC,SAAYlC,cACZqH,QAAWJ,MACXK,OAAU,WAEX7F,OAAOU,KAAK,CACXC,KAAM,OACNC,IAAKC,QACLN,KAAMA,EACNO,QAAS,SAASC,KAWlBW,MAAO,SAASe,EAAOC,EAAYC,KAGnCE,QAAS,QAMX7C,OAAO,oBAAoBmF,MAAM,SAAU1B,GAC1C,IAAIlD,EAAO,CACVC,OAAU,uBACVC,SAAYlC,cACZuH,SAAY7H,aAAa8H,iBAE1B/F,OAAO,IAAMyD,EAAEC,OAAO3D,IAAI4D,SAAS,YACnC3D,OAAO,YAAY4D,IAAI,aAAc,WACrC5D,OAAOU,KAAK,CACXC,KAAM,OACNC,IAAKC,QACLN,KAAMA,EACNO,QAAS,SAASC,GACjB,GAAsB,IAAlBU,SAASV,GACZwC,MAAMtF,aAAa+H,gBACb,CACN,IAAIpF,EAAMqF,IAAIC,gBAAgB,IAAIC,KAAK,CAACpF,KAEpCqF,EAAQ3I,SAAS4I,cAAc,KACnCD,EAAMrE,KAAOnB,EACbwF,EAAME,SAAWrI,aAAa8H,gBAAkB,OAEhDtI,SAAS8I,KAAKC,YAAYJ,GAC1BA,EAAMjB,QAEPnF,OAAO,IAAMyD,EAAEC,OAAO3D,IAAI8D,YAAY,YACtC7D,OAAO,YAAY4D,IAAI,aAAc,eAMxC5D,OAAO,wBAAwBmF,MAAM,SAAU1B,GAE9C,IAAO9B,QAAS1D,aAAawI,yBAC5B,OAAO,EAORjD,oBAAqBC","file":"cleantalk-users-checkspam.min.js","sourcesContent":["// Printf for JS\nString.prototype.printf = function(){\n var formatted = this;\n for( var arg in arguments ) {\n\t\tvar before_formatted = formatted.substring(0, formatted.indexOf(\"%s\", 0));\n\t\tvar after_formatted = formatted.substring(formatted.indexOf(\"%s\", 0)+2, formatted.length);\n\t\tformatted = before_formatted + arguments[arg] + after_formatted;\n }\n return formatted;\n};\n\n// Set deafult amount to check by request.\ndocument.cookie = \"ct_check_users__amount=\" + 100 + \"; path=/\";\n\n// Flags\nvar ct_working = false,\n\tct_new_check = true,\n\tct_cooling_down_flag = false,\n\tct_close_animate = true,\n\tct_accurate_check = false,\n\tct_pause = false,\n\tct_prev_accurate = ctUsersCheck.ct_prev_accurate,\n\tct_prev_from = ctUsersCheck.ct_prev_from,\t\n\tct_prev_till = ctUsersCheck.ct_prev_till;\n// Settings\nvar ct_cool_down_time = 90000,\n\tct_requests_counter = 0,\n\tct_max_requests = 60;\n// Variables\nvar ct_ajax_nonce = ctUsersCheck.ct_ajax_nonce,\n\tct_users_total = 0,\n\tct_users_checked = 0,\n\tct_users_spam = 0,\n\tct_users_bad = 0,\n\tct_unchecked = 'unset',\n\tct_date_from = 0,\n\tct_date_till = 0;\n\n/* Function: Reuturns cookie with prefix */\nfunction apbct_cookie__get(names, prefixes){\n\tvar cookie = {};\n\tnames = names || null;\n\tif(typeof names == 'string') names = names.split();\n\tprefixes = prefixes || ['apbct_', 'ct_'];\n\tif(prefixes === 'none') prefixes = null;\n\tif(typeof prefixes == 'string') prefixes = prefixes.split();\n\tdocument.cookie.split(';').forEach(function(item, i, arr){\n\t\tvar curr = item.trim().split('=');\n\t\t// Detect by full cookie name\n\t\tif(names){\n\t\t\tnames.forEach(function(name, i, all){\n\t\t\t\tif(curr[0] === name)\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\n\t\t\t});\n\t\t}\n\t\t// Detect by name prefix\n\t\tif(prefixes){\n\t\t\tprefixes.forEach(function(prefix, i, all){\n\t\t\t\tif(curr[0].indexOf(prefix) === 0)\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\n\t\t\t});\n\t\t}\n\t});\n\treturn cookie;\n}\n\nfunction apbct_get_cookie( name ){\n\tvar cookie = apbct_cookie__get( name, name );\n\tif(typeof cookie === 'object' && typeof cookie[name] != 'undefined'){\n\t\treturn cookie[name];\n\t}else\n\t\treturn null;\n}\n\nfunction animate_comment(to,id){\n\tif(ct_close_animate){\n\t\tif(to === 0.3){\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\n\t\t\t\tanimate_comment(1,id)\n\t\t\t});\n\t\t}else{\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\n\t\t\t\tanimate_comment(0.3,id)\n\t\t\t});\n\t\t}\n\t}else{\n\t\tct_close_animate=true;\n\t}\n}\n\nfunction ct_clear_users(){\n\n\tvar from = 0, till = 0;\n\tif(jQuery('#ct_allow_date_range').is(':checked')) {\n\t\tfrom = jQuery('#ct_date_range_from').val();\n\t\ttill = jQuery('#ct_date_range_till').val();\n\t}\n\tvar data = {\n\t\t'action' : 'ajax_clear_users',\n\t\t'security' : ct_ajax_nonce,\n\t\t'from' : from,\n\t\t'till' : till\n\t};\n\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\tct_show_users_info();\n\t\t\tct_send_users();\n\t\t}\n\t});\n\n}\n\n//Continues the check after cooldown time\n//Called by ct_send_users();\nfunction ct_cooling_down_toggle(){\n\tct_cooling_down_flag = false;\n\tct_send_users();\n\tct_show_users_info();\n}\n\nfunction ct_send_users(){\n\t\n\tif(ct_cooling_down_flag === true)\n\t\treturn;\n\t\n\tif(ct_requests_counter >= ct_max_requests){\n\t\tsetTimeout(ct_cooling_down_toggle, ct_cool_down_time);\n\t\tct_requests_counter = 0;\n\t\tct_cooling_down_flag = true;\n\t\treturn;\n\t}else{\n\t\tct_requests_counter++;\n\t}\n\n\tvar check_amount = apbct_get_cookie('ct_check_users__amount');\n\n\tvar data = {\n\t\taction: 'ajax_check_users',\n\t\tsecurity: ct_ajax_nonce,\n\t\tnew_check: ct_new_check,\n\t\tunchecked: ct_unchecked,\n\t\tamount: check_amount\n\t};\n\t\n\tif(ct_accurate_check)\n\t\tdata['accurate_check'] = true;\n\t\n\tif(ct_date_from && ct_date_till){\n\t\tdata['from'] = ct_date_from;\n\t\tdata['till'] = ct_date_till;\n\t}\n\t\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\t\n\t\t\tmsg = jQuery.parseJSON(msg);\n\t\t\t\n\t\t\tif(parseInt(msg.error)){\n\t\t\t\tct_working=false;\n\t\t\t\tif(!confirm(msg.error_message+\". Do you want to proceed?\")){\n\t\t\t\t\tvar new_href = 'users.php?page=ct_check_users';\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\n\t\t\t\t\tlocation.href = new_href;\n\t\t\t\t}else\n\t\t\t\t\tct_send_users();\n\t\t\t}else{\n\t\t\t\tct_new_check = false;\n\t\t\t\tif(parseInt(msg.end) == 1 || ct_pause == true){\n\t\t\t\t\tif(parseInt(msg.end) == 1)\n\t\t\t\t\t\tdocument.cookie = 'ct_paused_users_check=0; path=/';\n\t\t\t\t\tct_working=false;\n\t\t\t\t\tjQuery('#ct_working_message').hide();\n\t\t\t\t\tvar new_href = 'users.php?page=ct_check_users&ct_worked=1';\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\n\t\t\t\t\tlocation.href = new_href;\n\t\t\t\t}else if(parseInt(msg.end) == 0){\n\t\t\t\t\tct_users_checked += msg.checked;\n\t\t\t\t\tct_users_spam += msg.spam;\n\t\t\t\t\tct_users_bad += msg.bad;\n\t\t\t\t\tct_unchecked = ct_users_total - ct_users_checked - ct_users_bad;\n\t\t\t\t\tvar status_string = String(ctUsersCheck.ct_status_string);\n\t\t\t\t\tvar status_string = status_string.printf(ct_users_checked, ct_users_spam, ct_users_bad);\n\t\t\t\t\tif(parseInt(ct_users_spam) > 0)\n\t\t\t\t\t\tstatus_string += ctUsersCheck.ct_status_string_warning;\n\t\t\t\t\tjQuery('#ct_checking_status').html(status_string);\n\t\t\t\t\tjQuery('#ct_error_message').hide();\n\t\t\t\t\tct_send_users();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n error: function(jqXHR, textStatus, errorThrown) {\n\t\t\tif(check_amount > 20){\n\t\t\t\tcheck_amount -= 20;\n\t\t\t\tdocument.cookie = \"ct_check_users__amount=\" + check_amount + \"; path=/\";\n\t\t\t}\n\t\t\tjQuery('#ct_error_message').show();\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\n\t\t\tjQuery('#cleantalk_js_func').html('Check users');\n\t\t\tsetTimeout(ct_send_users(), 3000);\n },\n timeout: 25000\n\t});\n}\nfunction ct_show_users_info(){\n\t\n\tif( ct_working ){\n\t\t\n\t\tif(ct_cooling_down_flag == true){\n\t\t\tjQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');\n\t\t\tjQuery('#ct_cooling_notice').show();\n\t\t\treturn;\t\t\t\n\t\t}else{\n\t\t\tjQuery('#ct_cooling_notice').hide();\n\t\t}\n\t\t\n\t\tif( ! ct_users_total ){\n\t\t\t\n\t\t\tvar data = {\n\t\t\t\t'action': 'ajax_info_users',\n\t\t\t\t'security': ct_ajax_nonce\n\t\t\t};\n\t\t\t\n\t\t\tif( ct_date_from && ct_date_till ){\n\t\t\t\tdata['from'] = ct_date_from;\n\t\t\t\tdata['till'] = ct_date_till;\n\t\t\t}\n\t\t\t\n\t\t\tjQuery.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: data,\n\t\t\t\tsuccess: function(msg){\n\t\t\t\t\tmsg = jQuery.parseJSON(msg);\n\t\t\t\t\tjQuery('#ct_checking_status').html(msg.message);\n\t\t\t\t\tct_users_spam = msg.spam;\n\t\t\t\t\tct_users_checked = msg.checked;\n\t\t\t\t\tct_users_bad = msg.bad;\n\t\t\t\t},\n\t\t\t\terror: function (jqXHR, textStatus, errorThrown){\n\t\t\t\t\tjQuery('#ct_error_message').show();\n\t\t\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\n\t\t\t\t\tjQuery('#cleantalk_js_func').html('Show users');\n\t\t\t\t\tsetTimeout(ct_show_users_info(), 3000);\n\t\t\t\t},\n\t\t\t\ttimeout: 15000\n\t\t\t});\n\t\t}\n\t}\n}\n// Function to toggle dependences\nfunction ct_toggle_depended(obj, secondary){\n\n secondary = secondary || null;\n\n\tvar depended = jQuery(obj.data('depended')),\n\t\tstate = obj.data('state');\n\t\t\n\tif(!state && !secondary){\n\t\tobj.data('state', true);\n\t\tdepended.removeProp('disabled');\n\t}else{\n\t\tobj.data('state', false);\n\t\tdepended.prop('disabled', true);\n\t\tdepended.removeProp('checked');\n\t\tif(depended.data('depended'))\n\t\t\tct_toggle_depended(depended, true);\n\t}\n}\n\n// Main function of checking\nfunction ct_start_check( continue_check ){\n\n\tcontinue_check = continue_check || null;\n\n\tif(jQuery('#ct_allow_date_range').is(':checked')){\n\n\t\tct_date_from = jQuery('#ct_date_range_from').val();\n\t\tct_date_till = jQuery('#ct_date_range_till').val();\n\n\t\tif(!(ct_date_from !== '' && ct_date_till !== '')){\n\t\t\talert('Please, specify a date range.');\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif(jQuery('#ct_accurate_check').is(':checked')){\n\t\tct_accurate_check = true;\n\t}\n\n\tjQuery('.ct_to_hide').hide();\n\tjQuery('#ct_working_message').show();\n\tjQuery('#ct_preloader').show();\n\tjQuery('#ct_pause').show();\n\n\tct_working = true;\n\n\tif( continue_check ){\n\t\tct_show_users_info();\n\t\tct_send_users();\n\t} else {\n\t\tct_clear_users();\n\t}\n\n}\n\nfunction ct_delete_all_users( e ){\n\n\tjQuery('.' + e.target.id).addClass('disabled');\n\tjQuery('.spinner').css('visibility', 'visible');\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function( msg ){\n\t\t\tif( msg > 0 ){\n\t\t\t\tjQuery('#cleantalk_users_left').html(msg);\n\t\t\t\tct_delete_all_users( e );\n\t\t\t}else{\n\t\t\t\tjQuery('.' + e.target.id).removeClass('disabled');\n\t\t\t\tjQuery('.spinner').css('visibility', 'hidden');\n\t\t\t\tlocation.href='users.php?page=ct_check_users_total';\n\t\t\t}\n\t\t},\n\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\tjQuery('#ct_error_message').show();\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\n\t\t\tjQuery('#cleantalk_js_func').html('All users deleteion');\n\t\t\tsetTimeout(ct_delete_all_users( e ), 3000);\n\t\t},\n\t\ttimeout: 25000\n\t});\n}\n\njQuery(document).ready(function(){\n\n\t// Setting dependences\n\t// jQuery('#ct_accurate_check') .data({'depended': '#ct_allow_date_range', 'state': false});\n\tjQuery('#ct_allow_date_range').data({'depended': '.ct_date', 'state': false});\n\t\n\t// Prev check parameters\n\tif(ct_prev_accurate){\n\t\tjQuery(\"#ct_accurate_check\").prop('checked', true);\n\t}\n\tif(ct_prev_from){\n\t\tjQuery(\"#ct_allow_date_range\").prop('checked', true).data('state', true);\n\t\tjQuery(\"#ct_date_range_from\").removeProp('disabled').val(ct_prev_from);\n\t\tjQuery(\"#ct_date_range_till\").removeProp('disabled').val(ct_prev_till);\n\t}\n\t\n\t// Toggle dependences\n\tjQuery(\"#ct_allow_date_range, #ct_accurate_check\").on('change', function(){\n\t\tct_toggle_depended(jQuery(this));\n\t});\n\n\tjQuery.datepicker.setDefaults(jQuery.datepicker.regional['en']);\n\tvar dates = jQuery('#ct_date_range_from, #ct_date_range_till').datepicker(\n\t\t{\n\t\t\tdateFormat: 'M d yy',\n\t\t\tmaxDate:\"+0D\",\n\t\t\tchangeMonth:true,\n\t\t\tchangeYear:true,\n\t\t\tshowAnim: 'slideDown',\n\t\t\tonSelect: function(selectedDate){\n\t\t\tvar option = this.id == \"ct_date_range_from\" ? \"minDate\" : \"maxDate\",\n\t\t\t\tinstance = jQuery( this ).data( \"datepicker\" ),\n\t\t\t\tdate = jQuery.datepicker.parseDate(\n\t\t\t\t\tinstance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat,\n\t\t\t\t\tselectedDate, instance.settings);\n\t\t\t\tdates.not(this).datepicker(\"option\", option, date);\n\t\t\t}\n\t\t}\n\t);\n\t\n\t// Check users\n\tjQuery(\"#ct_check_spam_button\").click(function(){\n\t\tdocument.cookie = 'ct_paused_users_check=0; path=/';\n\t\tct_start_check(false);\n\t});\n\tjQuery(\"#ct_proceed_check_button\").click(function(){\n\t\tct_start_check(true);\n\t});\n\t\n\t// Pause the check\n\tjQuery('#ct_pause').on('click', function(){\n\t\tct_pause = true;\n\t\tvar ct_check = {\n\t\t\t'accurate': ct_accurate_check,\n\t\t\t'from' : ct_date_from,\n\t\t\t'till' : ct_date_till\n\t\t};\n\t\tdocument.cookie = 'ct_paused_users_check=' + JSON.stringify(ct_check) + '; path=/';\n\t});\n\t\t\n\t//Approve button\n\tjQuery(\".cleantalk_delete_from_list_button\").click(function(){\n\t\tct_id = jQuery(this).attr(\"data-id\");\n\t\t\n\t\t// Approving\n\t\tvar data = {\n\t\t\t'action': 'ajax_ct_approve_user',\n\t\t\t'security': ct_ajax_nonce,\n\t\t\t'id': ct_id\n\t\t};\n\t\tjQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: ajaxurl,\n\t\t\tdata: data,\n\t\t\tsuccess: function(msg){\n\t\t\t\tjQuery(\"#comment-\"+ct_id).fadeOut('slow', function(){\n\t\t\t\t\tjQuery(\"#comment-\"+ct_id).remove();\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t\t\n\t\t// Positive feedback\n\t\tvar data = {\n\t\t\t'action': 'ct_feedback_user',\n\t\t\t'security': ct_ajax_nonce,\n\t\t\t'user_id': ct_id,\n\t\t\t'status': 'approve'\n\t\t};\n\t\tjQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: ajaxurl,\n\t\t\tdata: data,\n\t\t\tsuccess: function(msg){\n\t\t\t\tif(msg == 1){\n\t\t\t\t\t// Success\n\t\t\t\t}\n\t\t\t\tif(msg == 0){\n\t\t\t\t\t// Error occurred\n\t\t\t\t}\n\t\t\t\tif(msg == 'no_hash'){\n\t\t\t\t\t// No hash\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\n\t\t\t},\n\t\t\ttimeout: 5000\n\t\t});\n\t\t\n\t});\n\t\n\t// Request to Download CSV file.\n\tjQuery(\".ct_get_csv_file\").click(function( e ){\n\t\tvar data = {\n\t\t\t'action': 'ajax_ct_get_csv_file',\n\t\t\t'security': ct_ajax_nonce,\n\t\t\t'filename': ctUsersCheck.ct_csv_filename\n\t\t};\n\t\tjQuery('.' + e.target.id).addClass('disabled');\n\t\tjQuery('.spinner').css('visibility', 'visible');\n\t\tjQuery.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: ajaxurl,\n\t\t\tdata: data,\n\t\t\tsuccess: function(msg){\n\t\t\t\tif( parseInt(msg) === 0 ) {\n\t\t\t\t\talert(ctUsersCheck.ct_bad_csv);\n\t\t\t\t} else {\n\t\t\t\t\tvar url = URL.createObjectURL(new Blob([msg]));\n\n\t\t\t\t\tvar dummy = document.createElement('a');\n\t\t\t\t\tdummy.href = url;\n\t\t\t\t\tdummy.download = ctUsersCheck.ct_csv_filename + '.csv';\n\n\t\t\t\t\tdocument.body.appendChild(dummy);\n\t\t\t\t\tdummy.click();\n\t\t\t\t}\n\t\t\t\tjQuery('.' + e.target.id).removeClass('disabled');\n\t\t\t\tjQuery('.spinner').css('visibility', 'hidden');\n\t\t\t}\n\t\t});\n\t});\n\n\t// Delete all spam users\n\tjQuery(\".ct_delete_all_users\").click(function( e ){\n\n\t\tif ( ! confirm( ctUsersCheck.ct_confirm_deletion_all ) )\n\t\t\treturn false;\n\n\t\tvar data = {\n\t\t\t'action': 'ajax_delete_all_users',\n\t\t\t'security': ct_ajax_nonce\n\t\t};\n\n\t\tct_delete_all_users( e );\n\n\t});\n\n});"]}
1
+ {"version":3,"sources":["cleantalk-users-checkspam.js"],"names":["String","prototype","printf","formatted","this","arg","arguments","before_formatted","substring","indexOf","after_formatted","length","ct_working","document","cookie","ct_new_check","ct_cooling_down_flag","ct_close_animate","ct_accurate_check","ct_pause","ct_prev_accurate","ctUsersCheck","ct_prev_from","ct_prev_till","ct_cool_down_time","ct_requests_counter","ct_max_requests","ct_ajax_nonce","ct_users_total","ct_users_checked","ct_users_spam","ct_users_bad","ct_unchecked","ct_date_from","ct_date_till","apbct_cookie__get","names","prefixes","split","forEach","item","i","arr","curr","trim","name","all","prefix","apbct_get_cookie","animate_comment","to","id","jQuery","fadeTo","ct_clear_users","from","till","is","val","data","action","security","ajax","type","url","ajaxurl","success","msg","ct_show_users_info","ct_send_users","ct_cooling_down_toggle","setTimeout","check_amount","new_check","unchecked","amount","parseJSON","parseInt","error","confirm","error_message","new_href","location","href","end","hide","checked","spam","bad","status_string","ct_status_string","ct_status_string_warning","html","jqXHR","textStatus","errorThrown","show","timeout","message","ct_toggle_depended","obj","secondary","depended","prop","removeProp","ct_start_check","continue_check","alert","ct_delete_all_users","e","target","addClass","css","removeClass","ready","state","on","datepicker","setDefaults","regional","dates","dateFormat","maxDate","changeMonth","changeYear","showAnim","onSelect","selectedDate","option","instance","date","parseDate","settings","_defaults","not","click","ct_check","accurate","JSON","stringify","ct_id","attr","fadeOut","remove","user_id","status","filename","ct_csv_filename","ct_bad_csv","URL","createObjectURL","Blob","dummy","createElement","download","body","appendChild","ct_confirm_deletion_all"],"mappings":"AACAA,OAAOC,UAAUC,OAAS,WACtB,IAAIC,EAAYC,KAChB,IAAK,IAAIC,KAAOC,UAAY,CAC9B,IAAIC,EAAmBJ,EAAUK,UAAU,EA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AAO,EAORjD,oBAAqBC","file":"cleantalk-users-checkspam.min.js","sourcesContent":["// Printf for JS\r\nString.prototype.printf = function(){\r\n var formatted = this;\r\n for( var arg in arguments ) {\r\n\t\tvar before_formatted = formatted.substring(0, formatted.indexOf(\"%s\", 0));\r\n\t\tvar after_formatted = formatted.substring(formatted.indexOf(\"%s\", 0)+2, formatted.length);\r\n\t\tformatted = before_formatted + arguments[arg] + after_formatted;\r\n }\r\n return formatted;\r\n};\r\n\r\n// Set deafult amount to check by request.\r\ndocument.cookie = \"ct_check_users__amount=\" + 100 + \"; path=/\";\r\n\r\n// Flags\r\nvar ct_working = false,\r\n\tct_new_check = true,\r\n\tct_cooling_down_flag = false,\r\n\tct_close_animate = true,\r\n\tct_accurate_check = false,\r\n\tct_pause = false,\r\n\tct_prev_accurate = ctUsersCheck.ct_prev_accurate,\r\n\tct_prev_from = ctUsersCheck.ct_prev_from,\t\r\n\tct_prev_till = ctUsersCheck.ct_prev_till;\r\n// Settings\r\nvar ct_cool_down_time = 90000,\r\n\tct_requests_counter = 0,\r\n\tct_max_requests = 60;\r\n// Variables\r\nvar ct_ajax_nonce = ctUsersCheck.ct_ajax_nonce,\r\n\tct_users_total = 0,\r\n\tct_users_checked = 0,\r\n\tct_users_spam = 0,\r\n\tct_users_bad = 0,\r\n\tct_unchecked = 'unset',\r\n\tct_date_from = 0,\r\n\tct_date_till = 0;\r\n\r\n/* Function: Reuturns cookie with prefix */\r\nfunction apbct_cookie__get(names, prefixes){\r\n\tvar cookie = {};\r\n\tnames = names || null;\r\n\tif(typeof names == 'string') names = names.split();\r\n\tprefixes = prefixes || ['apbct_', 'ct_'];\r\n\tif(prefixes === 'none') prefixes = null;\r\n\tif(typeof prefixes == 'string') prefixes = prefixes.split();\r\n\tdocument.cookie.split(';').forEach(function(item, i, arr){\r\n\t\tvar curr = item.trim().split('=');\r\n\t\t// Detect by full cookie name\r\n\t\tif(names){\r\n\t\t\tnames.forEach(function(name, i, all){\r\n\t\t\t\tif(curr[0] === name)\r\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\r\n\t\t\t});\r\n\t\t}\r\n\t\t// Detect by name prefix\r\n\t\tif(prefixes){\r\n\t\t\tprefixes.forEach(function(prefix, i, all){\r\n\t\t\t\tif(curr[0].indexOf(prefix) === 0)\r\n\t\t\t\t\tcookie[curr[0]] = (curr[1]);\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\treturn cookie;\r\n}\r\n\r\nfunction apbct_get_cookie( name ){\r\n\tvar cookie = apbct_cookie__get( name, name );\r\n\tif(typeof cookie === 'object' && typeof cookie[name] != 'undefined'){\r\n\t\treturn cookie[name];\r\n\t}else\r\n\t\treturn null;\r\n}\r\n\r\nfunction animate_comment(to,id){\r\n\tif(ct_close_animate){\r\n\t\tif(to === 0.3){\r\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\r\n\t\t\t\tanimate_comment(1,id)\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tjQuery('#comment-'+id).fadeTo(200,to,function(){\r\n\t\t\t\tanimate_comment(0.3,id)\r\n\t\t\t});\r\n\t\t}\r\n\t}else{\r\n\t\tct_close_animate=true;\r\n\t}\r\n}\r\n\r\nfunction ct_clear_users(){\r\n\r\n\tvar from = 0, till = 0;\r\n\tif(jQuery('#ct_allow_date_range').is(':checked')) {\r\n\t\tfrom = jQuery('#ct_date_range_from').val();\r\n\t\ttill = jQuery('#ct_date_range_till').val();\r\n\t}\r\n\tvar data = {\r\n\t\t'action' : 'ajax_clear_users',\r\n\t\t'security' : ct_ajax_nonce,\r\n\t\t'from' : from,\r\n\t\t'till' : till\r\n\t};\r\n\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function(msg){\r\n\t\t\tct_show_users_info();\r\n\t\t\tct_send_users();\r\n\t\t}\r\n\t});\r\n\r\n}\r\n\r\n//Continues the check after cooldown time\r\n//Called by ct_send_users();\r\nfunction ct_cooling_down_toggle(){\r\n\tct_cooling_down_flag = false;\r\n\tct_send_users();\r\n\tct_show_users_info();\r\n}\r\n\r\nfunction ct_send_users(){\r\n\t\r\n\tif(ct_cooling_down_flag === true)\r\n\t\treturn;\r\n\t\r\n\tif(ct_requests_counter >= ct_max_requests){\r\n\t\tsetTimeout(ct_cooling_down_toggle, ct_cool_down_time);\r\n\t\tct_requests_counter = 0;\r\n\t\tct_cooling_down_flag = true;\r\n\t\treturn;\r\n\t}else{\r\n\t\tct_requests_counter++;\r\n\t}\r\n\r\n\tvar check_amount = apbct_get_cookie('ct_check_users__amount');\r\n\r\n\tvar data = {\r\n\t\taction: 'ajax_check_users',\r\n\t\tsecurity: ct_ajax_nonce,\r\n\t\tnew_check: ct_new_check,\r\n\t\tunchecked: ct_unchecked,\r\n\t\tamount: check_amount\r\n\t};\r\n\t\r\n\tif(ct_accurate_check)\r\n\t\tdata['accurate_check'] = true;\r\n\t\r\n\tif(ct_date_from && ct_date_till){\r\n\t\tdata['from'] = ct_date_from;\r\n\t\tdata['till'] = ct_date_till;\r\n\t}\r\n\t\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function(msg){\r\n\t\t\t\r\n\t\t\tmsg = jQuery.parseJSON(msg);\r\n\t\t\t\r\n\t\t\tif(parseInt(msg.error)){\r\n\t\t\t\tct_working=false;\r\n\t\t\t\tif(!confirm(msg.error_message+\". Do you want to proceed?\")){\r\n\t\t\t\t\tvar new_href = 'users.php?page=ct_check_users';\r\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\r\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\r\n\t\t\t\t\tlocation.href = new_href;\r\n\t\t\t\t}else\r\n\t\t\t\t\tct_send_users();\r\n\t\t\t}else{\r\n\t\t\t\tct_new_check = false;\r\n\t\t\t\tif(parseInt(msg.end) == 1 || ct_pause == true){\r\n\t\t\t\t\tif(parseInt(msg.end) == 1)\r\n\t\t\t\t\t\tdocument.cookie = 'ct_paused_users_check=0; path=/';\r\n\t\t\t\t\tct_working=false;\r\n\t\t\t\t\tjQuery('#ct_working_message').hide();\r\n\t\t\t\t\tvar new_href = 'users.php?page=ct_check_users&ct_worked=1';\r\n\t\t\t\t\tif(ct_date_from != 0 && ct_date_till != 0)\r\n\t\t\t\t\t\tnew_href+='&from='+ct_date_from+'&till='+ct_date_till;\r\n\t\t\t\t\tlocation.href = new_href;\r\n\t\t\t\t}else if(parseInt(msg.end) == 0){\r\n\t\t\t\t\tct_users_checked += msg.checked;\r\n\t\t\t\t\tct_users_spam += msg.spam;\r\n\t\t\t\t\tct_users_bad += msg.bad;\r\n\t\t\t\t\tct_unchecked = ct_users_total - ct_users_checked - ct_users_bad;\r\n\t\t\t\t\tvar status_string = String(ctUsersCheck.ct_status_string);\r\n\t\t\t\t\tvar status_string = status_string.printf(ct_users_checked, ct_users_spam, ct_users_bad);\r\n\t\t\t\t\tif(parseInt(ct_users_spam) > 0)\r\n\t\t\t\t\t\tstatus_string += ctUsersCheck.ct_status_string_warning;\r\n\t\t\t\t\tjQuery('#ct_checking_status').html(status_string);\r\n\t\t\t\t\tjQuery('#ct_error_message').hide();\r\n\t\t\t\t\tct_send_users();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n error: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\tif(check_amount > 20){\r\n\t\t\t\tcheck_amount -= 20;\r\n\t\t\t\tdocument.cookie = \"ct_check_users__amount=\" + check_amount + \"; path=/\";\r\n\t\t\t}\r\n\t\t\tjQuery('#ct_error_message').show();\r\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\r\n\t\t\tjQuery('#cleantalk_js_func').html('Check users');\r\n\t\t\tsetTimeout(ct_send_users(), 3000);\r\n },\r\n timeout: 25000\r\n\t});\r\n}\r\nfunction ct_show_users_info(){\r\n\t\r\n\tif( ct_working ){\r\n\t\t\r\n\t\tif(ct_cooling_down_flag == true){\r\n\t\t\tjQuery('#ct_cooling_notice').html('Waiting for API to cool down. (About a minute)');\r\n\t\t\tjQuery('#ct_cooling_notice').show();\r\n\t\t\treturn;\t\t\t\r\n\t\t}else{\r\n\t\t\tjQuery('#ct_cooling_notice').hide();\r\n\t\t}\r\n\t\t\r\n\t\tif( ! ct_users_total ){\r\n\t\t\t\r\n\t\t\tvar data = {\r\n\t\t\t\t'action': 'ajax_info_users',\r\n\t\t\t\t'security': ct_ajax_nonce\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif( ct_date_from && ct_date_till ){\r\n\t\t\t\tdata['from'] = ct_date_from;\r\n\t\t\t\tdata['till'] = ct_date_till;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tjQuery.ajax({\r\n\t\t\t\ttype: \"POST\",\r\n\t\t\t\turl: ajaxurl,\r\n\t\t\t\tdata: data,\r\n\t\t\t\tsuccess: function(msg){\r\n\t\t\t\t\tmsg = jQuery.parseJSON(msg);\r\n\t\t\t\t\tjQuery('#ct_checking_status').html(msg.message);\r\n\t\t\t\t\tct_users_spam = msg.spam;\r\n\t\t\t\t\tct_users_checked = msg.checked;\r\n\t\t\t\t\tct_users_bad = msg.bad;\r\n\t\t\t\t},\r\n\t\t\t\terror: function (jqXHR, textStatus, errorThrown){\r\n\t\t\t\t\tjQuery('#ct_error_message').show();\r\n\t\t\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\r\n\t\t\t\t\tjQuery('#cleantalk_js_func').html('Show users');\r\n\t\t\t\t\tsetTimeout(ct_show_users_info(), 3000);\r\n\t\t\t\t},\r\n\t\t\t\ttimeout: 15000\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n// Function to toggle dependences\r\nfunction ct_toggle_depended(obj, secondary){\r\n\r\n secondary = secondary || null;\r\n\r\n\tvar depended = jQuery(obj.data('depended')),\r\n\t\tstate = obj.data('state');\r\n\t\t\r\n\tif(!state && !secondary){\r\n\t\tobj.data('state', true);\r\n\t\tdepended.removeProp('disabled');\r\n\t}else{\r\n\t\tobj.data('state', false);\r\n\t\tdepended.prop('disabled', true);\r\n\t\tdepended.removeProp('checked');\r\n\t\tif(depended.data('depended'))\r\n\t\t\tct_toggle_depended(depended, true);\r\n\t}\r\n}\r\n\r\n// Main function of checking\r\nfunction ct_start_check( continue_check ){\r\n\r\n\tcontinue_check = continue_check || null;\r\n\r\n\tif(jQuery('#ct_allow_date_range').is(':checked')){\r\n\r\n\t\tct_date_from = jQuery('#ct_date_range_from').val();\r\n\t\tct_date_till = jQuery('#ct_date_range_till').val();\r\n\r\n\t\tif(!(ct_date_from !== '' && ct_date_till !== '')){\r\n\t\t\talert('Please, specify a date range.');\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tif(jQuery('#ct_accurate_check').is(':checked')){\r\n\t\tct_accurate_check = true;\r\n\t}\r\n\r\n\tjQuery('.ct_to_hide').hide();\r\n\tjQuery('#ct_working_message').show();\r\n\tjQuery('#ct_preloader').show();\r\n\tjQuery('#ct_pause').show();\r\n\r\n\tct_working = true;\r\n\r\n\tif( continue_check ){\r\n\t\tct_show_users_info();\r\n\t\tct_send_users();\r\n\t} else {\r\n\t\tct_clear_users();\r\n\t}\r\n\r\n}\r\n\r\nfunction ct_delete_all_users( e ){\r\n\r\n\tjQuery('.' + e.target.id).addClass('disabled');\r\n\tjQuery('.spinner').css('visibility', 'visible');\r\n\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ajaxurl,\r\n\t\tdata: data,\r\n\t\tsuccess: function( msg ){\r\n\t\t\tif( msg > 0 ){\r\n\t\t\t\tjQuery('#cleantalk_users_left').html(msg);\r\n\t\t\t\tct_delete_all_users( e );\r\n\t\t\t}else{\r\n\t\t\t\tjQuery('.' + e.target.id).removeClass('disabled');\r\n\t\t\t\tjQuery('.spinner').css('visibility', 'hidden');\r\n\t\t\t\tlocation.href='users.php?page=ct_check_users_total';\r\n\t\t\t}\r\n\t\t},\r\n\t\terror: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\tjQuery('#ct_error_message').show();\r\n\t\t\tjQuery('#cleantalk_ajax_error').html(textStatus);\r\n\t\t\tjQuery('#cleantalk_js_func').html('All users deleteion');\r\n\t\t\tsetTimeout(ct_delete_all_users( e ), 3000);\r\n\t\t},\r\n\t\ttimeout: 25000\r\n\t});\r\n}\r\n\r\njQuery(document).ready(function(){\r\n\r\n\t// Setting dependences\r\n\t// jQuery('#ct_accurate_check') .data({'depended': '#ct_allow_date_range', 'state': false});\r\n\tjQuery('#ct_allow_date_range').data({'depended': '.ct_date', 'state': false});\r\n\t\r\n\t// Prev check parameters\r\n\tif(ct_prev_accurate){\r\n\t\tjQuery(\"#ct_accurate_check\").prop('checked', true);\r\n\t}\r\n\tif(ct_prev_from){\r\n\t\tjQuery(\"#ct_allow_date_range\").prop('checked', true).data('state', true);\r\n\t\tjQuery(\"#ct_date_range_from\").removeProp('disabled').val(ct_prev_from);\r\n\t\tjQuery(\"#ct_date_range_till\").removeProp('disabled').val(ct_prev_till);\r\n\t}\r\n\t\r\n\t// Toggle dependences\r\n\tjQuery(\"#ct_allow_date_range, #ct_accurate_check\").on('change', function(){\r\n\t\tct_toggle_depended(jQuery(this));\r\n\t});\r\n\r\n\tjQuery.datepicker.setDefaults(jQuery.datepicker.regional['en']);\r\n\tvar dates = jQuery('#ct_date_range_from, #ct_date_range_till').datepicker(\r\n\t\t{\r\n\t\t\tdateFormat: 'M d yy',\r\n\t\t\tmaxDate:\"+0D\",\r\n\t\t\tchangeMonth:true,\r\n\t\t\tchangeYear:true,\r\n\t\t\tshowAnim: 'slideDown',\r\n\t\t\tonSelect: function(selectedDate){\r\n\t\t\tvar option = this.id == \"ct_date_range_from\" ? \"minDate\" : \"maxDate\",\r\n\t\t\t\tinstance = jQuery( this ).data( \"datepicker\" ),\r\n\t\t\t\tdate = jQuery.datepicker.parseDate(\r\n\t\t\t\t\tinstance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat,\r\n\t\t\t\t\tselectedDate, instance.settings);\r\n\t\t\t\tdates.not(this).datepicker(\"option\", option, date);\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\t\r\n\t// Check users\r\n\tjQuery(\"#ct_check_spam_button\").click(function(){\r\n\t\tdocument.cookie = 'ct_paused_users_check=0; path=/';\r\n\t\tct_start_check(false);\r\n\t});\r\n\tjQuery(\"#ct_proceed_check_button\").click(function(){\r\n\t\tct_start_check(true);\r\n\t});\r\n\t\r\n\t// Pause the check\r\n\tjQuery('#ct_pause').on('click', function(){\r\n\t\tct_pause = true;\r\n\t\tvar ct_check = {\r\n\t\t\t'accurate': ct_accurate_check,\r\n\t\t\t'from' : ct_date_from,\r\n\t\t\t'till' : ct_date_till\r\n\t\t};\r\n\t\tdocument.cookie = 'ct_paused_users_check=' + JSON.stringify(ct_check) + '; path=/';\r\n\t});\r\n\t\t\r\n\t//Approve button\r\n\tjQuery(\".cleantalk_delete_from_list_button\").click(function(){\r\n\t\tct_id = jQuery(this).attr(\"data-id\");\r\n\t\t\r\n\t\t// Approving\r\n\t\tvar data = {\r\n\t\t\t'action': 'ajax_ct_approve_user',\r\n\t\t\t'security': ct_ajax_nonce,\r\n\t\t\t'id': ct_id\r\n\t\t};\r\n\t\tjQuery.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: ajaxurl,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: function(msg){\r\n\t\t\t\tjQuery(\"#comment-\"+ct_id).fadeOut('slow', function(){\r\n\t\t\t\t\tjQuery(\"#comment-\"+ct_id).remove();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t});\r\n\t\t\r\n\t\t// Positive feedback\r\n\t\tvar data = {\r\n\t\t\t'action': 'ct_feedback_user',\r\n\t\t\t'security': ct_ajax_nonce,\r\n\t\t\t'user_id': ct_id,\r\n\t\t\t'status': 'approve'\r\n\t\t};\r\n\t\tjQuery.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: ajaxurl,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: function(msg){\r\n\t\t\t\tif(msg == 1){\r\n\t\t\t\t\t// Success\r\n\t\t\t\t}\r\n\t\t\t\tif(msg == 0){\r\n\t\t\t\t\t// Error occurred\r\n\t\t\t\t}\r\n\t\t\t\tif(msg == 'no_hash'){\r\n\t\t\t\t\t// No hash\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\ttimeout: 5000\r\n\t\t});\r\n\t\t\r\n\t});\r\n\t\r\n\t// Request to Download CSV file.\r\n\tjQuery(\".ct_get_csv_file\").click(function( e ){\r\n\t\tvar data = {\r\n\t\t\t'action': 'ajax_ct_get_csv_file',\r\n\t\t\t'security': ct_ajax_nonce,\r\n\t\t\t'filename': ctUsersCheck.ct_csv_filename\r\n\t\t};\r\n\t\tjQuery('.' + e.target.id).addClass('disabled');\r\n\t\tjQuery('.spinner').css('visibility', 'visible');\r\n\t\tjQuery.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: ajaxurl,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: function(msg){\r\n\t\t\t\tif( parseInt(msg) === 0 ) {\r\n\t\t\t\t\talert(ctUsersCheck.ct_bad_csv);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar url = URL.createObjectURL(new Blob([msg]));\r\n\r\n\t\t\t\t\tvar dummy = document.createElement('a');\r\n\t\t\t\t\tdummy.href = url;\r\n\t\t\t\t\tdummy.download = ctUsersCheck.ct_csv_filename + '.csv';\r\n\r\n\t\t\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\t\t\tdummy.click();\r\n\t\t\t\t}\r\n\t\t\t\tjQuery('.' + e.target.id).removeClass('disabled');\r\n\t\t\t\tjQuery('.spinner').css('visibility', 'hidden');\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\t// Delete all spam users\r\n\tjQuery(\".ct_delete_all_users\").click(function( e ){\r\n\r\n\t\tif ( ! confirm( ctUsersCheck.ct_confirm_deletion_all ) )\r\n\t\t\treturn false;\r\n\r\n\t\tvar data = {\r\n\t\t\t'action': 'ajax_delete_all_users',\r\n\t\t\t'security': ct_ajax_nonce\r\n\t\t};\r\n\r\n\t\tct_delete_all_users( e );\r\n\r\n\t});\r\n\r\n});"]}
js/cleantalk-users-editscreen.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk-users-editscreen.js"],"names":["ct_is_email","str","search","ct_is_ip","jQuery","document","ready","parseInt","ctUsersScreen","ct_show_check_links","each","ct_curr_str","this","html","after","ct_img_src_new_tab"],"mappings":"AAAA,SAASA,YAAYC,GACpB,OAAOA,EAAIC,OAAO,aAEnB,SAASC,SAASF,GACjB,OAAOA,EAAIC,OAAO,wCAGnBE,OAAOC,UAAUC,MAAM,WAGnBC,SAASC,cAAcC,sBACzBL,OAAO,mBAAmBM,KAAK,WAC9B,IAAIC,EAAcP,OAAOQ,MAAMC,QACC,GAA7Bb,YAAYW,IACdP,OAAOQ,MAAME,MAAM,mDAAmDH,EAAY,6DAA6DA,EAAY,uCAAuCH,cAAcO,mBAAmB","file":"cleantalk-users-editscreen.min.js","sourcesContent":["function ct_is_email(str){\n\treturn str.search(/.*@.*\\..*/);\n}\nfunction ct_is_ip(str){\n\treturn str.search(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/);\n}\n\njQuery(document).ready(function(){\n\n\t/* Shows link to blacklists near every email and IP address */\n\tif(parseInt(ctUsersScreen.ct_show_check_links))\n\t\tjQuery('.column-email a').each(function(){\n\t\t\tvar ct_curr_str = jQuery(this).html();\n\t\t\tif(ct_is_email(ct_curr_str) != -1){\n\t\t\t\tjQuery(this).after('&nbsp;<a href=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" target=\"_blank\" title=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" class=\"ct_link_new_tab\"><img src=\"'+ctUsersScreen.ct_img_src_new_tab+'\"></a>');\n\t\t\t}\n\t\t});\n});"]}
1
+ {"version":3,"sources":["cleantalk-users-editscreen.js"],"names":["ct_is_email","str","search","ct_is_ip","jQuery","document","ready","parseInt","ctUsersScreen","ct_show_check_links","each","ct_curr_str","this","html","after","ct_img_src_new_tab"],"mappings":"AAAA,SAASA,YAAYC,GACpB,OAAOA,EAAIC,OAAO,aAEnB,SAASC,SAASF,GACjB,OAAOA,EAAIC,OAAO,wCAGnBE,OAAOC,UAAUC,MAAM,WAGnBC,SAASC,cAAcC,sBACzBL,OAAO,mBAAmBM,KAAK,WAC9B,IAAIC,EAAcP,OAAOQ,MAAMC,QACC,GAA7Bb,YAAYW,IACdP,OAAOQ,MAAME,MAAM,mDAAmDH,EAAY,6DAA6DA,EAAY,uCAAuCH,cAAcO,mBAAmB","file":"cleantalk-users-editscreen.min.js","sourcesContent":["function ct_is_email(str){\r\n\treturn str.search(/.*@.*\\..*/);\r\n}\r\nfunction ct_is_ip(str){\r\n\treturn str.search(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/);\r\n}\r\n\r\njQuery(document).ready(function(){\r\n\r\n\t/* Shows link to blacklists near every email and IP address */\r\n\tif(parseInt(ctUsersScreen.ct_show_check_links))\r\n\t\tjQuery('.column-email a').each(function(){\r\n\t\t\tvar ct_curr_str = jQuery(this).html();\r\n\t\t\tif(ct_is_email(ct_curr_str) != -1){\r\n\t\t\t\tjQuery(this).after('&nbsp;<a href=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" target=\"_blank\" title=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" class=\"ct_link_new_tab\"><img src=\"'+ctUsersScreen.ct_img_src_new_tab+'\"></a>');\r\n\t\t\t}\r\n\t\t});\r\n});"]}
js/cleantalk_external.min.js CHANGED
@@ -1,2 +1 @@
1
- function ct_protect_external(){for(var t=0;t<document.forms.length;t++)if(null==document.forms[t].cleantalk_hidden_action&&null==document.forms[t].cleantalk_hidden_method&&"string"==typeof document.forms[t].action){var e=document.forms[t].action;if(-1!==e.indexOf("http://")||-1!==e.indexOf("https://")){var n=e.split("//");if((n=n[1].split("/"))[0].toLowerCase()!==location.hostname.toLowerCase()){var o=document.createElement("input");o.name="cleantalk_hidden_action",o.value=e,o.type="hidden",document.forms[t].appendChild(o);var d=document.createElement("input");d.name="cleantalk_hidden_method",d.value=document.forms[t].method,d.type="hidden",document.forms[t].method="POST",document.forms[t].appendChild(d),document.forms[t].action=document.location}}}}window.onload=function(){setTimeout(function(){ct_protect_external()},1500)};
2
- //# sourceMappingURL=cleantalk_external.min.js.map
1
+ function ct_protect_external(){for(var t=0;t<document.forms.length;t++)if(null==document.forms[t].cleantalk_hidden_action&&null==document.forms[t].cleantalk_hidden_method&&"string"==typeof document.forms[t].action){var e=document.forms[t].action;if(-1!==e.indexOf("http://")||-1!==e.indexOf("https://")){var n=e.split("//");if((n=n[1].split("/"))[0].toLowerCase()!==location.hostname.toLowerCase()){var o=document.createElement("input");o.name="cleantalk_hidden_action",o.value=e,o.type="hidden",document.forms[t].appendChild(o);var d=document.createElement("input");d.name="cleantalk_hidden_method",d.value=document.forms[t].method,d.type="hidden",document.forms[t].method="POST",document.forms[t].appendChild(d),document.forms[t].action=document.location}}}}window.onload=function(){setTimeout(function(){ct_protect_external()},1500)};
 
js/cleantalk_external.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk_external.js"],"names":["ct_protect_external","i","document","forms","length","undefined","cleantalk_hidden_action","cleantalk_hidden_method","action","indexOf","tmp","split","toLowerCase","location","hostname","ct_action","createElement","name","value","type","appendChild","ct_method","method","window","onload","setTimeout"],"mappings":"AAAA,SAASA,sBAER,IAAI,IAAIC,EAAI,EAAGA,EAAIC,SAASC,MAAMC,OAAQH,IACzC,GAAiDI,MAA7CH,SAASC,MAAMF,GAAGK,yBAAqFD,MAA7CH,SAASC,MAAMF,GAAGM,yBACxC,iBAA7BL,SAASC,MAAMF,GAAS,OAAc,CAE/C,IAAIO,EAASN,SAASC,MAAMF,GAAGO,OAE/B,IAAkC,IAA/BA,EAAOC,QAAQ,aAAqD,IAAhCD,EAAOC,QAAQ,YAAmB,CAExE,IAAIC,EAAMF,EAAOG,MAAM,MAIvB,IAHAD,EAAMA,EAAI,GAAGC,MAAM,MACJ,GAAGC,gBAENC,SAASC,SAASF,cAAc,CAE5B,IAAIG,EAAYb,SAASc,cAAc,SACvCD,EAAUE,KAAO,0BAChCF,EAAUG,MAAQV,EAClBO,EAAUI,KAAO,SACjBjB,SAASC,MAAMF,GAAGmB,YAAYL,GAEf,IAAIM,EAAYnB,SAASc,cAAc,SACvCK,EAAUJ,KAAO,0BAChCI,EAAUH,MAAQhB,SAASC,MAAMF,GAAGqB,OACpCD,EAAUF,KAAO,SAEjBjB,SAASC,MAAMF,GAAGqB,OAAS,OAC3BpB,SAASC,MAAMF,GAAGmB,YAAYC,GAE9BnB,SAASC,MAAMF,GAAGO,OAASN,SAASW,YAQ1CU,OAAOC,OAAS,WACZC,WAAW,WACPzB,uBACD","file":"cleantalk_external.min.js","sourcesContent":["function ct_protect_external(){\n\t\t\t\n\tfor(var i = 0; i < document.forms.length; i++){\n\t\tif (document.forms[i].cleantalk_hidden_action == undefined && document.forms[i].cleantalk_hidden_method == undefined) {\n\t\t\tif(typeof(document.forms[i].action) == 'string'){\n\t\t\t\t\n\t\t\t\tvar action = document.forms[i].action;\n\n\t\t\t\tif(action.indexOf('http://') !== -1 || action.indexOf('https://') !== -1){\n\t\t\t\t\t\n\t\t\t\t\tvar tmp = action.split('//');\n\t\t\t\t\ttmp = tmp[1].split('/');\n\t\t\t\t\tvar host = tmp[0].toLowerCase();\n\n\t\t\t\t\tif(host !== location.hostname.toLowerCase()){\n\n\t var ct_action = document.createElement(\"input\");\n\t ct_action.name = 'cleantalk_hidden_action';\n\t\t\t\t\t\tct_action.value = action;\n\t\t\t\t\t\tct_action.type = 'hidden';\n\t\t\t\t\t\tdocument.forms[i].appendChild(ct_action);\n\n\t var ct_method = document.createElement(\"input\");\n\t ct_method.name = 'cleantalk_hidden_method';\n\t\t\t\t\t\tct_method.value = document.forms[i].method;\n\t\t\t\t\t\tct_method.type = 'hidden';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdocument.forms[i].method = 'POST';\n\t\t\t\t\t\tdocument.forms[i].appendChild(ct_method);\n\t\t\t\t\t\t\n\t\t\t\t\t\tdocument.forms[i].action = document.location;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nwindow.onload = function () {\n setTimeout(function () {\n ct_protect_external()\n }, 1500);\n};"]}
1
+ {"version":3,"sources":["cleantalk_external.js"],"names":["ct_protect_external","i","document","forms","length","undefined","cleantalk_hidden_action","cleantalk_hidden_method","action","indexOf","tmp","split","toLowerCase","location","hostname","ct_action","createElement","name","value","type","appendChild","ct_method","method","window","onload","setTimeout"],"mappings":"AAAA,SAASA,sBAER,IAAI,IAAIC,EAAI,EAAGA,EAAIC,SAASC,MAAMC,OAAQH,IACzC,GAAiDI,MAA7CH,SAASC,MAAMF,GAAGK,yBAAqFD,MAA7CH,SAASC,MAAMF,GAAGM,yBACxC,iBAA7BL,SAASC,MAAMF,GAAS,OAAc,CAE/C,IAAIO,EAASN,SAASC,MAAMF,GAAGO,OAE/B,IAAkC,IAA/BA,EAAOC,QAAQ,aAAqD,IAAhCD,EAAOC,QAAQ,YAAmB,CAExE,IAAIC,EAAMF,EAAOG,MAAM,MAIvB,IAHAD,EAAMA,EAAI,GAAGC,MAAM,MACJ,GAAGC,gBAENC,SAASC,SAASF,cAAc,CAE5B,IAAIG,EAAYb,SAASc,cAAc,SACvCD,EAAUE,KAAO,0BAChCF,EAAUG,MAAQV,EAClBO,EAAUI,KAAO,SACjBjB,SAASC,MAAMF,GAAGmB,YAAYL,GAEf,IAAIM,EAAYnB,SAASc,cAAc,SACvCK,EAAUJ,KAAO,0BAChCI,EAAUH,MAAQhB,SAASC,MAAMF,GAAGqB,OACpCD,EAAUF,KAAO,SAEjBjB,SAASC,MAAMF,GAAGqB,OAAS,OAC3BpB,SAASC,MAAMF,GAAGmB,YAAYC,GAE9BnB,SAASC,MAAMF,GAAGO,OAASN,SAASW,YAQ1CU,OAAOC,OAAS,WACZC,WAAW,WACPzB,uBACD"}
js/cleantalk_internal.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk_internal.js"],"names":["ct_check_internal","currForm","ct_data","elems","elements","key","type","undefined","value","name","jQuery","ajax","url","ctNocache","blog_home","datatype","data","success","alert","submit","error","document","ready","ct_currAction","ct_currForm","i","forms","length","action","indexOf","search","ctPrevHandler","click","off","on"],"mappings":"AAAA,SAASA,kBAAkBC,GAGvB,IAAIC,EAAU,GACVC,EAAQF,EAASG,SAErB,IAAK,IAAIC,KAAOF,EACU,UAAnBA,EAAME,GAAKC,MAAwCC,MAApBJ,EAAME,GAAKG,OAA0C,IAApBL,EAAME,GAAKG,QAE9EN,EAAQC,EAAME,GAAKI,MAAQR,EAASG,SAASC,GAAKG,OAEtDN,EAAgB,OAAI,oBAGpBQ,OAAOC,KAAK,CACRL,KAAM,OACNM,IAAKC,UAAUC,UACfC,SAAW,OACXC,KAAMd,EACNe,QAAS,SAASD,GACd,GAAW,QAARA,EAIC,OADAE,MAAMF,IACC,EAHPf,EAASkB,UAMjBC,MAAO,WACHnB,EAASkB,YAKrBT,OAAOW,UAAUC,MAAO,WACpB,IAAIC,EAAgB,GAChBC,EAAc,GACrB,IAAIC,EAAE,EAAEA,EAAEJ,SAASK,MAAMC,OAAOF,IACM,iBAA3BJ,SAASK,MAAMD,GAAS,UAGK,IADtCF,GADSC,EAAcH,SAASK,MAAMD,IACVG,QACXC,QAAQ,aAAoD,GAApCN,EAAcM,QAAQ,cACW,GAA1DN,EAAcO,OAAO,kCAA2F,GAAhDP,EAAcM,QAAQhB,UAAUC,aAC/FiB,cAAgBP,EAAYQ,MAC5BtB,OAAOc,GAAaS,IAAI,MACxBvB,OAAOc,GAAaS,MACpBvB,OAAOc,GAAaU,GAAG,SAAU,WAE7B,OADAlC,kBAAkBwB,IACX","file":"cleantalk_internal.min.js","sourcesContent":["function ct_check_internal(currForm){\n \n//Gathering data\n var ct_data = {},\n elems = currForm.elements;\n\n for (var key in elems) {\n if(elems[key].type == 'submit' || elems[key].value == undefined || elems[key].value == '')\n continue;\n ct_data[elems[key].name] = currForm.elements[key].value;\n }\n ct_data['action'] = 'ct_check_internal';\n\n//AJAX Request\n jQuery.ajax({\n type: 'POST',\n url: ctNocache.blog_home,\n datatype : 'text',\n data: ct_data,\n success: function(data){\n if(data == 'true'){\n currForm.submit();\n }else{\n alert(data);\n return false;\n }\n },\n error: function(){\n currForm.submit();\n }\n }); \n}\n \njQuery(document).ready( function(){\n var ct_currAction = '',\n ct_currForm = '';\n\tfor(i=0;i<document.forms.length;i++){\n\t\tif(typeof(document.forms[i].action)=='string'){\n ct_currForm = document.forms[i];\n\t\t\tct_currAction = ct_currForm.action;\n\t\t\tif(ct_currAction.indexOf('http://')!=-1||ct_currAction.indexOf('https://')!=-1){\n if(ct_currAction.search(/\\/wp-content\\/themes.*\\.php$/) != (-1) && ct_currAction.indexOf(ctNocache.blog_home) != (-1)){\n ctPrevHandler = ct_currForm.click;\n jQuery(ct_currForm).off('**');\n jQuery(ct_currForm).off();\n jQuery(ct_currForm).on('submit', function(){\n ct_check_internal(ct_currForm);\n return false;\n });\n }\n }\n\t\t}\n\t}\n});"]}
1
+ {"version":3,"sources":["cleantalk_internal.js"],"names":["ct_check_internal","currForm","ct_data","elems","elements","key","type","undefined","value","name","jQuery","ajax","url","ctNocache","blog_home","datatype","data","success","alert","submit","error","document","ready","ct_currAction","ct_currForm","i","forms","length","action","indexOf","search","ctPrevHandler","click","off","on"],"mappings":"AAAA,SAASA,kBAAkBC,GAGvB,IAAIC,EAAU,GACVC,EAAQF,EAASG,SAErB,IAAK,IAAIC,KAAOF,EACU,UAAnBA,EAAME,GAAKC,MAAwCC,MAApBJ,EAAME,GAAKG,OAA0C,IAApBL,EAAME,GAAKG,QAE9EN,EAAQC,EAAME,GAAKI,MAAQR,EAASG,SAASC,GAAKG,OAEtDN,EAAgB,OAAI,oBAGpBQ,OAAOC,KAAK,CACRL,KAAM,OACNM,IAAKC,UAAUC,UACfC,SAAW,OACXC,KAAMd,EACNe,QAAS,SAASD,GACd,GAAW,QAARA,EAIC,OADAE,MAAMF,IACC,EAHPf,EAASkB,UAMjBC,MAAO,WACHnB,EAASkB,YAKrBT,OAAOW,UAAUC,MAAO,WACpB,IAAIC,EAAgB,GAChBC,EAAc,GACrB,IAAIC,EAAE,EAAEA,EAAEJ,SAASK,MAAMC,OAAOF,IACM,iBAA3BJ,SAASK,MAAMD,GAAS,UAGK,IADtCF,GADSC,EAAcH,SAASK,MAAMD,IACVG,QACXC,QAAQ,aAAoD,GAApCN,EAAcM,QAAQ,cACW,GAA1DN,EAAcO,OAAO,kCAA2F,GAAhDP,EAAcM,QAAQhB,UAAUC,aAC/FiB,cAAgBP,EAAYQ,MAC5BtB,OAAOc,GAAaS,IAAI,MACxBvB,OAAOc,GAAaS,MACpBvB,OAAOc,GAAaU,GAAG,SAAU,WAE7B,OADAlC,kBAAkBwB,IACX","file":"cleantalk_internal.min.js","sourcesContent":["function ct_check_internal(currForm){\r\n \r\n//Gathering data\r\n var ct_data = {},\r\n elems = currForm.elements;\r\n\r\n for (var key in elems) {\r\n if(elems[key].type == 'submit' || elems[key].value == undefined || elems[key].value == '')\r\n continue;\r\n ct_data[elems[key].name] = currForm.elements[key].value;\r\n }\r\n ct_data['action'] = 'ct_check_internal';\r\n\r\n//AJAX Request\r\n jQuery.ajax({\r\n type: 'POST',\r\n url: ctNocache.blog_home,\r\n datatype : 'text',\r\n data: ct_data,\r\n success: function(data){\r\n if(data == 'true'){\r\n currForm.submit();\r\n }else{\r\n alert(data);\r\n return false;\r\n }\r\n },\r\n error: function(){\r\n currForm.submit();\r\n }\r\n }); \r\n}\r\n \r\njQuery(document).ready( function(){\r\n var ct_currAction = '',\r\n ct_currForm = '';\r\n\tfor(i=0;i<document.forms.length;i++){\r\n\t\tif(typeof(document.forms[i].action)=='string'){\r\n ct_currForm = document.forms[i];\r\n\t\t\tct_currAction = ct_currForm.action;\r\n\t\t\tif(ct_currAction.indexOf('http://')!=-1||ct_currAction.indexOf('https://')!=-1){\r\n if(ct_currAction.search(/\\/wp-content\\/themes.*\\.php$/) != (-1) && ct_currAction.indexOf(ctNocache.blog_home) != (-1)){\r\n ctPrevHandler = ct_currForm.click;\r\n jQuery(ct_currForm).off('**');\r\n jQuery(ct_currForm).off();\r\n jQuery(ct_currForm).on('submit', function(){\r\n ct_check_internal(ct_currForm);\r\n return false;\r\n });\r\n }\r\n }\r\n\t\t}\r\n\t}\r\n});"]}
js/cleantalk_nocache.min.js CHANGED
@@ -1,2 +1,2 @@
1
- function sendRequest(e,t,n){var c=createXMLHTTPObject();if(c){var i=n?"POST":"GET";e="https:"===location.protocol?e.replace("http:","https:"):e.replace("https:","http:"),c.open(i,e,!0),n&&c.setRequestHeader("Content-type","application/x-www-form-urlencoded"),c.onreadystatechange=function(){4==c.readyState&&(200!=c.status&&304!=c.status||t(c))},4!=c.readyState&&c.send(n)}}"undefined"==typeof ctNocache&&(ctNocache.set_cookies_flag=!0,ctNocache.ajaxurl="/wp-admin/admin-ajax.php");var XMLHttpFactories=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];function createXMLHTTPObject(){for(var e=!1,t=0;t<XMLHttpFactories.length;t++){try{e=XMLHttpFactories[t]()}catch(e){continue}break}return e}function ct_getCookie(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}function ct_setCookie(e,t){if(ctNocache.set_cookies_flag){document.cookie=e+" =; expires=Thu, 01 Jan 1970 00:00:01 GMT; path = /",document.cookie=e+" =; expires=Thu, 01 Jan 1970 00:00:01 GMT";var n=new Date;n.setDate(n.getDate()+1),setTimeout(function(){document.cookie=e+"="+t+"; expires="+n.toUTCString()+"; path = /;"},500)}return null}function ct_callback(t){for(ct_cookie=t.responseText.trim(),ct_setCookie("ct_checkjs",ct_cookie),i=0;i<document.forms.length;i++)for(f=document.forms[i],j=0;j<f.elements.length;j++)e=f.elements[j],void 0!==e.name&&-1!=e.name.indexOf("ct_checkjs")&&(e.value=ct_cookie)}if(Date.now||(Date.now=function(){return(new Date).getTime()}),null==ct_nocache_executed){var ct_nocache_executed=!0,checkjs_cookie=ct_getCookie("ct_checkjs");if(null!=checkjs_cookie)for(i=0;i<document.forms.length;i++)for(f=document.forms[i],j=0;j<f.elements.length;j++)e=f.elements[j],void 0!==e.name&&-1!=e.name.indexOf("ct_checkjs")&&(e.value=checkjs_cookie);if(null==checkjs_cookie&&sendRequest(ctNocache.ajaxurl+"?"+Math.random(),ct_callback,"action=ct_get_cookie"),void 0!==ctNocache.info_flag&&ctNocache.info_flag){var cleantalk_user_info={},cleantalk_screen_info={};for(var prop in screen)navigator[prop]instanceof Object||""===screen[prop]||(cleantalk_screen_info[prop]=screen[prop]);cleantalk_user_info.screen=cleantalk_screen_info;for(var prev,cleantalk_plugins=Array(),cnt=0,i=0;i<navigator.plugins.length;i++){var plugin;prev!=(plugin=(plugin=navigator.plugins[i]).name+" "+(plugin.version||""))&&(cleantalk_plugins[cnt]=plugin,cnt++,prev=plugin)}cleantalk_user_info.plugins=cleantalk_plugins,cleantalk_user_info.timezone_offset=-(new Date).getTimezoneOffset()/60,cleantalk_user_info.datetime=Math.round((new Date).getTime()/1e3),cleantalk_user_info.browser_x=document.documentElement.clientWidth,cleantalk_user_info.browser_y=document.documentElement.clientHeight;var ua=navigator.userAgent.toLowerCase(),flashInstalled=0;if(void 0!==navigator.plugins&&"object"==typeof navigator.plugins["Shockwave Flash"])flashInstalled=1;else if(void 0!==window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(flashInstalled=1)}catch(e){}cleantalk_user_info.is_flash=flashInstalled,isVisitedMain=-1,location.href!="http://"+location.hostname+"/"&&location.href!="https://"+location.hostname+"/"||(isVisitedMain=1,setTimeout(function(){document.cookie="ct_visited_main = 1; path = /;"},1500)),ct_visited_main=ct_getCookie("ct_visited_main"),null==ct_visited_main&&-1==isVisitedMain?isVisitedMain=0:isVisitedMain=1,cleantalk_user_info.is_main=isVisitedMain,setTimeout(function(){document.cookie="ct_user_info = "+escape(JSON.stringify(cleantalk_user_info))+"; path = /;"},1500)}}
2
  //# sourceMappingURL=cleantalk_nocache.min.js.map
1
+ function sendRequest(e,t,n){var c=createXMLHTTPObject();if(c){var o=n?"POST":"GET";e="https:"===location.protocol?e.replace("http:","https:"):e.replace("https:","http:"),c.open(o,e,!0),n&&c.setRequestHeader("Content-type","application/x-www-form-urlencoded"),c.onreadystatechange=function(){4==c.readyState&&(200!=c.status&&304!=c.status||t(c))},4!=c.readyState&&c.send(n)}}"undefined"==typeof ctNocache&&(ctNocache.set_cookies_flag=!0,ctNocache.ajaxurl="/wp-admin/admin-ajax.php");var XMLHttpFactories=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];function createXMLHTTPObject(){for(var e=!1,t=0;t<XMLHttpFactories.length;t++){try{e=XMLHttpFactories[t]()}catch(e){continue}break}return e}function ct_getCookie(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}function ct_setCookie(e,t){if(ctNocache.set_cookies_flag){document.cookie=e+" =; expires=Thu, 01 Jan 1970 00:00:01 GMT; path = /",document.cookie=e+" =; expires=Thu, 01 Jan 1970 00:00:01 GMT";var n=new Date;n.setDate(n.getDate()+1),setTimeout(function(){document.cookie=e+"="+t+"; expires="+n.toUTCString()+"; path = /;"},500)}return null}function ct_callback(t){for(ct_cookie=t.responseText.trim(),ct_setCookie("ct_checkjs",ct_cookie),i=0;i<document.forms.length;i++)for(f=document.forms[i],j=0;j<f.elements.length;j++)e=f.elements[j],void 0!==e.name&&-1!=e.name.indexOf("ct_checkjs")&&(e.value=ct_cookie)}if(Date.now||(Date.now=function(){return(new Date).getTime()}),null==ct_nocache_executed){var ct_nocache_executed=!0,checkjs_cookie=ct_getCookie("ct_checkjs");if(null!=checkjs_cookie)for(i=0;i<document.forms.length;i++)for(f=document.forms[i],j=0;j<f.elements.length;j++)e=f.elements[j],void 0!==e.name&&-1!=e.name.indexOf("ct_checkjs")&&(e.value=checkjs_cookie);if(null==checkjs_cookie&&sendRequest(ctNocache.ajaxurl+"?"+Math.random(),ct_callback,"action=ct_get_cookie"),void 0!==ctNocache.info_flag&&ctNocache.info_flag){var cleantalk_user_info={},cleantalk_screen_info={};for(var prop in screen)navigator[prop]instanceof Object||""===screen[prop]||(cleantalk_screen_info[prop]=screen[prop]);cleantalk_user_info.screen=cleantalk_screen_info;for(var prev,cleantalk_plugins=Array(),cnt=0,i=0;i<navigator.plugins.length;i++){var plugin;prev!=(plugin=(plugin=navigator.plugins[i]).name+" "+(plugin.version||""))&&(cleantalk_plugins[cnt]=plugin,cnt++,prev=plugin)}cleantalk_user_info.plugins=cleantalk_plugins,cleantalk_user_info.timezone_offset=-(new Date).getTimezoneOffset()/60,cleantalk_user_info.datetime=Math.round((new Date).getTime()/1e3),cleantalk_user_info.browser_x=document.documentElement.clientWidth,cleantalk_user_info.browser_y=document.documentElement.clientHeight;var ua=navigator.userAgent.toLowerCase(),flashInstalled=0;if(void 0!==navigator.plugins&&"object"==typeof navigator.plugins["Shockwave Flash"])flashInstalled=1;else if(void 0!==window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(flashInstalled=1)}catch(e){}cleantalk_user_info.is_flash=flashInstalled,isVisitedMain=-1,location.href!="http://"+location.hostname+"/"&&location.href!="https://"+location.hostname+"/"||(isVisitedMain=1,setTimeout(function(){document.cookie="ct_visited_main = 1; path = /;"},1500)),ct_visited_main=ct_getCookie("ct_visited_main"),isVisitedMain=null==ct_visited_main&&-1==isVisitedMain?0:1,cleantalk_user_info.is_main=isVisitedMain,setTimeout(function(){document.cookie="ct_user_info = "+escape(JSON.stringify(cleantalk_user_info))+"; path = /;"},1500)}}
2
  //# sourceMappingURL=cleantalk_nocache.min.js.map
js/cleantalk_nocache.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["cleantalk_nocache.js"],"names":["sendRequest","url","callback","postData","req","createXMLHTTPObject","method","location","protocol","replace","open","setRequestHeader","onreadystatechange","readyState","status","send","ctNocache","set_cookies_flag","ajaxurl","XMLHttpFactories","XMLHttpRequest","ActiveXObject","xmlhttp","i","length","e","ct_getCookie","name","matches","document","cookie","match","RegExp","decodeURIComponent","undefined","ct_setCookie","value","date","Date","setDate","getDate","setTimeout","toUTCString","ct_callback","ct_cookie","responseText","trim","forms","f","j","elements","indexOf","now","getTime","ct_nocache_executed","checkjs_cookie","Math","random","info_flag","cleantalk_user_info","cleantalk_screen_info","prop","screen","navigator","Object","prev","cleantalk_plugins","Array","cnt","plugins","plugin","version","timezone_offset","getTimezoneOffset","datetime","round","browser_x","documentElement","clientWidth","browser_y","clientHeight","ua","userAgent","toLowerCase","flashInstalled","window","is_flash","isVisitedMain","href","hostname","ct_visited_main","is_main","escape","JSON","stringify"],"mappings":"AAQA,SAASA,YAAYC,EAAIC,EAASC,GAC9B,IAAIC,EAAMC,sBACV,GAAKD,EAAL,CACA,IAAIE,EAAS,EAAa,OAAS,MAI/BL,EADa,WADFM,SAASC,SAEdP,EAAIQ,QAAQ,QAAS,UAErBR,EAAIQ,QAAQ,SAAU,SAGhCL,EAAIM,KAAKJ,EAAOL,GAAI,GAChBE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oBAAoBoB,UAAUlD,SAASgD,gBAAgBG,aAEvD,IAAIC,GAAKlB,UAAUmB,UAAUC,cACzBC,eAAiB,EACrB,QAA+B,IAApBrB,UAAiB,SAA8D,iBAAvCA,UAAUM,QAAQ,mBAEpEe,eAAiB,OAEb,QAAmC,IAAxBC,OAAOhE,cAEtB,IAEK,IAAIA,cAAc,mCAErB+D,eAAiB,GAEjB,MAAM3D,IAGTkC,oBAAoB2B,SAASF,eAE7BG,eAAe,EACZhF,SAASiF,MAAM,UAAUjF,SAASkF,SAAS,KAAOlF,SAASiF,MAAM,WAAWjF,SAASkF,SAAS,MAEhGF,cAAc,EACd9C,WAAW,WAAaZ,SAASC,OAAS,kCAAmC,OAI9E4D,gBAAkBhE,aAAa,mBACXQ,MAAjBwD,kBAA8C,GAAhBH,cAEhCA,cAAc,EAIdA,cAAc,EAGf5B,oBAAoBgC,QAAQJ,cAE5B9C,WAAW,WAAaZ,SAASC,OAAS,kBAAkB8D,OAAOC,KAAKC,UAAUnC,sBAAsB,eAAgB","file":"cleantalk_nocache.min.js","sourcesContent":["/*\n Assign default values for backend variables.\n*/\nif (typeof ctNocache === 'undefined') {\n ctNocache.set_cookies_flag = true;\n ctNocache.ajaxurl = '/wp-admin/admin-ajax.php';\n}\n\nfunction sendRequest(url,callback,postData) {\n var req = createXMLHTTPObject();\n if (!req) return;\n var method = (postData) ? \"POST\" : \"GET\";\n \n var protocol = location.protocol;\n if (protocol === 'https:') {\n url = url.replace('http:', 'https:');\n } else {\n url = url.replace('https:', 'http:');\n }\n \n req.open(method,url,true);\n if (postData)\n req.setRequestHeader('Content-type','application/x-www-form-urlencoded');\n req.onreadystatechange = function () {\n if (req.readyState != 4) return;\n if (req.status != 200 && req.status != 304) {\n// alert('HTTP error ' + req.status);\n return;\n }\n callback(req);\n };\n if (req.readyState == 4) return;\n req.send(postData);\n}\n\nvar XMLHttpFactories = [\n function () {return new XMLHttpRequest()},\n function () {return new ActiveXObject(\"Msxml2.XMLHTTP\")},\n function () {return new ActiveXObject(\"Msxml3.XMLHTTP\")},\n function () {return new ActiveXObject(\"Microsoft.XMLHTTP\")}\n];\n\nfunction createXMLHTTPObject() {\n var xmlhttp = false;\n for (var i=0;i<XMLHttpFactories.length;i++) {\n try {\n xmlhttp = XMLHttpFactories[i]();\n }\n catch (e) {\n continue;\n }\n break;\n }\n return xmlhttp;\n}\n\nfunction ct_getCookie(name) {\n var matches = document.cookie.match(new RegExp(\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\n ));\n return matches ? decodeURIComponent(matches[1]) : undefined;\n}\n\nfunction ct_setCookie(name, value)\n{\n if (ctNocache.set_cookies_flag) {\n document.cookie = name+\" =; expires=Thu, 01 Jan 1970 00:00:01 GMT; path = /\";\n document.cookie = name+\" =; expires=Thu, 01 Jan 1970 00:00:01 GMT\";\n \n var date = new Date;\n date.setDate(date.getDate() + 1);\n setTimeout(function() { document.cookie = name+\"=\" + value + \"; expires=\" + date.toUTCString() + \"; path = /;\"}, 500);\n }\n\n return null;\n}\n\nfunction ct_callback(req)\n{\n\tct_cookie = req.responseText.trim();\n\t//alert('Key value: ' + ct_cookie);\n\t\n\tct_setCookie('ct_checkjs', ct_cookie);\n\t\n\tfor(i=0;i<document.forms.length;i++)\n\t{\n\t\tf=document.forms[i];\n\t\tfor(j=0;j<f.elements.length;j++)\n\t\t{\n\t\t\te=f.elements[j];\n\t\t\tif(e.name!==undefined&&e.name.indexOf('ct_checkjs')!=-1)\n\t\t\t{\n\t\t\t\te.value=ct_cookie;\n\t\t\t\t//alert('Form #' + i + ', field ' + e.name + ' = ' + ct_cookie);\n\t\t\t}\n\t\t}\n\t}\n\n\t//alert('Set cookie: \\n' + document.cookie);\n}\n\nif (!Date.now) {\n\tDate.now = function() { return new Date().getTime(); }\n}\n\nif(ct_nocache_executed==undefined)\n{\n\tvar ct_nocache_executed=true;\n\t\n\tvar checkjs_cookie=ct_getCookie('ct_checkjs');\n\t\n\tif(checkjs_cookie!=undefined)\n\t{\n\t\tfor(i=0;i<document.forms.length;i++)\n\t\t{\n\t\t\tf=document.forms[i];\n\t\t\tfor(j=0;j<f.elements.length;j++)\n\t\t\t{\n\t\t\t\te=f.elements[j];\n\t\t\t\tif(e.name!==undefined&&e.name.indexOf('ct_checkjs')!=-1)\n\t\t\t\t{\n\t\t\t\t\te.value=checkjs_cookie;\n\t\t\t\t\t//alert('Form #' + i + ', field ' + e.name + ' = ' + ct_cookie);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\t\n\t\n\tif(checkjs_cookie==undefined) //86400 is 24 hours\n\t{\n\t\tsendRequest(ctNocache.ajaxurl+'?'+Math.random(),ct_callback,'action=ct_get_cookie');\n\t}\n\t\n\tif(typeof ctNocache.info_flag !== 'undefined' && ctNocache.info_flag)\n\t{\n\t\n\t\tvar cleantalk_user_info={};\n\t\t\n\t\tvar cleantalk_screen_info={};\n\t\tfor(var prop in screen)\n\t\t{\n\t\t\tif (navigator[prop] instanceof Object || screen[prop]==='')\n\t\t\t\tcontinue;\n\t\t\tcleantalk_screen_info[prop]=screen[prop];\n\t\t}\n\t\t\n\t\tcleantalk_user_info.screen=cleantalk_screen_info;\n\t\t\n\t\tvar cleantalk_plugins=Array();\n\t\tvar prev;\n\t\tvar cnt=0;\n\t\tfor(var i=0;i<navigator.plugins.length;i++)\n\t\t{\n\t\t\tvar plugin = navigator.plugins[i];\n\t\t\tvar plugin = plugin.name+\" \"+(plugin.version || '')\n\t\t\tif (prev == plugin ) continue;\n\t\t\tcleantalk_plugins[cnt]=plugin;\n\t\t\tcnt++;\n\t\t\tprev = plugin;\n\t\t}\n\t\tcleantalk_user_info.plugins=cleantalk_plugins;\n\t\t\n\t\tcleantalk_user_info.timezone_offset = -new Date().getTimezoneOffset()/60;\n\t\tcleantalk_user_info.datetime = Math.round((new Date().getTime())/1000);\n\t\t\n\t\tcleantalk_user_info.browser_x=document.documentElement.clientWidth;\n\t\tcleantalk_user_info.browser_y=document.documentElement.clientHeight;\n\t\t\n\t\tvar ua = navigator.userAgent.toLowerCase();\n\t\tvar flashInstalled = 0;\n\t\tif (typeof(navigator.plugins)!=\"undefined\"&&typeof(navigator.plugins[\"Shockwave Flash\"])==\"object\")\n\t\t{\n\t\t\tflashInstalled = 1;\n\t\t}\n\t\telse if (typeof window.ActiveXObject != \"undefined\")\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\"))\n\t\t\t\t{\n\t\t\t\t\tflashInstalled = 1;\n\t\t\t\t}\n\t\t\t} catch(e) {};\n\t\t};\n\t\t\n\t\tcleantalk_user_info.is_flash=flashInstalled;\n\t\t\n\t\tisVisitedMain=-1;\n\t\tif(location.href=='http://'+location.hostname+'/' || location.href=='https://'+location.hostname+'/')\n\t\t{\n\t\t\tisVisitedMain=1;\n\t\t\tsetTimeout(function() { document.cookie = \"ct_visited_main = 1; path = /;\"}, 1500);\n\t\t}\n\t\t\n\t\t\n\t\tct_visited_main = ct_getCookie('ct_visited_main');\n\t\tif(ct_visited_main==undefined && isVisitedMain==-1)\n\t\t{\n\t\t\tisVisitedMain=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tisVisitedMain=1;\n\t\t}\n\t\t\n\t\tcleantalk_user_info.is_main=isVisitedMain;\n\t\t\n\t\tsetTimeout(function() { document.cookie = \"ct_user_info = \"+escape(JSON.stringify(cleantalk_user_info))+\"; path = /;\"}, 1500);\n\t}\n}"]}
1
+ {"version":3,"sources":["cleantalk_nocache.js"],"names":["sendRequest","url","callback","postData","req","createXMLHTTPObject","method","location","protocol","replace","open","setRequestHeader","onreadystatechange","readyState","status","send","ctNocache","set_cookies_flag","ajaxurl","XMLHttpFactories","XMLHttpRequest","ActiveXObject","xmlhttp","i","length","e","ct_getCookie","name","matches","document","cookie","match","RegExp","decodeURIComponent","undefined","ct_setCookie","value","date","Date","setDate","getDate","setTimeout","toUTCString","ct_callback","ct_cookie","responseText","trim","forms","f","j","elements","indexOf","now","getTime","ct_nocache_executed","checkjs_cookie","Math","random","info_flag","cleantalk_user_info","cleantalk_screen_info","prop","screen","navigator","Object","prev","cleantalk_plugins","Array","cnt","plugins","plugin","version","timezone_offset","getTimezoneOffset","datetime","round","browser_x","documentElement","clientWidth","browser_y","clientHeight","ua","userAgent","toLowerCase","flashInstalled","window","is_flash","isVisitedMain","href","hostname","ct_visited_main","is_main","escape","JSON","stringify"],"mappings":"AAQA,SAASA,YAAYC,EAAIC,EAASC,GAC9B,IAAIC,EAAMC,sBACV,GAAKD,EAAL,CACA,IAAIE,EAAS,EAAa,OAAS,MAI/BL,EADa,WADFM,SAASC,SAEdP,EAAIQ,QAAQ,QAAS,UAErBR,EAAIQ,QAAQ,SAAU,SAGhCL,EAAIM,KAAKJ,EAAOL,GAAI,GAChBE,GACAC,EAAIO,iBAAiB,eAAe,qCACxCP,EAAIQ,mBAAqB,WACC,GAAlBR,EAAIS,aACU,KAAdT,EAAIU,QAA+B,KAAdV,EAAIU,QAI7BZ,EAASE,KAES,GAAlBA,EAAIS,YACRT,EAAIW,KAAKZ,IA7BY,oBAAda,YACPA,UAAUC,kBAAmB,EAC7BD,UAAUE,QAAU,4BA8BxB,IAAIC,iBAAmB,CACnB,WAAa,OAAO,IAAIC,gBACxB,WAAa,OAAO,IAAIC,cAAc,mBACtC,WAAa,OAAO,IAAIA,cAAc,mBACtC,WAAa,OAAO,IAAIA,cAAc,uBAG1C,SAAShB,sBAEL,IADA,IAAIiB,GAAU,EACLC,EAAE,EAAEA,EAAEJ,iBAAiBK,OAAOD,IAAK,CACxC,IACID,EAAUH,iBAAiBI,KAE/B,MAAOE,GACH,SAEJ,MAEJ,OAAOH,EAGX,SAASI,aAAaC,GACpB,IAAIC,EAAUC,SAASC,OAAOC,MAAM,IAAIC,OACtC,WAAaL,EAAKlB,QAAQ,+BAAgC,QAAU,aAEtE,OAAOmB,EAAUK,mBAAmBL,EAAQ,S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*/\r\nif (typeof ctNocache === 'undefined') {\r\n ctNocache.set_cookies_flag = true;\r\n ctNocache.ajaxurl = '/wp-admin/admin-ajax.php';\r\n}\r\n\r\nfunction sendRequest(url,callback,postData) {\r\n var req = createXMLHTTPObject();\r\n if (!req) return;\r\n var method = (postData) ? \"POST\" : \"GET\";\r\n \r\n var protocol = location.protocol;\r\n if (protocol === 'https:') {\r\n url = url.replace('http:', 'https:');\r\n } else {\r\n url = url.replace('https:', 'http:');\r\n }\r\n \r\n req.open(method,url,true);\r\n if (postData)\r\n req.setRequestHeader('Content-type','application/x-www-form-urlencoded');\r\n req.onreadystatechange = function () {\r\n if (req.readyState != 4) return;\r\n if (req.status != 200 && req.status != 304) {\r\n// alert('HTTP error ' + req.status);\r\n return;\r\n }\r\n callback(req);\r\n };\r\n if (req.readyState == 4) return;\r\n req.send(postData);\r\n}\r\n\r\nvar XMLHttpFactories = [\r\n function () {return new XMLHttpRequest()},\r\n function () {return new ActiveXObject(\"Msxml2.XMLHTTP\")},\r\n function () {return new ActiveXObject(\"Msxml3.XMLHTTP\")},\r\n function () {return new ActiveXObject(\"Microsoft.XMLHTTP\")}\r\n];\r\n\r\nfunction createXMLHTTPObject() {\r\n var xmlhttp = false;\r\n for (var i=0;i<XMLHttpFactories.length;i++) {\r\n try {\r\n xmlhttp = XMLHttpFactories[i]();\r\n }\r\n catch (e) {\r\n continue;\r\n }\r\n break;\r\n }\r\n return xmlhttp;\r\n}\r\n\r\nfunction ct_getCookie(name) {\r\n var matches = document.cookie.match(new RegExp(\r\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\r\n ));\r\n return matches ? decodeURIComponent(matches[1]) : undefined;\r\n}\r\n\r\nfunction ct_setCookie(name, value)\r\n{\r\n if (ctNocache.set_cookies_flag) {\r\n document.cookie = name+\" =; expires=Thu, 01 Jan 1970 00:00:01 GMT; path = /\";\r\n document.cookie = name+\" =; expires=Thu, 01 Jan 1970 00:00:01 GMT\";\r\n \r\n var date = new Date;\r\n date.setDate(date.getDate() + 1);\r\n setTimeout(function() { document.cookie = name+\"=\" + value + \"; expires=\" + date.toUTCString() + \"; path = /;\"}, 500);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction ct_callback(req)\r\n{\r\n\tct_cookie = req.responseText.trim();\r\n\t//alert('Key value: ' + ct_cookie);\r\n\t\r\n\tct_setCookie('ct_checkjs', ct_cookie);\r\n\t\r\n\tfor(i=0;i<document.forms.length;i++)\r\n\t{\r\n\t\tf=document.forms[i];\r\n\t\tfor(j=0;j<f.elements.length;j++)\r\n\t\t{\r\n\t\t\te=f.elements[j];\r\n\t\t\tif(e.name!==undefined&&e.name.indexOf('ct_checkjs')!=-1)\r\n\t\t\t{\r\n\t\t\t\te.value=ct_cookie;\r\n\t\t\t\t//alert('Form #' + i + ', field ' + e.name + ' = ' + ct_cookie);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//alert('Set cookie: \\n' + document.cookie);\r\n}\r\n\r\nif (!Date.now) {\r\n\tDate.now = function() { return new Date().getTime(); }\r\n}\r\n\r\nif(ct_nocache_executed==undefined)\r\n{\r\n\tvar ct_nocache_executed=true;\r\n\t\r\n\tvar checkjs_cookie=ct_getCookie('ct_checkjs');\r\n\t\r\n\tif(checkjs_cookie!=undefined)\r\n\t{\r\n\t\tfor(i=0;i<document.forms.length;i++)\r\n\t\t{\r\n\t\t\tf=document.forms[i];\r\n\t\t\tfor(j=0;j<f.elements.length;j++)\r\n\t\t\t{\r\n\t\t\t\te=f.elements[j];\r\n\t\t\t\tif(e.name!==undefined&&e.name.indexOf('ct_checkjs')!=-1)\r\n\t\t\t\t{\r\n\t\t\t\t\te.value=checkjs_cookie;\r\n\t\t\t\t\t//alert('Form #' + i + ', field ' + e.name + ' = ' + ct_cookie);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\t\r\n\tif(checkjs_cookie==undefined) //86400 is 24 hours\r\n\t{\r\n\t\tsendRequest(ctNocache.ajaxurl+'?'+Math.random(),ct_callback,'action=ct_get_cookie');\r\n\t}\r\n\t\r\n\tif(typeof ctNocache.info_flag !== 'undefined' && ctNocache.info_flag)\r\n\t{\r\n\t\r\n\t\tvar cleantalk_user_info={};\r\n\t\t\r\n\t\tvar cleantalk_screen_info={};\r\n\t\tfor(var prop in screen)\r\n\t\t{\r\n\t\t\tif (navigator[prop] instanceof Object || screen[prop]==='')\r\n\t\t\t\tcontinue;\r\n\t\t\tcleantalk_screen_info[prop]=screen[prop];\r\n\t\t}\r\n\t\t\r\n\t\tcleantalk_user_info.screen=cleantalk_screen_info;\r\n\t\t\r\n\t\tvar cleantalk_plugins=Array();\r\n\t\tvar prev;\r\n\t\tvar cnt=0;\r\n\t\tfor(var i=0;i<navigator.plugins.length;i++)\r\n\t\t{\r\n\t\t\tvar plugin = navigator.plugins[i];\r\n\t\t\tvar plugin = plugin.name+\" \"+(plugin.version || '')\r\n\t\t\tif (prev == plugin ) continue;\r\n\t\t\tcleantalk_plugins[cnt]=plugin;\r\n\t\t\tcnt++;\r\n\t\t\tprev = plugin;\r\n\t\t}\r\n\t\tcleantalk_user_info.plugins=cleantalk_plugins;\r\n\t\t\r\n\t\tcleantalk_user_info.timezone_offset = -new Date().getTimezoneOffset()/60;\r\n\t\tcleantalk_user_info.datetime = Math.round((new Date().getTime())/1000);\r\n\t\t\r\n\t\tcleantalk_user_info.browser_x=document.documentElement.clientWidth;\r\n\t\tcleantalk_user_info.browser_y=document.documentElement.clientHeight;\r\n\t\t\r\n\t\tvar ua = navigator.userAgent.toLowerCase();\r\n\t\tvar flashInstalled = 0;\r\n\t\tif (typeof(navigator.plugins)!=\"undefined\"&&typeof(navigator.plugins[\"Shockwave Flash\"])==\"object\")\r\n\t\t{\r\n\t\t\tflashInstalled = 1;\r\n\t\t}\r\n\t\telse if (typeof window.ActiveXObject != \"undefined\")\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tif (new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tflashInstalled = 1;\r\n\t\t\t\t}\r\n\t\t\t} catch(e) {};\r\n\t\t};\r\n\t\t\r\n\t\tcleantalk_user_info.is_flash=flashInstalled;\r\n\t\t\r\n\t\tisVisitedMain=-1;\r\n\t\tif(location.href=='http://'+location.hostname+'/' || location.href=='https://'+location.hostname+'/')\r\n\t\t{\r\n\t\t\tisVisitedMain=1;\r\n\t\t\tsetTimeout(function() { document.cookie = \"ct_visited_main = 1; path = /;\"}, 1500);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tct_visited_main = ct_getCookie('ct_visited_main');\r\n\t\tif(ct_visited_main==undefined && isVisitedMain==-1)\r\n\t\t{\r\n\t\t\tisVisitedMain=0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tisVisitedMain=1;\r\n\t\t}\r\n\t\t\r\n\t\tcleantalk_user_info.is_main=isVisitedMain;\r\n\t\t\r\n\t\tsetTimeout(function() { document.cookie = \"ct_user_info = \"+escape(JSON.stringify(cleantalk_user_info))+\"; path = /;\"}, 1500);\r\n\t}\r\n}"]}
readme.txt CHANGED
@@ -4,16 +4,16 @@ Tags: spam, antispam, woocommerce, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
  Requires PHP: 5.4
7
- Stable tag: 5.136.1
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
11
 
12
  == Description ==
13
 
14
- **Supports: Contact Form 7, Contact Form by WPForms, Ninja Forms, Gravity Forms, MailChimp, Formidable forms, WooCommerce, JetPack comments and contact form, BuddyPress, bbPress, S2Member, MailPoet, wpDiscuz, any WordPress registrations & contact forms and themes. Just setup and forget the spam!**
15
 
16
- No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Universal AntiSpam plugin.
17
 
18
  = AntiSpam features =
19
  1. Stops spam comments.
@@ -26,12 +26,12 @@ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bo
26
  8. Stops spam in widgets.
27
  9. Stops spam in WooCommerce.
28
  10. Checks and removes the existing spam comments and spam users.
29
- 11. Compatible with mobile users and devices.
30
- 12. Compatible with General Data Protection Regulation (GDPR) (EU).
31
  13. Real-time email validation. Is email real or Not.
32
  14. Blocking disposable & temporary emails.
33
  15. No Spam - No Google Penalties. Give your SEO boost.
34
- 16. Mobile friendly Anti Spam & FireWall.
35
  17. Stops spam in Search Form.
36
  18. Disable comments.
37
 
@@ -42,7 +42,7 @@ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bo
42
  > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
43
  > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
44
 
45
- >I know you have heard of a number of anti-spam plugins. But you must know, the cloud-based ones are the best regarding detection rate. They compare all the content in forms with their own algorithm to find out the legibility.
46
  >*<a href="https://www.techwibe.com/cleantalk-wordpress-plugin-review/" target="_blank">www.techwibe.com</a>*
47
 
48
  > The key selling point of CleanTalk for me is not simply its effectiveness. It's the fact that CleanTalk works in the background. It does not make users jump through hoops in order to submit a comment or complete a form.
@@ -74,12 +74,12 @@ Spam protection for everything about bbPress: logins, registrations, forums, top
74
 
75
  = Other spam filters =
76
  * WordPress Landing Pages.
77
- * WP User Frontend, UserPro.
78
  * Any WordPress form (checkbox 'Custom contact forms').
79
  * Any submission to the site (checkbox 'Check all POST data')
80
 
81
  = Compatible with WordPress cache plugins =
82
- * W3 Total Cache, Quick Cache, WP Fastest Cache, Hyper Cache, WP Super cache, WP-Rocket and any other cache plugins.
83
 
84
  = Check existing comments for spam. Bulk spam comments removal. Spam comment Cleaner =
85
  With the help of anti-spam by CleanTalk you can inspect through existing comments to find and quickly delete spam comments at once. To use this function, go to WP Console -> Comments -> Find spam comments.
@@ -87,7 +87,7 @@ With the help of anti-spam by CleanTalk you can inspect through existing comment
87
  = Check existing users for spam. Bulk spam accounts removal. Spam users cleaner =
88
  With the help of anti-spam by CleanTalk you can inspect through existing accounts to find and quickly delete spam users at once. For use this function, go to WP Console -> Users -> Check for spam. Also, you can export a list of spam users to the CSV.
89
 
90
- = Blocking users by country =
91
  Automatically block comments and registrations from the countries you have set a ban for. This option is useful in cases of manual spam protection and for protection enhancement. If your site is not intended for international audience and you do not expect comments/users from other countries.
92
 
93
  = Blocking comments by "stop words" =
@@ -104,7 +104,7 @@ blocks the spam attacks from IP addresses which are not included in the SFW base
104
  = Low false/positive rate =
105
  This plugin uses multiple anti-spam tests to filter spam bots having as low false/positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks of the real website visitors even if one of the tests failed.
106
 
107
- = How effective is CleanTalk? =
108
  Accurately blocking spam is not an easy thing to do, but CleanTalk has a very low proven False/Positive rate. Here is actual statistics on false positives for all customers.
109
 
110
  * Registrations - 0.007%
@@ -137,19 +137,19 @@ https://s.w.org/plugins/cleantalk-spam-protect/screenshot-5.png?r=1288723
137
  CleanTalk team has been developing a cloud antispam system for five years and has created a truly reliable anti-spam service designed for you to guarantee
138
  your safety.
139
 
140
- = Spam attacks log =
141
  Service CleanTalk (this plugin is a client application for CleanTalk anti-spam service) records all filtered comments, registration and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and no false/positive filtering.
142
 
143
  = Spam FireWall =
144
- CleanTalk has an advanced option "Spam FireWall". Spam FireWall allows blocking the most active spam bots before they get access to your website. It prevents spam bots from loading website pages so your web server doesn't have to perform all scripts on these pages. Also it prevents scanning of pages of the website by spam bots. Therefore Spam FireWall significantly reduces the load on your web server. Spam FireWall also makes CleanTalk the two-step protection from spam bots. Spam FireWall is the first step and it blocks the most active spam bots. CleanTalk Anti-Spam is the second step and checks all other requests on the website in the moment of submitting comments/registers etc.
145
 
146
- Spam FireWall is fully compatible with the most popular VPN services.
147
  Also, Spam FireWall supports all search engines Google, Bing, Yahoo, Baidu, MSN, Yandex and etc.
148
 
149
- = How Spam FireWall works? =
150
  * The visitor enters to your web site.
151
  * HTTP request data are being checked in the nearly 5.8 million of the identified spam bot IPs.
152
- * If it is an active spam bot, the bot gets a blank page, if it is a visitor then he receives a normal page. This process is completely transparent for the visitors.
153
 
154
  All the CleanTalk Spam FireWall activity is being logged in the process of filtering.
155
 
@@ -157,23 +157,23 @@ All the CleanTalk Spam FireWall activity is being logged in the process of filte
157
  Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall blocks all requests from bad IP addresses. Your website gives the intruder a special page with the description of DDoS rejection instead of the website pages. Therefore Spam FireWall helps to reduce CPU usage of your server.
158
  [youtube https://www.youtube.com/watch?v=Eu5Zqryvj4k]
159
 
160
- = XML-RPC brute force protection =
161
  Spam FireWall can mitigate XML-RPC brute force attacks. It blocks XML-RPC attacks from bad IP addresses. This helps to prevent bruteforce attacks by a Remote Procedure Call.
162
 
163
  = No spam comments, no spam registrations, no spam contact emails, no spam trackbacks. CAPTCHA-free anti-spam for WordPress =
164
- Spam is one of the most irritating things. Spam rates are increasing every year and conventional anti-spam can no longer handle all spam bots. CleanTalk prevents and automatically blocks spam. You'll be surprised how effective CleanTalk is in protecting from spam.
165
 
166
- = AntiSpam plugin info =
167
- CleanTalk is an all-in-one antispam solution for WordPress that protects login, comment, contact and WooCommerce forms at once. You don't need to install separate antispam plugins for each form. It allows your blog to work faster and save resources. After installation you will forget about spam; your CleanTalk plugin will do all the work. You won't have to deal with spam as CleanTalk does this for you automatically.
168
 
169
  CleanTalk is a transparent antispam tool, we provide detailed stats of all incoming comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see antispam stats wherever you want.
170
 
171
- We have developed the antispam for WordPress that protects you from spam bots at the maximum level allowing you to provide your visitors a simple and convenient form of comments/registrations without annoying CAPTCHAs and puzzles. CleanTalk detects spam in multistage tests allowing us to block up to 99.998% of spam bots.
172
- The anti-spam method offered by CleanTalk avoids inconvenient for communication methods (CAPTCHA, question-answer etc.), and offers to your site visitors a more comfortable one.
173
 
174
  CleanTalk is a premium anti-spam service for WordPress, the plugin works with
175
- our own CleanTalk Cloud Service. Anti Spam by CleanTalk offers a free trial, you can look at the <a href="https://cleantalk.org/price">pricing</a> here. We provide anti-spam services at the highest level. To maintain this level we cannot afford to offer a free version of our service, as this will immediately affect the quality of the providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and receive:
176
-
177
  * Up to 99.998% protection from spam bots.
178
  * Time and resources saving.
179
  * More registrations/comments/visitors.
@@ -187,31 +187,31 @@ our own CleanTalk Cloud Service. Anti Spam by CleanTalk offers a free trial, you
187
  * Free mobile app to control anti-spam protection on your website.
188
 
189
  = Additional features =
190
- * Daily and weekly detailed anti-spam reports: traffic VS spam.
191
  * Apps for iPhone, Android to control anti-spam service, comments, signups, contacts, traffic and spam stats for the last 7 days.
192
- * AntiSpam apps for most popular CMS on cleantalk.org.
193
 
194
  = How to protect sites from spam bots without CAPTCHA? =
195
  The most popular anti spam method is CAPTCHA - the annoying picture with curved and sloping symbols, which are presented to the visitor to decipher and fill in. In is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if the visitor wants to comment, he has to fill in these symbols time after time, making mistakes and starting once again. Sometimes CAPTCHA reminds us of the doodles of a two year old child. For users with vision problems CAPTCHA is an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to decipher CAPTCHA 95% of visitors reject further attempts. At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource spam both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts concerning the Need for CAPTCHA?
196
 
197
  *"Ultimately, CAPTCHAs are useless for spam because they're designed to tell you if someone is 'human' or not, but not whether something is spam or not." Matt Mullenweg*
198
 
199
- You do not have to work in IT to know what spam is. Besides piles of unwanted email, there are spam bots, or special software programs designed to act as human website visitors that post unwelcome messages over the Internet to advertise dubious services. More often than not spam messages do not even make sense. Similar to bacteria and virus mutations developing antibiotic resistance, spam bots are becoming more resilient in penetrating Internet firewalls and security layers.
200
 
201
  = CleanTalk's features =
202
- Anti-Spam by CleanTalk with Spam FireWall is one of the fastest plugins that allows you to lower the server load. One of the important parameters for each webmaster is the speed of the site, so we make sure that our plugin consumes as few server resources as possible. The Cloud Service provides the advantage: all data processing takes place in the Cloud.
203
 
204
  CleanTalk team has developed unique anti spam algorithms to assess visitors behavior. CleanTalk analyzes user behavior and the parameters of the filled forms. Our anti-spam module, being installed in your website, sends the behavior parameters of either a visitor or a spam bot. When these parameters are estimated, the anti spam service makes a decision - to post a message or to define it as spam and reject it. Based on these checks, the service forms its own list of email addresses used by spam bots.
205
 
206
- The registrations of visitors are being checked in a similar manner. The service adds to the blacklist not just email addresses, but also IP addresses and domains of websites that promote themselves through spam mailing. All of this happens automatically and requires no action from the administration of the website. In 2.5 million queries the service makes a mistake in 40-45 cases, i.e. CleanTalk detects spam with 99.9982% accuracy. We constantly monitor these errors and make adjustments to our algorithms. Even with this exceptional accuracy our team is aiming to improve the figures over time.
207
 
208
  All-in-one. CleanTalk protects form spam all forms instantaneously - comments, registrations, feedback, contacts. No need to install additional plugins for each form. You save resources and increase performance of your website.
209
 
210
- Spam attacks log. Anti-Spam by CleanTalk records all filtered comments, registrations and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and experience no false/positive filtering.
211
 
212
- With the help of anti-spam by CleanTalk you can check existing comments and users, to find and quickly delete spam comments at once. This allows administrators of websites to automatically check and identify spam bots, comments and users, which were not detected by conventional anti-spam tools. The existing comments and users checking process is performed in a database of the nearly 2 million identified spam bots. Detailed spam stats allows CleanTalk customers to fully control it.
213
 
214
- CleanTalk has an advanced option "Spam FireWall". This option allows you to block the most active spam bots before they get access to your website. It unloads you website pages when an attempt attack was made, so your web server won't run unnecessary scripts on these pages. Also it prevents any scanning of website pages by spam bots. Subsequently Spam FireWall significantly reduces your webserver load. Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall will block requests from bad IP addresses. Your website gives the intruder a special page with a description of DDoS rejection instead of the website pages. Spam FireWall can help to reduce the CPU usage of your server because of this reason.
215
 
216
  "CleanTalk team has been developing a cloud spam protection system for five years and has created a truly reliable anti-spam service designed for you to guarantee your safety".
217
 
@@ -228,9 +228,9 @@ The plugin will do everything rest.
228
 
229
  = Auto-Update CleanTalk AntiSpam =
230
 
231
- CleanTalk Dashboard allows you to set auto-update plugin and select several websites and update the plugin at once on all sites by one click or you can setup auto-update for all websites or separate websites.
232
 
233
- Note: there is 24 hours delay before auto-update will do. This delay allows needing to avoid any issues. All updates that made through CleanTalk Dashboard manually will do immediately.
234
 
235
  Auto-updating system will work from CleanTalk AntiSpam version 5.88
236
 
@@ -273,21 +273,21 @@ This option disables comments on your site. You can choose one or several option
273
 
274
  When using Disables comments, existing comments will not be deleted and will remain on the pages.
275
 
276
- = Translations =
277
- * Albanian (sq_AL) - thanks to fjalaime https://wordpress.org/support/users/fjalaime/
278
  * French (fr_FR) - thanks to Gilles Santacreu http://net-ik.net
279
  * Spanish (es_ES) - thanks to Andrew Kurtis and WebHostingHub
280
 
281
  = Requirements =
282
  WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enabled 'allow_url_fopen' setting. The plugin is fully compatible with PHP 7.
283
 
284
- > Max power, all-in-one, premium anti-spam WordPress plugin. No comments & registrations spam, no contact spam, protects any forms. Just install and forget spam.
285
 
286
  == Installation ==
287
 
288
  = Installation instructions =
289
 
290
- 1. Download, install and activate 'Anti-spam by CleanTalk'.
291
 
292
  2. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
293
 
@@ -313,7 +313,7 @@ Now, all subsites will have this access key.
313
 
314
  = Manage and control spam protection =
315
 
316
- Go to <a href="https://cleantalk.org/my" target="_blank">Dashboard</a> at the cleantalk.org or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app to manage and control spam protection.
317
 
318
 
319
  == Frequently Asked Questions ==
@@ -348,7 +348,7 @@ The plugin uses several simple tests to stop spammers:
348
  = Will the anti-spam plugin protect my theme? =
349
  Yes, it will. The Anti-spam by CleanTalk is compatible with any WordPress theme.
350
 
351
- = What about pingback, trackback spam? =
352
  The plugin passes pingbacks without any checks by default. All trackbacks will be blocked if the sender had spam activity.
353
 
354
  = Can I use CleanTalk with Akismet? =
@@ -361,17 +361,17 @@ Please look at this features comparison here https://cleantalk.org/cleantalk-vs-
361
  Yes, you can. The plugin has the option to test all pending comments via database of <a href="https://cleantalk.org/blacklists">spam active IP/Email</a>, found spam comments will be moved to Trash folder.
362
 
363
  = How does the plugin find spam in pending comments or registered accounts? =
364
- The plugin checks all non-spam comments in the blacklist database and shows you those senders who have spam activity on other websites.
365
  There are some differences between blacklist database and API to protect you from spam bot registrations/comments online. Blacklists show all history of spam activity, but our API (which is used in spam tests) relies on other parameters too: last day of activity, number of spam attacks during the last days etc. These mechanisms help us to reduce the number of false outcomes. So, there is nothing strange, if some emails/IPs are not found by bulk comments/accounts test.
366
 
367
  To check comments please go here:
368
  > WordPress console -> Comments -> Find spam comments
369
 
370
  To check users please go here:
371
- > WordPress console -> Users -> Find spam users
372
 
373
  = Should I use other anti-spam tools (Captcha, reCaptcha and etc.)? =
374
- CleanTalk stops up to 99.998% of spam bots, so you can disable other anti-spam plugins (especially CAPTCHA-type anti-spam plugins). In some cases several anti-spam plugins could conflict with each other, so it would be better to use just one plugin.
375
 
376
  = Is the plugin compatible with WordPress MultiUser (WPMU or WordPress network)? =
377
  Yes, the plugin is compatible with WordPress MultiUser. Each blog in multisite environment has individual anti-spam options for the protection from spam bots.
@@ -388,7 +388,7 @@ The plugin has several options to detect spam bots and humans. If you just post
388
 
389
  "I want to sell something", "Buy something here.." and etc
390
 
391
- the comments will be passed, because the plugin detects sender as a human. So, use special email *stop_email@example.com* to test the anti-spam functionality or wait a few days to see how the plugin works.
392
 
393
  = Is it free or paid? =
394
  The plugin is free. But the plugin uses CleanTalk cloud service to filter spam bots. You have to register an account and then you will receive a free trial to test anti-spam for comments, registrations, bookings, contacts or orders. When the trial (on CleanTalk account) is finished, you can renew the subscription for 1 year or deactivate anti-spam plugin.
@@ -397,21 +397,21 @@ The plugin is free. But the plugin uses CleanTalk cloud service to filter spam b
397
  Anti-spam by CleanTalk doesn't use static HTML code in its templates, so all anti-spam functions work correctly with any WordPress cache plugins.
398
 
399
  = Does the plugin protect from spam bots if I use forms with third-party services? =
400
- Yes, it does. Plugin protects web-forms on your websites which send data to third-party servers (like MailChimp). To enable this protection set the option 'Protect external forms' in the plugin settings.
401
 
402
- = Does CleanTalk compatible with Cloudflare? =
403
- CleanTalk is fully compatible with CloudFlare. Service doesn't filter CloudFlares IP's (AS13335) through blacklists database, so in this case plugin/service filters spam bots using other anti-spam tests.
404
 
405
- = Is CleanTalk compatible with a content delivery network (CDN)? =
406
- Yes, it is. CleanTalk works with any CDN system, i.e. CloudFlare, MaxCDN, Akamai.
407
 
408
  = Can I use CleanTalk functionality in my plugins? =
409
  Yes, you can. Just use following snippet:
410
 
411
- <?php
412
  if(!function_exists('ct_test_message')){
413
  include_once( ABSPATH . '/wp-content/plugins/cleantalk-spam-protect/cleantalk.php' );
414
- }
415
  //for registration test:
416
  $res=ct_test_registration("nickname", "stop_email@example.com", "127.0.0.1");
417
  //or for some other messages (contact forms, comments etc.)
@@ -468,13 +468,13 @@ CleanTalk works with Varnish, it protects WordPress against spam, but by default
468
 
469
  WordPress console -> Settings -> CleanTalk -> Advanced settings
470
 
471
- Now the plugin will protect WordPress comments, registrations and most of popular contact forms, but will not protect some of rarely used contact forms.
472
 
473
  = Does the anti-spam plugin work with Accelerated Mobile Pages (AMP)? =
474
- Yes, it does. But you have to turn off the option 'Use AJAX for JavaScript check' in Advanced settigns of the plugin to be fully compatible with Accelerated Mobile Pages.
475
 
476
  = How to close renewal or trial notice in the WordPress backend? =
477
- To close the notice please save the plugin settings again or it will be closed automatically within 60 minutes after the renewal.
478
 
479
  = I'm using PHP 4.2 version and i'm getting errors related with JSON. Why does it happens? =
480
  СleanTalk is no longer supports PHP lower than 5.2 version because the support code have incompatibility with PHP 7 version. Please, upgrade your PHP. If you couldn't perform that, let us know about it via support ticket here: https://cleantalk.org/my/support.
@@ -503,12 +503,12 @@ The following possibilities are available for you in the Anti-Spam Log:
503
  * Personal blacklists - go to your website Black&White Lists page.
504
  * Record details: block reason, body of the message, additional caught data.
505
 
506
- = Spam FireWall and AntiSpam - Networks Blocking =
507
 
508
  Anti-Spam - will blocks users from selected IP or network from using contacts/messages/registrations/comments forms.
509
  Spam FireWall - will blocks users from selected IP or network from entering the website.
510
 
511
- Please, read more here
512
  https://cleantalk.org/help/sfw-blocks-networks
513
 
514
 
@@ -553,19 +553,27 @@ Yes, it is. Please read this article,
553
  If your website has forms that send data to external sources, you can enable option to "Protect external forms". In this case, if plugin determinates that the current message is spam, your form action will be temporary replaced to your current hostname to prevent sending false data to an external source.
554
 
555
  == Screenshots ==
556
- 1. AntiSpam settings are easy to use.
557
- 2. AntiSpam plugin rejected a spam bot at the CAPTCHA less registration form. The plugin provides explanation to visitor and websites about each rejected comment/registration or contact message.
558
- 3. Use AntiSpam analytics tool for each website in service Dashboard to have information about spam/legitimate stats.
559
- 4. Use AntiSpam log to control anti-spam plugin.
560
- 5. CleanTalk works faster than most of other anti-spam plugins.
561
- 6. The Dashboard with a map of most spam active countries per your account.
562
- 7. The plugin deletes/removes the existing spam comments and users accounts.
563
  8. CleanTalk's dashboard update link.
564
  9. Auto upadte confimation.
565
  10. Website's options.
566
 
567
  == Changelog ==
568
 
 
 
 
 
 
 
 
 
569
  = 5.136.1 April 2 2020 =
570
  * Mod: Setting "Show links to check Emails, IPs for spam" splitted in two.
571
  * Mod: Added setting "Manage comments on public pages".
@@ -692,7 +700,7 @@ If your website has forms that send data to external sources, you can enable opt
692
  * Mod: Automatically decrease amount of checked users by one request if an error occurs.
693
  * Fix: Security issue.
694
  * Fix: Static JS key.
695
-
696
  = 5.127.3 October 8 2019 =
697
  * Fix: Errors during registration.
698
 
@@ -873,14 +881,14 @@ If your website has forms that send data to external sources, you can enable opt
873
  * Fix: Skip lost password form check
874
  * Fix: Skip mobile requests (push settings)
875
  * Fix: PHP notice when detecting BuddyPress template.
876
-
877
  = 5.116.2 March 7 2019 =
878
  * Fix: Creating tables in MariaDB.
879
 
880
  = 5.116.1 March 6 2019 =
881
  * Fix: Creating tables in DB.
882
  * Fix: PHP Warning in spam statistics widget.
883
-
884
  = 5.116 March 6 2019 =
885
  * Spam filtration quality improved.
886
  * New: Storing visited URLs.
@@ -888,7 +896,7 @@ If your website has forms that send data to external sources, you can enable opt
888
  * New: Get validation result for Contact Form 7, Comments, Jetpack comments.
889
  * Fix: ES add subscriber.
890
  * Fix: IP detection.
891
-
892
  = 5.115.2 February 27 2019 =
893
  * Fix: False positives spam detection in WP Forms and Contact Form 7.
894
 
@@ -902,7 +910,7 @@ If your website has forms that send data to external sources, you can enable opt
902
  * Fix: SpamFirewall update speeded up.
903
  * New: False positives with caching solutions decreased.
904
  * New: Opportunity to use Wordpress HTTP API to connect with Cloud.
905
-
906
  = 5.114 January 31 2019 =
907
  * New: Setting "Use Wordpress HTTP API" as alternative to CURL. Disabled by default.
908
  * Fix: Formidable: Adding small JS check when adding JS_key.
@@ -933,7 +941,7 @@ If your website has forms that send data to external sources, you can enable opt
933
  * Fix: DB structure improvements for WPMS.
934
  * Spam filtering quality improved.
935
  * Minor fixes.
936
-
937
  = 5.111 December 13 2018 =
938
  * Fix: Double request in JetPack contact form.
939
  * Fix: Email notification about spam registration.
@@ -955,7 +963,7 @@ If your website has forms that send data to external sources, you can enable opt
955
  * Mod: SpamFireWall is now fully compatible with WPMS.
956
  * Mod: Setting 'Tell others about CleanTalk' was deleted.
957
  * Mod: Protection from spam improved.
958
-
959
  = 5.108.1 November 8 2018 =
960
  * Fix: Errors with integration class.
961
 
@@ -1029,13 +1037,13 @@ If your website has forms that send data to external sources, you can enable opt
1029
  * Fix: Dashboard widget JS error.
1030
  * Fix: JavaScript error for some environment.
1031
  * Mod: Antispam protection accelerated for some pages.
1032
-
1033
  = 5.100 July 30 2018 =
1034
  * Fix: JavaScript dependencies.
1035
 
1036
  = 5.99.1 July 17 2018 =
1037
  * IP detection fixed and improved.
1038
-
1039
  = 5.99 July 10 2018 =
1040
  * Fix: WooCommerce false positives.
1041
  * Fix: SpamFireWall IP detection.
@@ -1063,7 +1071,7 @@ If your website has forms that send data to external sources, you can enable opt
1063
  = 5.95.1 May 3 2018 =
1064
  * Fix: "Get key automatically" button display logic.
1065
  * Fix: PHP notices.
1066
-
1067
  = 5.95 May 2 2018 =
1068
  * Spam filtration improved.
1069
  * Fix: Public widget layout.
@@ -1090,7 +1098,7 @@ If your website has forms that send data to external sources, you can enable opt
1090
  * Fix: Error if cURL extension is disabled.
1091
 
1092
  = 5.92.1 March 23 2018 =
1093
- * Fix: Spelling
1094
  * Fix: Fatal error if cURL extension is disabled.
1095
 
1096
  = 5.92 March 22 2018 =
@@ -1298,7 +1306,7 @@ If your website has forms that send data to external sources, you can enable opt
1298
  * Fix for "internal forms check" option.
1299
  * Fixed issue with caching Spam FireWall die page.
1300
  * Other small fixes.
1301
-
1302
  = 5.65 May 16 2017 =
1303
  * Fix for PayPal redirecton.
1304
  * Fixed issue with empty query for bulk comments test.
@@ -1329,7 +1337,7 @@ If your website has forms that send data to external sources, you can enable opt
1329
  * Stat Widget: Minor fixes.
1330
  * Added possibility to download results of the users check in CSV format.
1331
  * Alteration for settings page (footer).
1332
-
1333
  = 5.60.1 March 29 2017 =
1334
  * Fixed error function 'locale_get_display_region' no exists.
1335
 
@@ -1344,7 +1352,7 @@ If your website has forms that send data to external sources, you can enable opt
1344
  * Trial banner is dismissable. Disapear for 24h or till logout.
1345
  * Settings modified (Auto testing failed warning).
1346
  * Mailing(inactive key) interval increased to 6 hours.
1347
-
1348
  = 5.58.6 March 16 2017 =
1349
  * Fix for Ninja forms (protection updated).
1350
  * Fix for QA Theme.
@@ -1370,7 +1378,7 @@ If your website has forms that send data to external sources, you can enable opt
1370
 
1371
  = 5.58.2 February 17 2017 =
1372
  * Cron fix for daily report.
1373
-
1374
  = 5.58.1 February 16 2017 =
1375
  * Minor fixes.
1376
 
@@ -1388,7 +1396,7 @@ If your website has forms that send data to external sources, you can enable opt
1388
  * Spam FireWall filters only GET requests.
1389
  * Optimization.
1390
  * Minor and major fixes.
1391
-
1392
  = 5.56.1 January 25 2017 =
1393
  * Minor fixes
1394
 
@@ -1397,7 +1405,7 @@ If your website has forms that send data to external sources, you can enable opt
1397
  * Changes comments flow.
1398
  * FireWall updater fix.
1399
  * Users check optimization.
1400
-
1401
  = 5.55 December 23 2016 =
1402
  * Integrations: Caldera Forms, Visual Form Builder.
1403
  * Fix for different 'cookies' header names.
@@ -1413,7 +1421,7 @@ If your website has forms that send data to external sources, you can enable opt
1413
 
1414
  = 5.53.1 December 9 2016 =
1415
  * Minor layout fixes.
1416
-
1417
  = 5.53 November 28 2016 =
1418
  * Addition warning before deleting users.
1419
  * Spam FireWall is enabled by default.
@@ -1421,7 +1429,7 @@ If your website has forms that send data to external sources, you can enable opt
1421
  * Translations.
1422
  * Optimization.
1423
  * Fixes.
1424
-
1425
  = 5.52.1 November 14 2016 =
1426
  * Users and comments check: Using new API method.
1427
  * Quick Contact From: Integration via "Custom Contact Forms" setting.
@@ -1433,12 +1441,12 @@ If your website has forms that send data to external sources, you can enable opt
1433
  * Added protection for internal forms
1434
  * Immediate spam check for comments and users from WP dashboard
1435
  * Optimized code
1436
-
1437
  = 5.50.1 October 24 2016 =
1438
  * Improved filtration in contact forms.
1439
  * Spam FireWall: Fixed issue with SFW logs
1440
  * Skipping service fields: Fast Secure Contact Froms, QU Forms, Custom Contact Forms
1441
-
1442
  = 5.50 October 20 2016 =
1443
  * Custom contact forms: integration.
1444
  * Pirate Forms: integration.
@@ -1451,10 +1459,10 @@ If your website has forms that send data to external sources, you can enable opt
1451
 
1452
  = 5.49.2 October 5 2016 =
1453
  * Second Fix for database error. Stable version.
1454
-
1455
  = 5.49.1 October 5 2016 =
1456
  * Fixed database error.
1457
-
1458
  = 5.49 October 3 2016 =
1459
  * Spam FireWall feature: Class upgraded.
1460
  * New feature: Delete links from approved comments.
@@ -1468,7 +1476,7 @@ If your website has forms that send data to external sources, you can enable opt
1468
  * JetPack: contact form fix.
1469
  * Fixed and created the defaults for all CleanTalk options.
1470
  * Fixed spelling mistakes.
1471
-
1472
  = 5.48 September 15 2016 =
1473
  * buddyPress: Added private messages filtering. Doesn't check user if he has 3 or more messages in the "sentbox" and "inbox" folders.
1474
  * buddyPress: Added option in settings for private messages check.
@@ -1477,7 +1485,7 @@ If your website has forms that send data to external sources, you can enable opt
1477
  * Improved filtering for Gravity Forms
1478
  * Mobile Assistant Connector fix
1479
  * Minor fixes.
1480
-
1481
  = 5.47 September 5 2016 =
1482
  * WooCommerce: direct integration for checkout form.
1483
  * WooCommerce Sensei: login form fix.
@@ -1491,7 +1499,7 @@ If your website has forms that send data to external sources, you can enable opt
1491
  * Fixed spelling in settings
1492
  * Added "Delete from the list" button in comments spam check page
1493
  * Minor fixes.
1494
-
1495
  = 5.46 August 17 2016 =
1496
  * Fixed issue with admin bar links in WP Multi Network mode.
1497
  * Added "All time counter" and "Daily counter" into admin bar.
@@ -1500,36 +1508,36 @@ If your website has forms that send data to external sources, you can enable opt
1500
 
1501
  = 5.45.2 August 4 2016 =
1502
  * Added Anti-Spam protection for Quick Event Manager.
1503
- * Improved bulk spam test for users. Now the plugin does not mark as Spam user, if the user IP address has spam activity more than 30 days ago.
1504
  * Fixed bulk spam test for comments. Previous version had a conflict between spam history for IP and Email.
1505
  * Minor fix function to get the API key.
1506
 
1507
  = 5.45.1 July 26 2016 =
1508
  * Fixed issue with missed spam messages, subscriptions.
1509
- * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more than 30 days ago.
1510
 
1511
  = 5.45 July 21 2016 =
1512
- * Optimized bulk spam comments deletion.
1513
  * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
1514
  * Added links to bulk spam comments&users removal tool.
1515
 
1516
  = 5.44.1 July 13 2016 =
1517
  * Optimized options getting code.
1518
- * Added the option 'Protect Logged in users' to do anti-spam tests for submissions by logged in users.
1519
 
1520
  = 5.43.2 June 30 2016 =
1521
- * Optimized anti-spam code for AJAX based contact forms.
1522
- * Fixed CSS layout of counters in Admin bar (issue with layout in IE11).
1523
 
1524
  = 5.43.1 June 23 2016 =
1525
  * Added agent version in requests to test a connection between the website and servers.
1526
  * Fixed issue with PHP notices in cleantalk-admin.php.
1527
 
1528
  = 5.43 June 22 2016 =
1529
- * Added spam protection for registrations via 'Login with AJAX' plug-in.
1530
  * Added a new counter to Admin bar that allows to count spam and approved submissions since last reset.
1531
  * Update the code that tests a connection between a website and CleanTalk's servers. New version doesn't generate submissions with email good@cleantalk.org.
1532
- * Fixed issue with spam protection for nested forms by Formidable plug-in.
1533
 
1534
  = 5.42 2016-06-15 =
1535
  * Added anti-spam protection for UserPro.
@@ -1540,19 +1548,19 @@ If your website has forms that send data to external sources, you can enable opt
1540
  * Minor fixes in plugin backend.
1541
 
1542
  = 5.41 2016-05-31 =
1543
- * Added HTTP response in plugin response if an network issue was happend.
1544
  * Optimized JavaScript anti-spam test for Formidable forms.
1545
  * Re-stored the option to auto redirect to plugn settings after plugin activation.
1546
- * Updated Spanish, Russian translations.
1547
  * Fixed issue with nasted fields in Formidable forms.
1548
 
1549
  = 5.40.3 2016-05-26 =
1550
- * Added option to encrypt (SSL) connection to CleanTalk anti-spam servers.
1551
- * Added JSON encoding for AJAX forms.
1552
- * Obfuscated private data for Custom contact forms option.
1553
  * Optimized bulk users check for spam over blacklists database.
1554
- * Fixed issue with lost connection to servers and JavaScript anti-spam test.
1555
- * Fixed issue with WordFence and collect_details.
1556
 
1557
  = 5.40.2 2016-05-11 =
1558
  * Improved account status check logic.
@@ -1576,7 +1584,7 @@ If your website has forms that send data to external sources, you can enable opt
1576
  * Improved AJAX based anti-spam test with HTTPS backends.
1577
  * Added fix to avoid issue with empty ct_info_flag on JavaScript side.
1578
  * Added logic to exclude caching for Spam FireWall.
1579
- * Removed a condition to skip accounts with 127.0.0.1 IP in spam test for registered acconts.
1580
 
1581
  = 5.38.1 2016-03-24 =
1582
  * Fixed issue with PHP sessions and 'The session id is too long or contains illegal characters'.
@@ -1588,34 +1596,34 @@ If your website has forms that send data to external sources, you can enable opt
1588
  * Fixed bug with broken MailPoet previews.
1589
  * Fixed bug with broken Geo My WP pop-up windows.
1590
  * Fixed issue with mb_convert_encoding() function.
1591
- * Removed double JavaScript code in front-end.
1592
- * Removed unused variables in anti spam logic.
1593
  * Added option 'Set cookies' (turned on by default). If the option turned off, the plugin will not generate cookies, but in this case plugin will not protect some rarely used contact forms. Any way, turn this option off be compatible with Varnish in spam protection for WordPress core comments, registrations and most popular contact forms.
1594
  * Added anti-spam protection for Gravity forms via option 'Contact forms' with hook gform_entry_is_spam().
1595
 
1596
  = 5.36.1 2016-02-05 =
1597
  * Fixed bug, when users receive error after logging in
1598
- * Improve anti-spam filters for contact forms.
1599
-
1600
  = 5.36 2016-02-04 =
1601
  * Improved JavaScript anti spam protection
1602
  * Improvements for avoiding blocking requests from payment systems
1603
-
1604
  = 5.35 2016-01-14 =
1605
- * Added support for IP licensing
1606
  * Some anti-spam protection improvements
1607
  * Small backend interface fixes
1608
 
1609
  = 5.34.1 2015-12-17 =
1610
  * Fixed trackback antispam protection: improved checking mechanism
1611
  * Fixed problem with blocking MailPoet: added exclusions in spam checking algorithm
1612
-
1613
  = 5.34 2015-12-10 =
1614
  * Improved spam checking mechanism
1615
  * Added "Collect browser details" option for better antispam protection
1616
  * Fixed custom contact forms checking for AJAX requests
1617
  * Minor translations fixes
1618
-
1619
  = 5.33.1 2015-12-04 =
1620
  * Fixed issue with BBPress: restored old user permission checking mechanism
1621
  * Fixed anti-spam comments checking: sometimes get_comments returned wrong comments number
@@ -1626,14 +1634,14 @@ If your website has forms that send data to external sources, you can enable opt
1626
  * Backend interface fixes
1627
  * Improved Spam FireWall efficiency
1628
  * Improved performance of anti spam checking
1629
-
1630
  = 5.32 2015-11-26 =
1631
  * Added improvements for manual spam detection
1632
  * Fixed errors in backend
1633
  * Fixed bulk users anti spam checking
1634
  * Added indicator for bulk spam checking
1635
- * Added "Get access key automatically" button
1636
-
1637
  = 5.31 2015-11-11 =
1638
  * Improved backend performance
1639
  * Fixed counter of approved/blocked spam attacks
@@ -1657,7 +1665,7 @@ If your website has forms that send data to external sources, you can enable opt
1657
  = 5.28 2015-10-16 =
1658
  * Fixed errors in anti-spam checking
1659
  * Restored options for spam checking registrations and cpmmon contact forms
1660
- * Improved spam protection
1661
  * Fixed problems with AJAX functionality in MailPoet, WooCommerce and other AJAX plugins
1662
 
1663
  = 5.27 2015-10-13 =
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
  Requires PHP: 5.4
7
+ Stable tag: 5.136.2
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
11
 
12
  == Description ==
13
 
14
+ **Supports: Contact Form 7, Contact Form by WPForms, Ninja Forms, Gravity Forms, MailChimp, Formidable forms, WooCommerce, JetPack comments and contact form, BuddyPress, bbPress, S2Member, MailPoet, wpDiscuz, any WordPress registrations & contact forms and themes. Just setup and forget the spam!**
15
 
16
+ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Universal AntiSpam plugin.
17
 
18
  = AntiSpam features =
19
  1. Stops spam comments.
26
  8. Stops spam in widgets.
27
  9. Stops spam in WooCommerce.
28
  10. Checks and removes the existing spam comments and spam users.
29
+ 11. Compatible with mobile users and devices.
30
+ 12. Compatible with General Data Protection Regulation (GDPR) (EU).
31
  13. Real-time email validation. Is email real or Not.
32
  14. Blocking disposable & temporary emails.
33
  15. No Spam - No Google Penalties. Give your SEO boost.
34
+ 16. Mobile friendly Anti Spam & FireWall.
35
  17. Stops spam in Search Form.
36
  18. Disable comments.
37
 
42
  > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
43
  > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
44
 
45
+ >I know you have heard of a number of anti-spam plugins. But you must know, the cloud-based ones are the best regarding detection rate. They compare all the content in forms with their own algorithm to find out the legibility.
46
  >*<a href="https://www.techwibe.com/cleantalk-wordpress-plugin-review/" target="_blank">www.techwibe.com</a>*
47
 
48
  > The key selling point of CleanTalk for me is not simply its effectiveness. It's the fact that CleanTalk works in the background. It does not make users jump through hoops in order to submit a comment or complete a form.
74
 
75
  = Other spam filters =
76
  * WordPress Landing Pages.
77
+ * WP User Frontend, UserPro.
78
  * Any WordPress form (checkbox 'Custom contact forms').
79
  * Any submission to the site (checkbox 'Check all POST data')
80
 
81
  = Compatible with WordPress cache plugins =
82
+ * W3 Total Cache, Quick Cache, WP Fastest Cache, Hyper Cache, WP Super cache, WP-Rocket and any other cache plugins.
83
 
84
  = Check existing comments for spam. Bulk spam comments removal. Spam comment Cleaner =
85
  With the help of anti-spam by CleanTalk you can inspect through existing comments to find and quickly delete spam comments at once. To use this function, go to WP Console -> Comments -> Find spam comments.
87
  = Check existing users for spam. Bulk spam accounts removal. Spam users cleaner =
88
  With the help of anti-spam by CleanTalk you can inspect through existing accounts to find and quickly delete spam users at once. For use this function, go to WP Console -> Users -> Check for spam. Also, you can export a list of spam users to the CSV.
89
 
90
+ = Blocking users by country =
91
  Automatically block comments and registrations from the countries you have set a ban for. This option is useful in cases of manual spam protection and for protection enhancement. If your site is not intended for international audience and you do not expect comments/users from other countries.
92
 
93
  = Blocking comments by "stop words" =
104
  = Low false/positive rate =
105
  This plugin uses multiple anti-spam tests to filter spam bots having as low false/positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks of the real website visitors even if one of the tests failed.
106
 
107
+ = How effective is CleanTalk? =
108
  Accurately blocking spam is not an easy thing to do, but CleanTalk has a very low proven False/Positive rate. Here is actual statistics on false positives for all customers.
109
 
110
  * Registrations - 0.007%
137
  CleanTalk team has been developing a cloud antispam system for five years and has created a truly reliable anti-spam service designed for you to guarantee
138
  your safety.
139
 
140
+ = Spam attacks log =
141
  Service CleanTalk (this plugin is a client application for CleanTalk anti-spam service) records all filtered comments, registration and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and no false/positive filtering.
142
 
143
  = Spam FireWall =
144
+ CleanTalk has an advanced option "Spam FireWall". Spam FireWall allows blocking the most active spam bots before they get access to your website. It prevents spam bots from loading website pages so your web server doesn't have to perform all scripts on these pages. Also it prevents scanning of pages of the website by spam bots. Therefore Spam FireWall significantly reduces the load on your web server. Spam FireWall also makes CleanTalk the two-step protection from spam bots. Spam FireWall is the first step and it blocks the most active spam bots. CleanTalk Anti-Spam is the second step and checks all other requests on the website in the moment of submitting comments/registers etc.
145
 
146
+ Spam FireWall is fully compatible with the most popular VPN services.
147
  Also, Spam FireWall supports all search engines Google, Bing, Yahoo, Baidu, MSN, Yandex and etc.
148
 
149
+ = How Spam FireWall works? =
150
  * The visitor enters to your web site.
151
  * HTTP request data are being checked in the nearly 5.8 million of the identified spam bot IPs.
152
+ * If it is an active spam bot, the bot gets a blank page, if it is a visitor then he receives a normal page. This process is completely transparent for the visitors.
153
 
154
  All the CleanTalk Spam FireWall activity is being logged in the process of filtering.
155
 
157
  Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall blocks all requests from bad IP addresses. Your website gives the intruder a special page with the description of DDoS rejection instead of the website pages. Therefore Spam FireWall helps to reduce CPU usage of your server.
158
  [youtube https://www.youtube.com/watch?v=Eu5Zqryvj4k]
159
 
160
+ = XML-RPC brute force protection =
161
  Spam FireWall can mitigate XML-RPC brute force attacks. It blocks XML-RPC attacks from bad IP addresses. This helps to prevent bruteforce attacks by a Remote Procedure Call.
162
 
163
  = No spam comments, no spam registrations, no spam contact emails, no spam trackbacks. CAPTCHA-free anti-spam for WordPress =
164
+ Spam is one of the most irritating things. Spam rates are increasing every year and conventional anti-spam can no longer handle all spam bots. CleanTalk prevents and automatically blocks spam. You'll be surprised how effective CleanTalk is in protecting from spam.
165
 
166
+ = AntiSpam plugin info =
167
+ CleanTalk is an all-in-one antispam solution for WordPress that protects login, comment, contact and WooCommerce forms at once. You don't need to install separate antispam plugins for each form. It allows your blog to work faster and save resources. After installation you will forget about spam; your CleanTalk plugin will do all the work. You won't have to deal with spam as CleanTalk does this for you automatically.
168
 
169
  CleanTalk is a transparent antispam tool, we provide detailed stats of all incoming comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see antispam stats wherever you want.
170
 
171
+ We have developed the antispam for WordPress that protects you from spam bots at the maximum level allowing you to provide your visitors a simple and convenient form of comments/registrations without annoying CAPTCHAs and puzzles. CleanTalk detects spam in multistage tests allowing us to block up to 99.998% of spam bots.
172
+ The anti-spam method offered by CleanTalk avoids inconvenient for communication methods (CAPTCHA, question-answer etc.), and offers to your site visitors a more comfortable one.
173
 
174
  CleanTalk is a premium anti-spam service for WordPress, the plugin works with
175
+ our own CleanTalk Cloud Service. Anti Spam by CleanTalk offers a free trial, you can look at the <a href="https://cleantalk.org/price">pricing</a> here. We provide anti-spam services at the highest level. To maintain this level we cannot afford to offer a free version of our service, as this will immediately affect the quality of the providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and receive:
176
+
177
  * Up to 99.998% protection from spam bots.
178
  * Time and resources saving.
179
  * More registrations/comments/visitors.
187
  * Free mobile app to control anti-spam protection on your website.
188
 
189
  = Additional features =
190
+ * Daily and weekly detailed anti-spam reports: traffic VS spam.
191
  * Apps for iPhone, Android to control anti-spam service, comments, signups, contacts, traffic and spam stats for the last 7 days.
192
+ * AntiSpam apps for most popular CMS on cleantalk.org.
193
 
194
  = How to protect sites from spam bots without CAPTCHA? =
195
  The most popular anti spam method is CAPTCHA - the annoying picture with curved and sloping symbols, which are presented to the visitor to decipher and fill in. In is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if the visitor wants to comment, he has to fill in these symbols time after time, making mistakes and starting once again. Sometimes CAPTCHA reminds us of the doodles of a two year old child. For users with vision problems CAPTCHA is an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to decipher CAPTCHA 95% of visitors reject further attempts. At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource spam both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts concerning the Need for CAPTCHA?
196
 
197
  *"Ultimately, CAPTCHAs are useless for spam because they're designed to tell you if someone is 'human' or not, but not whether something is spam or not." Matt Mullenweg*
198
 
199
+ You do not have to work in IT to know what spam is. Besides piles of unwanted email, there are spam bots, or special software programs designed to act as human website visitors that post unwelcome messages over the Internet to advertise dubious services. More often than not spam messages do not even make sense. Similar to bacteria and virus mutations developing antibiotic resistance, spam bots are becoming more resilient in penetrating Internet firewalls and security layers.
200
 
201
  = CleanTalk's features =
202
+ Anti-Spam by CleanTalk with Spam FireWall is one of the fastest plugins that allows you to lower the server load. One of the important parameters for each webmaster is the speed of the site, so we make sure that our plugin consumes as few server resources as possible. The Cloud Service provides the advantage: all data processing takes place in the Cloud.
203
 
204
  CleanTalk team has developed unique anti spam algorithms to assess visitors behavior. CleanTalk analyzes user behavior and the parameters of the filled forms. Our anti-spam module, being installed in your website, sends the behavior parameters of either a visitor or a spam bot. When these parameters are estimated, the anti spam service makes a decision - to post a message or to define it as spam and reject it. Based on these checks, the service forms its own list of email addresses used by spam bots.
205
 
206
+ The registrations of visitors are being checked in a similar manner. The service adds to the blacklist not just email addresses, but also IP addresses and domains of websites that promote themselves through spam mailing. All of this happens automatically and requires no action from the administration of the website. In 2.5 million queries the service makes a mistake in 40-45 cases, i.e. CleanTalk detects spam with 99.9982% accuracy. We constantly monitor these errors and make adjustments to our algorithms. Even with this exceptional accuracy our team is aiming to improve the figures over time.
207
 
208
  All-in-one. CleanTalk protects form spam all forms instantaneously - comments, registrations, feedback, contacts. No need to install additional plugins for each form. You save resources and increase performance of your website.
209
 
210
+ Spam attacks log. Anti-Spam by CleanTalk records all filtered comments, registrations and other spam attacks in the "Log of spam attacks" and stores the data in the log for up to 45 days. Using the log, you can ensure reliable protection of your website from spam and experience no false/positive filtering.
211
 
212
+ With the help of anti-spam by CleanTalk you can check existing comments and users, to find and quickly delete spam comments at once. This allows administrators of websites to automatically check and identify spam bots, comments and users, which were not detected by conventional anti-spam tools. The existing comments and users checking process is performed in a database of the nearly 2 million identified spam bots. Detailed spam stats allows CleanTalk customers to fully control it.
213
 
214
+ CleanTalk has an advanced option "Spam FireWall". This option allows you to block the most active spam bots before they get access to your website. It unloads you website pages when an attempt attack was made, so your web server won't run unnecessary scripts on these pages. Also it prevents any scanning of website pages by spam bots. Subsequently Spam FireWall significantly reduces your webserver load. Spam FireWall can mitigate HTTP/HTTPS DDoS attacks. When an intruder makes GET requests to attack your website, Spam FireWall will block requests from bad IP addresses. Your website gives the intruder a special page with a description of DDoS rejection instead of the website pages. Spam FireWall can help to reduce the CPU usage of your server because of this reason.
215
 
216
  "CleanTalk team has been developing a cloud spam protection system for five years and has created a truly reliable anti-spam service designed for you to guarantee your safety".
217
 
228
 
229
  = Auto-Update CleanTalk AntiSpam =
230
 
231
+ CleanTalk Dashboard allows you to set auto-update plugin and select several websites and update the plugin at once on all sites by one click or you can setup auto-update for all websites or separate websites.
232
 
233
+ Note: there is 24 hours delay before auto-update will do. This delay allows needing to avoid any issues. All updates that made through CleanTalk Dashboard manually will do immediately.
234
 
235
  Auto-updating system will work from CleanTalk AntiSpam version 5.88
236
 
273
 
274
  When using Disables comments, existing comments will not be deleted and will remain on the pages.
275
 
276
+ = Translations =
277
+ * Albanian (sq_AL) - thanks to fjalaime https://wordpress.org/support/users/fjalaime/
278
  * French (fr_FR) - thanks to Gilles Santacreu http://net-ik.net
279
  * Spanish (es_ES) - thanks to Andrew Kurtis and WebHostingHub
280
 
281
  = Requirements =
282
  WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enabled 'allow_url_fopen' setting. The plugin is fully compatible with PHP 7.
283
 
284
+ > Max power, all-in-one, premium anti-spam WordPress plugin. No comments & registrations spam, no contact spam, protects any forms. Just install and forget spam.
285
 
286
  == Installation ==
287
 
288
  = Installation instructions =
289
 
290
+ 1. Download, install and activate 'Anti-spam by CleanTalk'.
291
 
292
  2. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
293
 
313
 
314
  = Manage and control spam protection =
315
 
316
+ Go to <a href="https://cleantalk.org/my" target="_blank">Dashboard</a> at the cleantalk.org or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app to manage and control spam protection.
317
 
318
 
319
  == Frequently Asked Questions ==
348
  = Will the anti-spam plugin protect my theme? =
349
  Yes, it will. The Anti-spam by CleanTalk is compatible with any WordPress theme.
350
 
351
+ = What about pingback, trackback spam? =
352
  The plugin passes pingbacks without any checks by default. All trackbacks will be blocked if the sender had spam activity.
353
 
354
  = Can I use CleanTalk with Akismet? =
361
  Yes, you can. The plugin has the option to test all pending comments via database of <a href="https://cleantalk.org/blacklists">spam active IP/Email</a>, found spam comments will be moved to Trash folder.
362
 
363
  = How does the plugin find spam in pending comments or registered accounts? =
364
+ The plugin checks all non-spam comments in the blacklist database and shows you those senders who have spam activity on other websites.
365
  There are some differences between blacklist database and API to protect you from spam bot registrations/comments online. Blacklists show all history of spam activity, but our API (which is used in spam tests) relies on other parameters too: last day of activity, number of spam attacks during the last days etc. These mechanisms help us to reduce the number of false outcomes. So, there is nothing strange, if some emails/IPs are not found by bulk comments/accounts test.
366
 
367
  To check comments please go here:
368
  > WordPress console -> Comments -> Find spam comments
369
 
370
  To check users please go here:
371
+ > WordPress console -> Users -> Find spam users
372
 
373
  = Should I use other anti-spam tools (Captcha, reCaptcha and etc.)? =
374
+ CleanTalk stops up to 99.998% of spam bots, so you can disable other anti-spam plugins (especially CAPTCHA-type anti-spam plugins). In some cases several anti-spam plugins could conflict with each other, so it would be better to use just one plugin.
375
 
376
  = Is the plugin compatible with WordPress MultiUser (WPMU or WordPress network)? =
377
  Yes, the plugin is compatible with WordPress MultiUser. Each blog in multisite environment has individual anti-spam options for the protection from spam bots.
388
 
389
  "I want to sell something", "Buy something here.." and etc
390
 
391
+ the comments will be passed, because the plugin detects sender as a human. So, use special email *stop_email@example.com* to test the anti-spam functionality or wait a few days to see how the plugin works.
392
 
393
  = Is it free or paid? =
394
  The plugin is free. But the plugin uses CleanTalk cloud service to filter spam bots. You have to register an account and then you will receive a free trial to test anti-spam for comments, registrations, bookings, contacts or orders. When the trial (on CleanTalk account) is finished, you can renew the subscription for 1 year or deactivate anti-spam plugin.
397
  Anti-spam by CleanTalk doesn't use static HTML code in its templates, so all anti-spam functions work correctly with any WordPress cache plugins.
398
 
399
  = Does the plugin protect from spam bots if I use forms with third-party services? =
400
+ Yes, it does. Plugin protects web-forms on your websites which send data to third-party servers (like MailChimp). To enable this protection set the option 'Protect external forms' in the plugin settings.
401
 
402
+ = Does CleanTalk compatible with Cloudflare? =
403
+ CleanTalk is fully compatible with CloudFlare. Service doesn't filter CloudFlares IP's (AS13335) through blacklists database, so in this case plugin/service filters spam bots using other anti-spam tests.
404
 
405
+ = Is CleanTalk compatible with a content delivery network (CDN)? =
406
+ Yes, it is. CleanTalk works with any CDN system, i.e. CloudFlare, MaxCDN, Akamai.
407
 
408
  = Can I use CleanTalk functionality in my plugins? =
409
  Yes, you can. Just use following snippet:
410
 
411
+ <?php
412
  if(!function_exists('ct_test_message')){
413
  include_once( ABSPATH . '/wp-content/plugins/cleantalk-spam-protect/cleantalk.php' );
414
+ }
415
  //for registration test:
416
  $res=ct_test_registration("nickname", "stop_email@example.com", "127.0.0.1");
417
  //or for some other messages (contact forms, comments etc.)
468
 
469
  WordPress console -> Settings -> CleanTalk -> Advanced settings
470
 
471
+ Now the plugin will protect WordPress comments, registrations and most of popular contact forms, but will not protect some of rarely used contact forms.
472
 
473
  = Does the anti-spam plugin work with Accelerated Mobile Pages (AMP)? =
474
+ Yes, it does. But you have to turn off the option 'Use AJAX for JavaScript check' in Advanced settigns of the plugin to be fully compatible with Accelerated Mobile Pages.
475
 
476
  = How to close renewal or trial notice in the WordPress backend? =
477
+ To close the notice please save the plugin settings again or it will be closed automatically within 60 minutes after the renewal.
478
 
479
  = I'm using PHP 4.2 version and i'm getting errors related with JSON. Why does it happens? =
480
  СleanTalk is no longer supports PHP lower than 5.2 version because the support code have incompatibility with PHP 7 version. Please, upgrade your PHP. If you couldn't perform that, let us know about it via support ticket here: https://cleantalk.org/my/support.
503
  * Personal blacklists - go to your website Black&White Lists page.
504
  * Record details: block reason, body of the message, additional caught data.
505
 
506
+ = Spam FireWall and AntiSpam - Networks Blocking =
507
 
508
  Anti-Spam - will blocks users from selected IP or network from using contacts/messages/registrations/comments forms.
509
  Spam FireWall - will blocks users from selected IP or network from entering the website.
510
 
511
+ Please, read more here
512
  https://cleantalk.org/help/sfw-blocks-networks
513
 
514
 
553
  If your website has forms that send data to external sources, you can enable option to "Protect external forms". In this case, if plugin determinates that the current message is spam, your form action will be temporary replaced to your current hostname to prevent sending false data to an external source.
554
 
555
  == Screenshots ==
556
+ 1. AntiSpam settings are easy to use.
557
+ 2. AntiSpam plugin rejected a spam bot at the CAPTCHA less registration form. The plugin provides explanation to visitor and websites about each rejected comment/registration or contact message.
558
+ 3. Use AntiSpam analytics tool for each website in service Dashboard to have information about spam/legitimate stats.
559
+ 4. Use AntiSpam log to control anti-spam plugin.
560
+ 5. CleanTalk works faster than most of other anti-spam plugins.
561
+ 6. The Dashboard with a map of most spam active countries per your account.
562
+ 7. The plugin deletes/removes the existing spam comments and users accounts.
563
  8. CleanTalk's dashboard update link.
564
  9. Auto upadte confimation.
565
  10. Website's options.
566
 
567
  == Changelog ==
568
 
569
+ = 5.136.2 April 7 2020 =
570
+ * Mod: bbPress is using role exclusions now.
571
+ * Mod: Show info on SpamFirewall block page.
572
+ * Mod: Log SpamFirewall tests.
573
+ * Fix: get_fields_any() fixed.
574
+ * Fix: Multiple requests on WooCommerce checkout.
575
+ * Fix: The SpamFirewall block page.
576
+
577
  = 5.136.1 April 2 2020 =
578
  * Mod: Setting "Show links to check Emails, IPs for spam" splitted in two.
579
  * Mod: Added setting "Manage comments on public pages".
700
  * Mod: Automatically decrease amount of checked users by one request if an error occurs.
701
  * Fix: Security issue.
702
  * Fix: Static JS key.
703
+
704
  = 5.127.3 October 8 2019 =
705
  * Fix: Errors during registration.
706
 
881
  * Fix: Skip lost password form check
882
  * Fix: Skip mobile requests (push settings)
883
  * Fix: PHP notice when detecting BuddyPress template.
884
+
885
  = 5.116.2 March 7 2019 =
886
  * Fix: Creating tables in MariaDB.
887
 
888
  = 5.116.1 March 6 2019 =
889
  * Fix: Creating tables in DB.
890
  * Fix: PHP Warning in spam statistics widget.
891
+
892
  = 5.116 March 6 2019 =
893
  * Spam filtration quality improved.
894
  * New: Storing visited URLs.
896
  * New: Get validation result for Contact Form 7, Comments, Jetpack comments.
897
  * Fix: ES add subscriber.
898
  * Fix: IP detection.
899
+
900
  = 5.115.2 February 27 2019 =
901
  * Fix: False positives spam detection in WP Forms and Contact Form 7.
902
 
910
  * Fix: SpamFirewall update speeded up.
911
  * New: False positives with caching solutions decreased.
912
  * New: Opportunity to use Wordpress HTTP API to connect with Cloud.
913
+
914
  = 5.114 January 31 2019 =
915
  * New: Setting "Use Wordpress HTTP API" as alternative to CURL. Disabled by default.
916
  * Fix: Formidable: Adding small JS check when adding JS_key.
941
  * Fix: DB structure improvements for WPMS.
942
  * Spam filtering quality improved.
943
  * Minor fixes.
944
+
945
  = 5.111 December 13 2018 =
946
  * Fix: Double request in JetPack contact form.
947
  * Fix: Email notification about spam registration.
963
  * Mod: SpamFireWall is now fully compatible with WPMS.
964
  * Mod: Setting 'Tell others about CleanTalk' was deleted.
965
  * Mod: Protection from spam improved.
966
+
967
  = 5.108.1 November 8 2018 =
968
  * Fix: Errors with integration class.
969
 
1037
  * Fix: Dashboard widget JS error.
1038
  * Fix: JavaScript error for some environment.
1039
  * Mod: Antispam protection accelerated for some pages.
1040
+
1041
  = 5.100 July 30 2018 =
1042
  * Fix: JavaScript dependencies.
1043
 
1044
  = 5.99.1 July 17 2018 =
1045
  * IP detection fixed and improved.
1046
+
1047
  = 5.99 July 10 2018 =
1048
  * Fix: WooCommerce false positives.
1049
  * Fix: SpamFireWall IP detection.
1071
  = 5.95.1 May 3 2018 =
1072
  * Fix: "Get key automatically" button display logic.
1073
  * Fix: PHP notices.
1074
+
1075
  = 5.95 May 2 2018 =
1076
  * Spam filtration improved.
1077
  * Fix: Public widget layout.
1098
  * Fix: Error if cURL extension is disabled.
1099
 
1100
  = 5.92.1 March 23 2018 =
1101
+ * Fix: Spelling
1102
  * Fix: Fatal error if cURL extension is disabled.
1103
 
1104
  = 5.92 March 22 2018 =
1306
  * Fix for "internal forms check" option.
1307
  * Fixed issue with caching Spam FireWall die page.
1308
  * Other small fixes.
1309
+
1310
  = 5.65 May 16 2017 =
1311
  * Fix for PayPal redirecton.
1312
  * Fixed issue with empty query for bulk comments test.
1337
  * Stat Widget: Minor fixes.
1338
  * Added possibility to download results of the users check in CSV format.
1339
  * Alteration for settings page (footer).
1340
+
1341
  = 5.60.1 March 29 2017 =
1342
  * Fixed error function 'locale_get_display_region' no exists.
1343
 
1352
  * Trial banner is dismissable. Disapear for 24h or till logout.
1353
  * Settings modified (Auto testing failed warning).
1354
  * Mailing(inactive key) interval increased to 6 hours.
1355
+
1356
  = 5.58.6 March 16 2017 =
1357
  * Fix for Ninja forms (protection updated).
1358
  * Fix for QA Theme.
1378
 
1379
  = 5.58.2 February 17 2017 =
1380
  * Cron fix for daily report.
1381
+
1382
  = 5.58.1 February 16 2017 =
1383
  * Minor fixes.
1384
 
1396
  * Spam FireWall filters only GET requests.
1397
  * Optimization.
1398
  * Minor and major fixes.
1399
+
1400
  = 5.56.1 January 25 2017 =
1401
  * Minor fixes
1402
 
1405
  * Changes comments flow.
1406
  * FireWall updater fix.
1407
  * Users check optimization.
1408
+
1409
  = 5.55 December 23 2016 =
1410
  * Integrations: Caldera Forms, Visual Form Builder.
1411
  * Fix for different 'cookies' header names.
1421
 
1422
  = 5.53.1 December 9 2016 =
1423
  * Minor layout fixes.
1424
+
1425
  = 5.53 November 28 2016 =
1426
  * Addition warning before deleting users.
1427
  * Spam FireWall is enabled by default.
1429
  * Translations.
1430
  * Optimization.
1431
  * Fixes.
1432
+
1433
  = 5.52.1 November 14 2016 =
1434
  * Users and comments check: Using new API method.
1435
  * Quick Contact From: Integration via "Custom Contact Forms" setting.
1441
  * Added protection for internal forms
1442
  * Immediate spam check for comments and users from WP dashboard
1443
  * Optimized code
1444
+
1445
  = 5.50.1 October 24 2016 =
1446
  * Improved filtration in contact forms.
1447
  * Spam FireWall: Fixed issue with SFW logs
1448
  * Skipping service fields: Fast Secure Contact Froms, QU Forms, Custom Contact Forms
1449
+
1450
  = 5.50 October 20 2016 =
1451
  * Custom contact forms: integration.
1452
  * Pirate Forms: integration.
1459
 
1460
  = 5.49.2 October 5 2016 =
1461
  * Second Fix for database error. Stable version.
1462
+
1463
  = 5.49.1 October 5 2016 =
1464
  * Fixed database error.
1465
+
1466
  = 5.49 October 3 2016 =
1467
  * Spam FireWall feature: Class upgraded.
1468
  * New feature: Delete links from approved comments.
1476
  * JetPack: contact form fix.
1477
  * Fixed and created the defaults for all CleanTalk options.
1478
  * Fixed spelling mistakes.
1479
+
1480
  = 5.48 September 15 2016 =
1481
  * buddyPress: Added private messages filtering. Doesn't check user if he has 3 or more messages in the "sentbox" and "inbox" folders.
1482
  * buddyPress: Added option in settings for private messages check.
1485
  * Improved filtering for Gravity Forms
1486
  * Mobile Assistant Connector fix
1487
  * Minor fixes.
1488
+
1489
  = 5.47 September 5 2016 =
1490
  * WooCommerce: direct integration for checkout form.
1491
  * WooCommerce Sensei: login form fix.
1499
  * Fixed spelling in settings
1500
  * Added "Delete from the list" button in comments spam check page
1501
  * Minor fixes.
1502
+
1503
  = 5.46 August 17 2016 =
1504
  * Fixed issue with admin bar links in WP Multi Network mode.
1505
  * Added "All time counter" and "Daily counter" into admin bar.
1508
 
1509
  = 5.45.2 August 4 2016 =
1510
  * Added Anti-Spam protection for Quick Event Manager.
1511
+ * Improved bulk spam test for users. Now the plugin does not mark as Spam user, if the user IP address has spam activity more than 30 days ago.
1512
  * Fixed bulk spam test for comments. Previous version had a conflict between spam history for IP and Email.
1513
  * Minor fix function to get the API key.
1514
 
1515
  = 5.45.1 July 26 2016 =
1516
  * Fixed issue with missed spam messages, subscriptions.
1517
+ * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more than 30 days ago.
1518
 
1519
  = 5.45 July 21 2016 =
1520
+ * Optimized bulk spam comments deletion.
1521
  * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
1522
  * Added links to bulk spam comments&users removal tool.
1523
 
1524
  = 5.44.1 July 13 2016 =
1525
  * Optimized options getting code.
1526
+ * Added the option 'Protect Logged in users' to do anti-spam tests for submissions by logged in users.
1527
 
1528
  = 5.43.2 June 30 2016 =
1529
+ * Optimized anti-spam code for AJAX based contact forms.
1530
+ * Fixed CSS layout of counters in Admin bar (issue with layout in IE11).
1531
 
1532
  = 5.43.1 June 23 2016 =
1533
  * Added agent version in requests to test a connection between the website and servers.
1534
  * Fixed issue with PHP notices in cleantalk-admin.php.
1535
 
1536
  = 5.43 June 22 2016 =
1537
+ * Added spam protection for registrations via 'Login with AJAX' plug-in.
1538
  * Added a new counter to Admin bar that allows to count spam and approved submissions since last reset.
1539
  * Update the code that tests a connection between a website and CleanTalk's servers. New version doesn't generate submissions with email good@cleantalk.org.
1540
+ * Fixed issue with spam protection for nested forms by Formidable plug-in.
1541
 
1542
  = 5.42 2016-06-15 =
1543
  * Added anti-spam protection for UserPro.
1548
  * Minor fixes in plugin backend.
1549
 
1550
  = 5.41 2016-05-31 =
1551
+ * Added HTTP response in plugin response if an network issue was happend.
1552
  * Optimized JavaScript anti-spam test for Formidable forms.
1553
  * Re-stored the option to auto redirect to plugn settings after plugin activation.
1554
+ * Updated Spanish, Russian translations.
1555
  * Fixed issue with nasted fields in Formidable forms.
1556
 
1557
  = 5.40.3 2016-05-26 =
1558
+ * Added option to encrypt (SSL) connection to CleanTalk anti-spam servers.
1559
+ * Added JSON encoding for AJAX forms.
1560
+ * Obfuscated private data for Custom contact forms option.
1561
  * Optimized bulk users check for spam over blacklists database.
1562
+ * Fixed issue with lost connection to servers and JavaScript anti-spam test.
1563
+ * Fixed issue with WordFence and collect_details.
1564
 
1565
  = 5.40.2 2016-05-11 =
1566
  * Improved account status check logic.
1584
  * Improved AJAX based anti-spam test with HTTPS backends.
1585
  * Added fix to avoid issue with empty ct_info_flag on JavaScript side.
1586
  * Added logic to exclude caching for Spam FireWall.
1587
+ * Removed a condition to skip accounts with 127.0.0.1 IP in spam test for registered acconts.
1588
 
1589
  = 5.38.1 2016-03-24 =
1590
  * Fixed issue with PHP sessions and 'The session id is too long or contains illegal characters'.
1596
  * Fixed bug with broken MailPoet previews.
1597
  * Fixed bug with broken Geo My WP pop-up windows.
1598
  * Fixed issue with mb_convert_encoding() function.
1599
+ * Removed double JavaScript code in front-end.
1600
+ * Removed unused variables in anti spam logic.
1601
  * Added option 'Set cookies' (turned on by default). If the option turned off, the plugin will not generate cookies, but in this case plugin will not protect some rarely used contact forms. Any way, turn this option off be compatible with Varnish in spam protection for WordPress core comments, registrations and most popular contact forms.
1602
  * Added anti-spam protection for Gravity forms via option 'Contact forms' with hook gform_entry_is_spam().
1603
 
1604
  = 5.36.1 2016-02-05 =
1605
  * Fixed bug, when users receive error after logging in
1606
+ * Improve anti-spam filters for contact forms.
1607
+
1608
  = 5.36 2016-02-04 =
1609
  * Improved JavaScript anti spam protection
1610
  * Improvements for avoiding blocking requests from payment systems
1611
+
1612
  = 5.35 2016-01-14 =
1613
+ * Added support for IP licensing
1614
  * Some anti-spam protection improvements
1615
  * Small backend interface fixes
1616
 
1617
  = 5.34.1 2015-12-17 =
1618
  * Fixed trackback antispam protection: improved checking mechanism
1619
  * Fixed problem with blocking MailPoet: added exclusions in spam checking algorithm
1620
+
1621
  = 5.34 2015-12-10 =
1622
  * Improved spam checking mechanism
1623
  * Added "Collect browser details" option for better antispam protection
1624
  * Fixed custom contact forms checking for AJAX requests
1625
  * Minor translations fixes
1626
+
1627
  = 5.33.1 2015-12-04 =
1628
  * Fixed issue with BBPress: restored old user permission checking mechanism
1629
  * Fixed anti-spam comments checking: sometimes get_comments returned wrong comments number
1634
  * Backend interface fixes
1635
  * Improved Spam FireWall efficiency
1636
  * Improved performance of anti spam checking
1637
+
1638
  = 5.32 2015-11-26 =
1639
  * Added improvements for manual spam detection
1640
  * Fixed errors in backend
1641
  * Fixed bulk users anti spam checking
1642
  * Added indicator for bulk spam checking
1643
+ * Added "Get access key automatically" button
1644
+
1645
  = 5.31 2015-11-11 =
1646
  * Improved backend performance
1647
  * Fixed counter of approved/blocked spam attacks
1665
  = 5.28 2015-10-16 =
1666
  * Fixed errors in anti-spam checking
1667
  * Restored options for spam checking registrations and cpmmon contact forms
1668
+ * Improved spam protection
1669
  * Fixed problems with AJAX functionality in MailPoet, WooCommerce and other AJAX plugins
1670
 
1671
  = 5.27 2015-10-13 =