Version Description
Oct 08 2020 = * Fix: Visible fields JS error fixed.
Download this release
Release Info
Developer | glomberg |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.147.1 |
Comparing to | |
See all releases |
Code changes from version 5.147 to 5.147.1
- cleantalk.php +1 -1
- js/apbct-public.min.js +1 -1
- js/apbct-public.min.js.map +1 -1
- readme.txt +4 -1
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.147
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: https://cleantalk.org
|
9 |
Text Domain: cleantalk-spam-protect
|
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.147.1
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: https://cleantalk.org
|
9 |
Text Domain: cleantalk-spam-protect
|
js/apbct-public.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function ctSetCookie(e,t){document.cookie=e+"="+encodeURIComponent(t)+"; path=/; samesite=lax"}function apbct_collect_visible_fields(e){var t=[],o="",n=0,i=[];for(var a in e.elements)isNaN(+a)||(t[a]=e.elements[a]);return(t=t.filter(function(e){return"none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")&&"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&-1===i.indexOf(e.getAttribute("name"))&&(n++,-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(i.push(e.getAttribute("name")),!1))})).forEach(function(e,t,n){o+=" "+e.getAttribute("name")}),{visible_fields:o=o.trim(),visible_fields_count:n}}function apbct_visible_fields_set_cookie(e){var t="object"==typeof e&&null!==e?e:{};ctSetCookie("apbct_visible_fields",JSON.stringify(t))}function apbct_js_keys__set_input_value(e,t,n,o){var i;null!==document.getElementById(n.input_name)&&(i=document.getElementById(n.input_name).value,document.getElementById(n.input_name).value=document.getElementById(n.input_name).value.replace(i,e.js_key))}function apbct_public_sendAJAX(t,n,o){var i=n.callback||null,a=n.callback_context||null,c=n.callback_params||null,e=n.async||!0,l=n.notJson||null,s=n.timeout||15e3,o=o||null,r=n.button||null,u=n.spinner||null,p=n.progressbar||null,d=n.silent||null,m=n.no_nonce||null;"string"==typeof t?(m||(t=t+"&_ajax_nonce="+ctPublic._ajax_nonce),t=t+"&no_cache="+Math.random()):(m||(t._ajax_nonce=ctPublic._ajax_nonce),t.no_cache=Math.random()),r&&(r.setAttribute("disabled","disabled"),r.style.cursor="not-allowed"),u&&jQuery(u).css("display","inline"),jQuery.ajax({type:"POST",url:ctPublic._ajax_url,data:t,async:e,success:function(e){r&&(r.removeAttribute("disabled"),r.style.cursor="pointer"),u&&jQuery(u).css("display","none"),l||(e=JSON.parse(e)),e.error?(setTimeout(function(){p&&p.fadeOut("slow")},1e3),alert("Error happens: "+(e.error||"Unkown"))):i&&(c?i.apply(a,c.concat(e,t,n,o)):i(e,t,n,o))},error:function(e,t,n){r&&(r.removeAttribute("disabled"),r.style.cursor="pointer"),u&&jQuery(u).css("display","none"),n&&!d&&(console.log("APBCT_AJAX_ERROR"),console.log(e),console.log(t),console.log("Anti-spam by Cleantalk plugin error: "+n+"Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/"),alert("Anti-spam by Cleantalk plugin error: "+n+"Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/"))},timeout:s})}!function(){var e=new Date,t=(new Date).getTime(),n=!0,o=[],i=0;function a(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)}ctSetCookie("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),ctSetCookie("ct_fkp_timestamp","0"),ctSetCookie("ct_pointer_data","0"),ctSetCookie("ct_timezone","0"),setTimeout(function(){ctSetCookie("ct_timezone",e.getTimezoneOffset()/60*-1)},1e3);var l=function(){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),c(window,"mousedown",l),c(window,"keydown",l)},s=setInterval(function(){n=!0},150),r=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(o))},1200),u=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",u),clearInterval(s),clearInterval(r)))};a(window,"mousemove",u),a(window,"mousedown",l),a(window,"keydown",l),a(window,"DOMContentLoaded",function(){ctSetCookie("apbct_visible_fields",0),setTimeout(function(){for(var e={},t=0;t<document.forms.length;t++){var n=document.forms[t];n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"==n.id||(e[t]=apbct_collect_visible_fields(n),n.onsubmit_prev=n.onsubmit,n.onsubmit=function(e){
|
2 |
//# sourceMappingURL=apbct-public.min.js.map
|
1 |
+
function ctSetCookie(e,t){document.cookie=e+"="+encodeURIComponent(t)+"; path=/; samesite=lax"}function apbct_collect_visible_fields(e){var t=[],o="",n=0,i=[];for(var a in e.elements)isNaN(+a)||(t[a]=e.elements[a]);return(t=t.filter(function(e){return"none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")&&"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&-1===i.indexOf(e.getAttribute("name"))&&(n++,-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(i.push(e.getAttribute("name")),!1))})).forEach(function(e,t,n){o+=" "+e.getAttribute("name")}),{visible_fields:o=o.trim(),visible_fields_count:n}}function apbct_visible_fields_set_cookie(e){var t="object"==typeof e&&null!==e?e:{};ctSetCookie("apbct_visible_fields",JSON.stringify(t))}function apbct_js_keys__set_input_value(e,t,n,o){var i;null!==document.getElementById(n.input_name)&&(i=document.getElementById(n.input_name).value,document.getElementById(n.input_name).value=document.getElementById(n.input_name).value.replace(i,e.js_key))}function apbct_public_sendAJAX(t,n,o){var i=n.callback||null,a=n.callback_context||null,c=n.callback_params||null,e=n.async||!0,l=n.notJson||null,s=n.timeout||15e3,o=o||null,r=n.button||null,u=n.spinner||null,p=n.progressbar||null,d=n.silent||null,m=n.no_nonce||null;"string"==typeof t?(m||(t=t+"&_ajax_nonce="+ctPublic._ajax_nonce),t=t+"&no_cache="+Math.random()):(m||(t._ajax_nonce=ctPublic._ajax_nonce),t.no_cache=Math.random()),r&&(r.setAttribute("disabled","disabled"),r.style.cursor="not-allowed"),u&&jQuery(u).css("display","inline"),jQuery.ajax({type:"POST",url:ctPublic._ajax_url,data:t,async:e,success:function(e){r&&(r.removeAttribute("disabled"),r.style.cursor="pointer"),u&&jQuery(u).css("display","none"),l||(e=JSON.parse(e)),e.error?(setTimeout(function(){p&&p.fadeOut("slow")},1e3),alert("Error happens: "+(e.error||"Unkown"))):i&&(c?i.apply(a,c.concat(e,t,n,o)):i(e,t,n,o))},error:function(e,t,n){r&&(r.removeAttribute("disabled"),r.style.cursor="pointer"),u&&jQuery(u).css("display","none"),n&&!d&&(console.log("APBCT_AJAX_ERROR"),console.log(e),console.log(t),console.log("Anti-spam by Cleantalk plugin error: "+n+"Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/"),alert("Anti-spam by Cleantalk plugin error: "+n+"Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/"))},timeout:s})}!function(){var e=new Date,t=(new Date).getTime(),n=!0,o=[],i=0;function a(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)}ctSetCookie("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),ctSetCookie("ct_fkp_timestamp","0"),ctSetCookie("ct_pointer_data","0"),ctSetCookie("ct_timezone","0"),setTimeout(function(){ctSetCookie("ct_timezone",e.getTimezoneOffset()/60*-1)},1e3);var l=function(){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),c(window,"mousedown",l),c(window,"keydown",l)},s=setInterval(function(){n=!0},150),r=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(o))},1200),u=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",u),clearInterval(s),clearInterval(r)))};a(window,"mousemove",u),a(window,"mousedown",l),a(window,"keydown",l),a(window,"DOMContentLoaded",function(){ctSetCookie("apbct_visible_fields",0),setTimeout(function(){for(var e={},t=0;t<document.forms.length;t++){var n=document.forms[t];n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"==n.id||(e[t]=apbct_collect_visible_fields(n),n.onsubmit_prev=n.onsubmit,n.onsubmit=function(e){var t={};t[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(t),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}apbct_visible_fields_set_cookie(e)},1e3)})}(),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(e,t,n){var o;!t.responseText||-1===t.responseText.indexOf('"apbct')||void 0!==(o=JSON.parse(t.responseText)).apbct&&(o=o.apbct).blocked&&(alert(o.comment),1==+o.stop_script&&window.stop())});
|
2 |
//# sourceMappingURL=apbct-public.min.js.map
|
js/apbct-public.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"apbct-public.min.js","sources":["apbct-public.js"],"sourcesContent":["(function() {\r\n\r\n\tvar ct_date = new Date(),\r\n\t\tctTimeMs = new Date().getTime(),\r\n\t\tctMouseEventTimerFlag = true, //Reading interval flag\r\n\t\tctMouseData = [],\r\n\t\tctMouseDataCounter = 0;\r\n\r\n\tfunction apbct_attach_event_handler(elem, event, callback){\r\n\t\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\r\n\t\telse elem.attachEvent(event, callback);\r\n\t}\r\n\r\n\tfunction apbct_remove_event_handler(elem, event, callback){\r\n\t\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\r\n\t\telse elem.detachEvent(event, callback);\r\n\t}\r\n\r\n\tctSetCookie(\"ct_ps_timestamp\", Math.floor(new Date().getTime()/1000));\r\n\tctSetCookie(\"ct_fkp_timestamp\", \"0\");\r\n\tctSetCookie(\"ct_pointer_data\", \"0\");\r\n\tctSetCookie(\"ct_timezone\", \"0\");\r\n\r\n\tsetTimeout(function(){\r\n\t\tctSetCookie(\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1));\r\n\t},1000);\r\n\r\n\t//Writing first key press timestamp\r\n\tvar ctFunctionFirstKey = function output(event){\r\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\r\n\t\tctSetCookie(\"ct_fkp_timestamp\", KeyTimestamp);\r\n\t\tctKeyStopStopListening();\r\n\t};\r\n\r\n\t//Reading interval\r\n\tvar ctMouseReadInterval = setInterval(function(){\r\n\t\tctMouseEventTimerFlag = true;\r\n\t}, 150);\r\n\r\n\t//Writting interval\r\n\tvar ctMouseWriteDataInterval = setInterval(function(){\r\n\t\tctSetCookie(\"ct_pointer_data\", JSON.stringify(ctMouseData));\r\n\t}, 1200);\r\n\r\n\t//Logging mouse position each 150 ms\r\n\tvar ctFunctionMouseMove = function output(event){\r\n\t\tif(ctMouseEventTimerFlag === true){\r\n\r\n\t\t\tctMouseData.push([\r\n\t\t\t\tMath.round(event.clientY),\r\n\t\t\t\tMath.round(event.clientX),\r\n\t\t\t\tMath.round(new Date().getTime() - ctTimeMs)\r\n\t\t\t]);\r\n\r\n\t\t\tctMouseDataCounter++;\r\n\t\t\tctMouseEventTimerFlag = false;\r\n\t\t\tif(ctMouseDataCounter >= 50){\r\n\t\t\t\tctMouseStopData();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t//Stop mouse observing function\r\n\tfunction ctMouseStopData(){\r\n\t\tapbct_remove_event_handler(window, \"mousemove\", ctFunctionMouseMove);\r\n\t\tclearInterval(ctMouseReadInterval);\r\n\t\tclearInterval(ctMouseWriteDataInterval);\r\n\t}\r\n\r\n\t//Stop key listening function\r\n\tfunction ctKeyStopStopListening(){\r\n\t\tapbct_remove_event_handler(window, \"mousedown\", ctFunctionFirstKey);\r\n\t\tapbct_remove_event_handler(window, \"keydown\", ctFunctionFirstKey);\r\n\t}\r\n\r\n\tapbct_attach_event_handler(window, \"mousemove\", ctFunctionMouseMove);\r\n\tapbct_attach_event_handler(window, \"mousedown\", ctFunctionFirstKey);\r\n\tapbct_attach_event_handler(window, \"keydown\", ctFunctionFirstKey);\r\n\r\n\t// Ready function\r\n\tfunction apbct_ready(){\r\n\r\n\t\tctSetCookie(\"apbct_visible_fields\", 0);\r\n\r\n\t\tsetTimeout(function(){\r\n\r\n\t\t\tvar visible_fields_collection = {};\r\n\r\n\t\t\tfor(var i = 0; i < document.forms.length; i++){\r\n\t\t\t\tvar form = document.forms[i];\r\n\r\n\t\t\t\t//Exclusion for forms\r\n\t\t\t\tif (\r\n\t\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\r\n\t\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\r\n\t\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\r\n\t\t\t\t\t(form.id && form.id == 'caspioform') //Caspio Form\r\n\t\t\t\t)\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tvisible_fields_collection[i] = apbct_collect_visible_fields( form );\r\n\r\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\r\n\t\t\t\tform.onsubmit = function (event) {\r\n\r\n\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\r\n\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields );\r\n\r\n\t\t\t\t\t// Call previous submit action\r\n\t\t\t\t\tif (event.target.onsubmit_prev instanceof Function) {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\r\n\t\t\t\t\t\t}, 500);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tapbct_visible_fields_set_cookie( visible_fields_collection );\r\n\r\n\t\t}, 1000);\r\n\t}\r\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\r\n\r\n}());\r\n\r\nfunction ctSetCookie(c_name, value) {\r\n\tdocument.cookie = c_name + \"=\" + encodeURIComponent(value) + \"; path=/; samesite=lax\";\r\n}\r\n\r\nfunction apbct_collect_visible_fields( form ) {\r\n\r\n\t// Get only fields\r\n\tvar inputs = [],\r\n\t\tinputs_visible = '',\r\n\t\tinputs_visible_count = 0,\r\n\t\tinputs_with_duplicate_names = [];\r\n\r\n\tfor(var key in form.elements){\r\n\t\tif(!isNaN(+key))\r\n\t\t\tinputs[key] = form.elements[key];\r\n\t}\r\n\r\n\t// Filter fields\r\n\tinputs = inputs.filter(function(elem){\r\n\r\n\t\t// Filter fields\r\n\t\tif( getComputedStyle(elem).display === \"none\" || // hidden\r\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\r\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\r\n\t\t\telem.getAttribute(\"type\") === \"hidden\" || // type == hidden\r\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\r\n\t\t\t//elem.value === \"\" || // empty value\r\n\t\t\telem.getAttribute('name') === null ||\r\n\t\t\tinputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 // name already added\r\n\t\t){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Visible fields count\r\n\t\tinputs_visible_count++;\r\n\r\n\t\t// Filter inputs with same names for type == radio\r\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\r\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\t// Visible fields\r\n\tinputs.forEach(function(elem, i, elements){\r\n\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\r\n\t});\r\n\tinputs_visible = inputs_visible.trim();\r\n\r\n\treturn {\r\n\t\tvisible_fields : inputs_visible,\r\n\t\tvisible_fields_count : inputs_visible_count,\r\n\t}\r\n\r\n}\r\n\r\nfunction apbct_visible_fields_set_cookie( visible_fields_collection ) {\r\n\r\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\r\n\r\n\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\r\n\r\n}\r\n\r\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\r\n\tif (document.getElementById(params.input_name) !== null) {\r\n\t\tvar ct_input_value = document.getElementById(params.input_name).value;\r\n\t\tdocument.getElementById(params.input_name).value = document.getElementById(params.input_name).value.replace(ct_input_value, result.js_key);\r\n\t}\r\n}\r\nfunction apbct_public_sendAJAX(data, params, obj){\r\n\r\n\t// Default params\r\n\tvar callback = params.callback || null;\r\n\tvar callback_context = params.callback_context || null;\r\n\tvar callback_params = params.callback_params || null;\r\n\tvar async = params.async || true;\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\tvar silent = params.silent || null;\r\n\tvar no_nonce = params.no_nonce || null;\r\n\r\n\tif(typeof (data) === 'string') {\r\n\t\tif( ! no_nonce )\r\n\t\t\tdata = data + '&_ajax_nonce=' + ctPublic._ajax_nonce;\r\n\t\tdata = data + '&no_cache=' + Math.random()\r\n\t} else {\r\n\t\tif( ! no_nonce )\r\n\t\t\tdata._ajax_nonce = ctPublic._ajax_nonce;\r\n\t\tdata.no_cache = Math.random();\r\n\t}\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\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ctPublic._ajax_url,\r\n\t\tdata: data,\r\n\t\tasync: async,\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\tif (callback_params)\r\n\t\t\t\t\t\tcallback.apply( callback_context, callback_params.concat( result, data, params, obj ) );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcallback(result, data, params, obj);\r\n\t\t\t\t}\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\tif( errorThrown && ! silent ) {\r\n\t\t\t\tconsole.log('APBCT_AJAX_ERROR');\r\n\t\t\t\tconsole.log(jqXHR);\r\n\t\t\t\tconsole.log(textStatus);\r\n\t\t\t\tconsole.log('Anti-spam by Cleantalk plugin error: ' + errorThrown + 'Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/');\r\n\t\t\t\talert('Anti-spam by Cleantalk plugin error: ' + errorThrown + 'Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/');\r\n\t\t\t}\r\n\t\t},\r\n\t\ttimeout: timeout,\r\n\t});\r\n}\r\nif(typeof jQuery !== 'undefined') {\r\n\r\n\t// Capturing responses and output block message for unknown AJAX forms\r\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\r\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\r\n\t\t\tvar response = JSON.parse(xhr.responseText);\r\n\t\t\tif (typeof response.apbct !== 'undefined') {\r\n\t\t\t\tresponse = response.apbct;\r\n\t\t\t\tif (response.blocked) {\r\n\t\t\t\t\talert(response.comment);\r\n\t\t\t\t\tif(+response.stop_script == 1)\r\n\t\t\t\t\t\twindow.stop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}"],"names":["ctSetCookie","c_name","value","document","cookie","encodeURIComponent","apbct_collect_visible_fields","form","inputs","inputs_visible","inputs_visible_count","inputs_with_duplicate_names","key","elements","isNaN","filter","elem","getComputedStyle","display","visibility","opacity","getAttribute","indexOf","push","forEach","i","visible_fields","trim","visible_fields_count","apbct_visible_fields_set_cookie","visible_fields_collection","collection","JSON","stringify","apbct_js_keys__set_input_value","result","data","params","obj","ct_input_value","getElementById","input_name","replace","js_key","apbct_public_sendAJAX","callback","callback_context","callback_params","async","notJson","timeout","button","spinner","progressbar","silent","no_nonce","ctPublic","_ajax_nonce","Math","random","no_cache","setAttribute","style","cursor","jQuery","css","ajax","type","url","_ajax_url","success","removeAttribute","parse","error","setTimeout","fadeOut","alert","apply","concat","jqXHR","textStatus","errorThrown","console","log","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","apbct_attach_event_handler","event","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","floor","getTimezoneOffset","ctFunctionFirstKey","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","ctFunctionMouseMove","round","clientY","clientX","clearInterval","forms","length","classList","contains","parentElement","action","toString","id","onsubmit_prev","onsubmit","this","target","Function","call","ajaxComplete","xhr","settings","response","responseText","apbct","blocked","comment","stop_script","stop"],"mappings":"AA6HA,SAASA,YAAYC,EAAQC,GAC5BC,SAASC,OAASH,EAAS,IAAMI,mBAAmBH,GAAS,yBAG9D,SAASI,6BAA8BC,GAGtC,IAAIC,EAAS,GACZC,EAAiB,GACjBC,EAAuB,EACvBC,EAA8B,GAE/B,IAAI,IAAIC,KAAOL,EAAKM,SACfC,OAAOF,KACVJ,EAAOI,GAAOL,EAAKM,SAASD,IAqC9B,OAjCAJ,EAASA,EAAOO,OAAO,SAASC,GAG/B,MAA0C,SAAtCC,iBAAiBD,GAAME,SACY,WAAtCD,iBAAiBD,GAAMG,YACe,MAAtCF,iBAAiBD,GAAMI,SACe,WAAtCJ,EAAKK,aAAa,SACoB,WAAtCL,EAAKK,aAAa,SAEoB,OAAtCL,EAAKK,aAAa,UACoD,IAAtEV,EAA4BW,QAASN,EAAKK,aAAa,WAMxDX,KAGK,IAAM,CAAC,QAAS,YAAYY,QAASN,EAAKK,aAAa,WAC3DV,EAA4BY,KAAMP,EAAKK,aAAa,UAC7C,OAOFG,QAAQ,SAASR,EAAMS,EAAGZ,GAChCJ,GAAkB,IAAMO,EAAKK,aAAa,UAIpC,CACNK,eAHDjB,EAAiBA,EAAekB,OAI/BC,qBAAuBlB,GAKzB,SAASmB,gCAAiCC,GAEzC,IAAIC,EAAkD,iBAA9BD,GAAwE,OAA9BA,EAAsCA,EAA4B,GAEpI9B,YAAY,uBAAwBgC,KAAKC,UAAWF,IAIrD,SAASG,+BAA+BC,EAAQC,EAAMC,EAAQC,GAC7D,IACKC,EAD8C,OAA/CpC,SAASqC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OwC"}
|
1 |
+
{"version":3,"file":"apbct-public.min.js","sources":["apbct-public.js"],"sourcesContent":["(function() {\r\n\r\n\tvar ct_date = new Date(),\r\n\t\tctTimeMs = new Date().getTime(),\r\n\t\tctMouseEventTimerFlag = true, //Reading interval flag\r\n\t\tctMouseData = [],\r\n\t\tctMouseDataCounter = 0;\r\n\r\n\tfunction apbct_attach_event_handler(elem, event, callback){\r\n\t\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\r\n\t\telse elem.attachEvent(event, callback);\r\n\t}\r\n\r\n\tfunction apbct_remove_event_handler(elem, event, callback){\r\n\t\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\r\n\t\telse elem.detachEvent(event, callback);\r\n\t}\r\n\r\n\tctSetCookie(\"ct_ps_timestamp\", Math.floor(new Date().getTime()/1000));\r\n\tctSetCookie(\"ct_fkp_timestamp\", \"0\");\r\n\tctSetCookie(\"ct_pointer_data\", \"0\");\r\n\tctSetCookie(\"ct_timezone\", \"0\");\r\n\r\n\tsetTimeout(function(){\r\n\t\tctSetCookie(\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1));\r\n\t},1000);\r\n\r\n\t//Writing first key press timestamp\r\n\tvar ctFunctionFirstKey = function output(event){\r\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\r\n\t\tctSetCookie(\"ct_fkp_timestamp\", KeyTimestamp);\r\n\t\tctKeyStopStopListening();\r\n\t};\r\n\r\n\t//Reading interval\r\n\tvar ctMouseReadInterval = setInterval(function(){\r\n\t\tctMouseEventTimerFlag = true;\r\n\t}, 150);\r\n\r\n\t//Writting interval\r\n\tvar ctMouseWriteDataInterval = setInterval(function(){\r\n\t\tctSetCookie(\"ct_pointer_data\", JSON.stringify(ctMouseData));\r\n\t}, 1200);\r\n\r\n\t//Logging mouse position each 150 ms\r\n\tvar ctFunctionMouseMove = function output(event){\r\n\t\tif(ctMouseEventTimerFlag === true){\r\n\r\n\t\t\tctMouseData.push([\r\n\t\t\t\tMath.round(event.clientY),\r\n\t\t\t\tMath.round(event.clientX),\r\n\t\t\t\tMath.round(new Date().getTime() - ctTimeMs)\r\n\t\t\t]);\r\n\r\n\t\t\tctMouseDataCounter++;\r\n\t\t\tctMouseEventTimerFlag = false;\r\n\t\t\tif(ctMouseDataCounter >= 50){\r\n\t\t\t\tctMouseStopData();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t//Stop mouse observing function\r\n\tfunction ctMouseStopData(){\r\n\t\tapbct_remove_event_handler(window, \"mousemove\", ctFunctionMouseMove);\r\n\t\tclearInterval(ctMouseReadInterval);\r\n\t\tclearInterval(ctMouseWriteDataInterval);\r\n\t}\r\n\r\n\t//Stop key listening function\r\n\tfunction ctKeyStopStopListening(){\r\n\t\tapbct_remove_event_handler(window, \"mousedown\", ctFunctionFirstKey);\r\n\t\tapbct_remove_event_handler(window, \"keydown\", ctFunctionFirstKey);\r\n\t}\r\n\r\n\tapbct_attach_event_handler(window, \"mousemove\", ctFunctionMouseMove);\r\n\tapbct_attach_event_handler(window, \"mousedown\", ctFunctionFirstKey);\r\n\tapbct_attach_event_handler(window, \"keydown\", ctFunctionFirstKey);\r\n\r\n\t// Ready function\r\n\tfunction apbct_ready(){\r\n\r\n\t\tctSetCookie(\"apbct_visible_fields\", 0);\r\n\r\n\t\tsetTimeout(function(){\r\n\r\n\t\t\tvar visible_fields_collection = {};\r\n\r\n\t\t\tfor(var i = 0; i < document.forms.length; i++){\r\n\t\t\t\tvar form = document.forms[i];\r\n\r\n\t\t\t\t//Exclusion for forms\r\n\t\t\t\tif (\r\n\t\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\r\n\t\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\r\n\t\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\r\n\t\t\t\t\t(form.id && form.id == 'caspioform') //Caspio Form\r\n\t\t\t\t)\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tvisible_fields_collection[i] = apbct_collect_visible_fields( form );\r\n\r\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\r\n\t\t\t\tform.onsubmit = function (event) {\r\n\r\n\t\t\t\t\tvar visible_fields = {};\r\n\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\r\n\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields );\r\n\r\n\t\t\t\t\t// Call previous submit action\r\n\t\t\t\t\tif (event.target.onsubmit_prev instanceof Function) {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\r\n\t\t\t\t\t\t}, 500);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tapbct_visible_fields_set_cookie( visible_fields_collection );\r\n\r\n\t\t}, 1000);\r\n\t}\r\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\r\n\r\n}());\r\n\r\nfunction ctSetCookie(c_name, value) {\r\n\tdocument.cookie = c_name + \"=\" + encodeURIComponent(value) + \"; path=/; samesite=lax\";\r\n}\r\n\r\nfunction apbct_collect_visible_fields( form ) {\r\n\r\n\t// Get only fields\r\n\tvar inputs = [],\r\n\t\tinputs_visible = '',\r\n\t\tinputs_visible_count = 0,\r\n\t\tinputs_with_duplicate_names = [];\r\n\r\n\tfor(var key in form.elements){\r\n\t\tif(!isNaN(+key))\r\n\t\t\tinputs[key] = form.elements[key];\r\n\t}\r\n\r\n\t// Filter fields\r\n\tinputs = inputs.filter(function(elem){\r\n\r\n\t\t// Filter fields\r\n\t\tif( getComputedStyle(elem).display === \"none\" || // hidden\r\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\r\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\r\n\t\t\telem.getAttribute(\"type\") === \"hidden\" || // type == hidden\r\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\r\n\t\t\t//elem.value === \"\" || // empty value\r\n\t\t\telem.getAttribute('name') === null ||\r\n\t\t\tinputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 // name already added\r\n\t\t){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Visible fields count\r\n\t\tinputs_visible_count++;\r\n\r\n\t\t// Filter inputs with same names for type == radio\r\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\r\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\t// Visible fields\r\n\tinputs.forEach(function(elem, i, elements){\r\n\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\r\n\t});\r\n\tinputs_visible = inputs_visible.trim();\r\n\r\n\treturn {\r\n\t\tvisible_fields : inputs_visible,\r\n\t\tvisible_fields_count : inputs_visible_count,\r\n\t}\r\n\r\n}\r\n\r\nfunction apbct_visible_fields_set_cookie( visible_fields_collection ) {\r\n\r\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\r\n\r\n\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\r\n\r\n}\r\n\r\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\r\n\tif (document.getElementById(params.input_name) !== null) {\r\n\t\tvar ct_input_value = document.getElementById(params.input_name).value;\r\n\t\tdocument.getElementById(params.input_name).value = document.getElementById(params.input_name).value.replace(ct_input_value, result.js_key);\r\n\t}\r\n}\r\nfunction apbct_public_sendAJAX(data, params, obj){\r\n\r\n\t// Default params\r\n\tvar callback = params.callback || null;\r\n\tvar callback_context = params.callback_context || null;\r\n\tvar callback_params = params.callback_params || null;\r\n\tvar async = params.async || true;\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\tvar silent = params.silent || null;\r\n\tvar no_nonce = params.no_nonce || null;\r\n\r\n\tif(typeof (data) === 'string') {\r\n\t\tif( ! no_nonce )\r\n\t\t\tdata = data + '&_ajax_nonce=' + ctPublic._ajax_nonce;\r\n\t\tdata = data + '&no_cache=' + Math.random()\r\n\t} else {\r\n\t\tif( ! no_nonce )\r\n\t\t\tdata._ajax_nonce = ctPublic._ajax_nonce;\r\n\t\tdata.no_cache = Math.random();\r\n\t}\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\tjQuery.ajax({\r\n\t\ttype: \"POST\",\r\n\t\turl: ctPublic._ajax_url,\r\n\t\tdata: data,\r\n\t\tasync: async,\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\tif (callback_params)\r\n\t\t\t\t\t\tcallback.apply( callback_context, callback_params.concat( result, data, params, obj ) );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcallback(result, data, params, obj);\r\n\t\t\t\t}\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\tif( errorThrown && ! silent ) {\r\n\t\t\t\tconsole.log('APBCT_AJAX_ERROR');\r\n\t\t\t\tconsole.log(jqXHR);\r\n\t\t\t\tconsole.log(textStatus);\r\n\t\t\t\tconsole.log('Anti-spam by Cleantalk plugin error: ' + errorThrown + 'Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/');\r\n\t\t\t\talert('Anti-spam by Cleantalk plugin error: ' + errorThrown + 'Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/');\r\n\t\t\t}\r\n\t\t},\r\n\t\ttimeout: timeout,\r\n\t});\r\n}\r\nif(typeof jQuery !== 'undefined') {\r\n\r\n\t// Capturing responses and output block message for unknown AJAX forms\r\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\r\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\r\n\t\t\tvar response = JSON.parse(xhr.responseText);\r\n\t\t\tif (typeof response.apbct !== 'undefined') {\r\n\t\t\t\tresponse = response.apbct;\r\n\t\t\t\tif (response.blocked) {\r\n\t\t\t\t\talert(response.comment);\r\n\t\t\t\t\tif(+response.stop_script == 1)\r\n\t\t\t\t\t\twindow.stop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}"],"names":["ctSetCookie","c_name","value","document","cookie","encodeURIComponent","apbct_collect_visible_fields","form","inputs","inputs_visible","inputs_visible_count","inputs_with_duplicate_names","key","elements","isNaN","filter","elem","getComputedStyle","display","visibility","opacity","getAttribute","indexOf","push","forEach","i","visible_fields","trim","visible_fields_count","apbct_visible_fields_set_cookie","visible_fields_collection","collection","JSON","stringify","apbct_js_keys__set_input_value","result","data","params","obj","ct_input_value","getElementById","input_name","replace","js_key","apbct_public_sendAJAX","callback","callback_context","callback_params","async","notJson","timeout","button","spinner","progressbar","silent","no_nonce","ctPublic","_ajax_nonce","Math","random","no_cache","setAttribute","style","cursor","jQuery","css","ajax","type","url","_ajax_url","success","removeAttribute","parse","error","setTimeout","fadeOut","alert","apply","concat","jqXHR","textStatus","errorThrown","console","log","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","apbct_attach_event_handler","event","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","floor","getTimezoneOffset","ctFunctionFirstKey","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","ctFunctionMouseMove","round","clientY","clientX","clearInterval","forms","length","classList","contains","parentElement","action","toString","id","onsubmit_prev","onsubmit","this","target","Function","call","ajaxComplete","xhr","settings","response","responseText","apbct","blocked","comment","stop_script","stop"],"mappings":"AA8HA,SAASA,YAAYC,EAAQC,GAC5BC,SAASC,OAASH,EAAS,IAAMI,mBAAmBH,GAAS,yBAG9D,SAASI,6BAA8BC,GAGtC,IAAIC,EAAS,GACZC,EAAiB,GACjBC,EAAuB,EACvBC,EAA8B,GAE/B,IAAI,IAAIC,KAAOL,EAAKM,SACfC,OAAOF,KACVJ,EAAOI,GAAOL,EAAKM,SAASD,IAqC9B,OAjCAJ,EAASA,EAAOO,OAAO,SAASC,GAG/B,MAA0C,SAAtCC,iBAAiBD,GAAME,SACY,WAAtCD,iBAAiBD,GAAMG,YACe,MAAtCF,iBAAiBD,GAAMI,SACe,WAAtCJ,EAAKK,aAAa,SACoB,WAAtCL,EAAKK,aAAa,SAEoB,OAAtCL,EAAKK,aAAa,UACoD,IAAtEV,EAA4BW,QAASN,EAAKK,aAAa,WAMxDX,KAGK,IAAM,CAAC,QAAS,YAAYY,QAASN,EAAKK,aAAa,WAC3DV,EAA4BY,KAAMP,EAAKK,aAAa,UAC7C,OAOFG,QAAQ,SAASR,EAAMS,EAAGZ,GAChCJ,GAAkB,IAAMO,EAAKK,aAAa,UAIpC,CACNK,eAHDjB,EAAiBA,EAAekB,OAI/BC,qBAAuBlB,GAKzB,SAASmB,gCAAiCC,GAEzC,IAAIC,EAAkD,iBAA9BD,GAAwE,OAA9BA,EAAsCA,EAA4B,GAEpI9B,YAAY,uBAAwBgC,KAAKC,UAAWF,IAIrD,SAASG,+BAA+BC,EAAQC,EAAMC,EAAQC,GAC7D,IACKC,EA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D,EAASI,SACa,IAAxBJ,EAASK,aACZvC,OAAOwC"}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, anti-spam, comments, firewall
|
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.5
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 5.147
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -580,6 +580,9 @@ If your website has forms that send data to external sources, you can enable opt
|
|
580 |
|
581 |
== Changelog ==
|
582 |
|
|
|
|
|
|
|
583 |
= 5.147 Oct 08 2020 =
|
584 |
* Fix: WPForms. Auto submitting.
|
585 |
* Fix: Synchronization timeout increased to 25 seconds.
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.5
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 5.147.1
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
580 |
|
581 |
== Changelog ==
|
582 |
|
583 |
+
= 5.147.1 Oct 08 2020 =
|
584 |
+
* Fix: Visible fields JS error fixed.
|
585 |
+
|
586 |
= 5.147 Oct 08 2020 =
|
587 |
* Fix: WPForms. Auto submitting.
|
588 |
* Fix: Synchronization timeout increased to 25 seconds.
|