Version Description
Feb 03 2022 =
Visible fields processing modified, many excepted requests are skipped, SFW compatibility with a cache fixed and minor issues fixed.
- New. Exclusions. Excluded some service requests from checking but log them with exception flag.
- Upd. Visible fields. Storing visible fields into an input.
- Upd. Visible fields. Visible fields processing modified.
- Upd. Visible fields. Replacing redundant service field.
- Fix: SFW. Caching block page prevented.
- Fix: Skip. Entry Views plugin service requests.
- Fix: Antispam. Ajax checking moved to the plugins_loaded hook.
- Fix: Skip. APBCT plugin service requests.
- Fix: Skip. Vault Press (JetPack) plugin service requests.
- Fix: Skip. GridBuilder plugin service requests.
- Fix: Skip. Woo Gift Wrapper plugin service requests.
- Fix: Skip. iThemes Security plugin service requests.
- Fix: Settings. Using new API key when sending local settings to the cloud.
- Fix. Integration. Registration form of eMember plugin.
- Fix. Exception action. Xmlrpc requests skipped.
- Fix. Integration. Elementor pro forms integration fixed.
- Fix: Excluded from the test the standard check for Formidable Form Plugin in some situations
- Fix: Skip. Microsoft Azure Storage plugin service requests.
- Fix: Skip. AdRotate plugin service requests.
- Fix: Skip. Super admin requests.
- Fix: Fixed the block message for HappyForms
- Fix: Excluded the form of WP Time Slots Booking Form from apbct_ready()
Download this release
Release Info
Developer | glomberg |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.171 |
Comparing to | |
See all releases |
Code changes from version 5.170 to 5.171
- cleantalk.php +3 -5
- inc/cleantalk-ajax.php +15 -12
- inc/cleantalk-common.php +8 -2
- inc/cleantalk-pluggable.php +106 -5
- inc/cleantalk-public-integrations.php +5 -0
- inc/cleantalk-public-validate.php +5 -0
- inc/cleantalk-settings.php +3 -2
- js/apbct-public.min.js +1 -1
- js/apbct-public.min.js.map +1 -1
- lib/Cleantalk/ApbctWP/Firewall/AntiCrawler.php +2 -0
- lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php +2 -2
- lib/Cleantalk/ApbctWP/Firewall/SFW.php +2 -2
- readme.txt +30 -6
cleantalk.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Anti-Spam by CleanTalk
|
5 |
Plugin URI: https://cleantalk.org
|
6 |
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.
|
7 |
-
Version: 5.
|
8 |
Author: СleanTalk <welcome@cleantalk.org>
|
9 |
Author URI: https://cleantalk.org
|
10 |
Text Domain: cleantalk-spam-protect
|
@@ -507,7 +507,7 @@ if ( is_admin() || is_network_admin() ) {
|
|
507 |
) &&
|
508 |
! in_array($_POST['action'], array_column($apbct_active_integrations, 'hook'))
|
509 |
) {
|
510 |
-
ct_ajax_hook
|
511 |
}
|
512 |
|
513 |
//QAEngine Theme answers
|
@@ -2518,9 +2518,7 @@ function apbct_is_user_enable($user = null)
|
|
2518 |
|
2519 |
$user = $user !== null ? $user : $current_user;
|
2520 |
|
2521 |
-
return apbct_is_user_role_in(array('administrator', 'editor', 'author'), $user)
|
2522 |
-
? false
|
2523 |
-
: true;
|
2524 |
}
|
2525 |
|
2526 |
/**
|
4 |
Plugin Name: Anti-Spam by CleanTalk
|
5 |
Plugin URI: https://cleantalk.org
|
6 |
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.
|
7 |
+
Version: 5.171
|
8 |
Author: СleanTalk <welcome@cleantalk.org>
|
9 |
Author URI: https://cleantalk.org
|
10 |
Text Domain: cleantalk-spam-protect
|
507 |
) &&
|
508 |
! in_array($_POST['action'], array_column($apbct_active_integrations, 'hook'))
|
509 |
) {
|
510 |
+
add_action('plugins_loaded', 'ct_ajax_hook');
|
511 |
}
|
512 |
|
513 |
//QAEngine Theme answers
|
2518 |
|
2519 |
$user = $user !== null ? $user : $current_user;
|
2520 |
|
2521 |
+
return ! (apbct_is_user_role_in(array('administrator', 'editor', 'author'), $user) || is_super_admin());
|
|
|
|
|
2522 |
}
|
2523 |
|
2524 |
/**
|
inc/cleantalk-ajax.php
CHANGED
@@ -301,8 +301,6 @@ function ct_ajax_hook($message_obj = null)
|
|
301 |
'save_tourmaster_option',
|
302 |
//Tourmaster admin save
|
303 |
'validate_register_email',
|
304 |
-
// Service id #313320
|
305 |
-
'elementor_pro_forms_send_form',
|
306 |
//Elementor Pro
|
307 |
'phone-orders-for-woocommerce',
|
308 |
//Phone orders for woocommerce backend
|
@@ -421,7 +419,7 @@ function ct_ajax_hook($message_obj = null)
|
|
421 |
if ( apbct_is_skip_request(true) ) {
|
422 |
do_action(
|
423 |
'apbct_skipped_request',
|
424 |
-
__FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__ . '(' . apbct_is_skip_request() . ')',
|
425 |
$_POST
|
426 |
);
|
427 |
|
@@ -590,16 +588,21 @@ function ct_ajax_hook($message_obj = null)
|
|
590 |
}
|
591 |
}
|
592 |
|
593 |
-
$
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
'js_on' => $checkjs,
|
601 |
-
)
|
602 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
$ct_result = $base_call_result['ct_result'];
|
604 |
|
605 |
if ( $ct_result->allow == 0 ) {
|
301 |
'save_tourmaster_option',
|
302 |
//Tourmaster admin save
|
303 |
'validate_register_email',
|
|
|
|
|
304 |
//Elementor Pro
|
305 |
'phone-orders-for-woocommerce',
|
306 |
//Phone orders for woocommerce backend
|
419 |
if ( apbct_is_skip_request(true) ) {
|
420 |
do_action(
|
421 |
'apbct_skipped_request',
|
422 |
+
__FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__ . '(' . apbct_is_skip_request(true) . ')',
|
423 |
$_POST
|
424 |
);
|
425 |
|
588 |
}
|
589 |
}
|
590 |
|
591 |
+
$base_call_params = array(
|
592 |
+
'message' => $message,
|
593 |
+
'sender_email' => $sender_email,
|
594 |
+
'sender_nickname' => $sender_nickname,
|
595 |
+
'sender_info' => array('post_checkjs_passed' => $checkjs),
|
596 |
+
'post_info' => $post_info,
|
597 |
+
'js_on' => $checkjs,
|
|
|
|
|
598 |
);
|
599 |
+
|
600 |
+
if ( apbct_is_exception_arg_request() ) {
|
601 |
+
$base_call_params['exception_action'] = 1;
|
602 |
+
$base_call_params['sender_info']['exception_description'] = apbct_is_exception_arg_request();
|
603 |
+
}
|
604 |
+
|
605 |
+
$base_call_result = apbct_base_call($base_call_params);
|
606 |
$ct_result = $base_call_result['ct_result'];
|
607 |
|
608 |
if ( $ct_result->allow == 0 ) {
|
inc/cleantalk-common.php
CHANGED
@@ -187,7 +187,8 @@ function apbct_base_call($params = array(), $reg_flag = false)
|
|
187 |
! empty($params['post_info']['comment_type']) &&
|
188 |
strpos($params['post_info']['comment_type'], 'contact_form_wordpress_') === false &&
|
189 |
! preg_match('/comment$/', $params['post_info']['comment_type']) &&
|
190 |
-
! apbct_is_trackback()
|
|
|
191 |
) {
|
192 |
$params['exception_action'] = 1;
|
193 |
}
|
@@ -471,7 +472,12 @@ function apbct_get_sender_info()
|
|
471 |
: null;
|
472 |
|
473 |
// Visible fields processing
|
474 |
-
$visible_fields_collection =
|
|
|
|
|
|
|
|
|
|
|
475 |
|
476 |
$visible_fields = apbct_visible_fields__process($visible_fields_collection);
|
477 |
|
187 |
! empty($params['post_info']['comment_type']) &&
|
188 |
strpos($params['post_info']['comment_type'], 'contact_form_wordpress_') === false &&
|
189 |
! preg_match('/comment$/', $params['post_info']['comment_type']) &&
|
190 |
+
! apbct_is_trackback() &&
|
191 |
+
! defined('XMLRPC_REQUEST')
|
192 |
) {
|
193 |
$params['exception_action'] = 1;
|
194 |
}
|
472 |
: null;
|
473 |
|
474 |
// Visible fields processing
|
475 |
+
$visible_fields_collection = '';
|
476 |
+
if ( Cookie::getVisibleFields() ) {
|
477 |
+
$visible_fields_collection = Cookie::getVisibleFields();
|
478 |
+
} elseif ( isset($_POST['apbct_visible_fields']) ) {
|
479 |
+
$visible_fields_collection = stripslashes($_POST['apbct_visible_fields']);
|
480 |
+
}
|
481 |
|
482 |
$visible_fields = apbct_visible_fields__process($visible_fields_collection);
|
483 |
|
inc/cleantalk-pluggable.php
CHANGED
@@ -497,6 +497,8 @@ function apbct_is_skip_request($ajax = false)
|
|
497 |
/* !!! Have to use more than one factor to detect the request - is_plugin active() && $_POST['action'] !!! */
|
498 |
//@ToDo Implement direct integration checking - if have the direct integration will be returned false
|
499 |
|
|
|
|
|
500 |
if ( RemoteCalls::check() ) {
|
501 |
return 'CleanTalk RemoteCall request.';
|
502 |
}
|
@@ -619,9 +621,14 @@ function apbct_is_skip_request($ajax = false)
|
|
619 |
Post::get('action') === 'fusion_options_ajax_save' ) {
|
620 |
return 'Avada_theme_saving_settings';
|
621 |
}
|
622 |
-
// Formidable skip - this is the
|
623 |
if ( apbct_is_plugin_active('formidable/formidable.php') &&
|
624 |
-
|
|
|
|
|
|
|
|
|
|
|
625 |
return 'formidable_skip';
|
626 |
}
|
627 |
// Artbees Jupiter theme saving settings
|
@@ -704,6 +711,60 @@ function apbct_is_skip_request($ajax = false)
|
|
704 |
) {
|
705 |
return 'SPBCT service actions';
|
706 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
} else {
|
708 |
/*****************************************/
|
709 |
/* Here is non-ajax requests skipping */
|
@@ -736,7 +797,9 @@ function apbct_is_skip_request($ajax = false)
|
|
736 |
// HappyForms skip every requests. HappyForms have the direct integration
|
737 |
if ( (apbct_is_plugin_active('happyforms-upgrade/happyforms-upgrade.php') ||
|
738 |
apbct_is_plugin_active('happyforms/happyforms.php')) &&
|
739 |
-
(Post::get('happyforms_message_nonce') !== '')
|
|
|
|
|
740 |
return 'happyform_skipped';
|
741 |
}
|
742 |
// Essentials addons for elementor - light and pro
|
@@ -757,9 +820,14 @@ function apbct_is_skip_request($ajax = false)
|
|
757 |
) {
|
758 |
return 'wp_forms';
|
759 |
}
|
760 |
-
// Formidable skip - this is the
|
761 |
if ( apbct_is_plugin_active('formidable/formidable.php') &&
|
762 |
-
Post::get('frm_action') === 'update'
|
|
|
|
|
|
|
|
|
|
|
763 |
return 'formidable_skip';
|
764 |
}
|
765 |
// WC payment APIs
|
@@ -767,11 +835,44 @@ function apbct_is_skip_request($ajax = false)
|
|
767 |
apbct_is_in_uri('wc-ajax=iwd_opc_update_order_review') ) {
|
768 |
return 'cartflows_save_cart';
|
769 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
}
|
771 |
|
772 |
return false;
|
773 |
}
|
774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
/**
|
776 |
* Checking availability of the handlers and return ajax type
|
777 |
*
|
497 |
/* !!! Have to use more than one factor to detect the request - is_plugin active() && $_POST['action'] !!! */
|
498 |
//@ToDo Implement direct integration checking - if have the direct integration will be returned false
|
499 |
|
500 |
+
global $apbct;
|
501 |
+
|
502 |
if ( RemoteCalls::check() ) {
|
503 |
return 'CleanTalk RemoteCall request.';
|
504 |
}
|
621 |
Post::get('action') === 'fusion_options_ajax_save' ) {
|
622 |
return 'Avada_theme_saving_settings';
|
623 |
}
|
624 |
+
// Formidable skip - this is the direct integration
|
625 |
if ( apbct_is_plugin_active('formidable/formidable.php') &&
|
626 |
+
(Post::get('frm_action') === 'update' ||
|
627 |
+
(Post::get('frm_action') === 'create' &&
|
628 |
+
$apbct->settings['forms__contact_forms_test'] == 1 &&
|
629 |
+
Post::get('form_id') !== '' &&
|
630 |
+
Post::get('form_key') !== ''))
|
631 |
+
) {
|
632 |
return 'formidable_skip';
|
633 |
}
|
634 |
// Artbees Jupiter theme saving settings
|
711 |
) {
|
712 |
return 'SPBCT service actions';
|
713 |
}
|
714 |
+
// APBCT service actions
|
715 |
+
if (
|
716 |
+
apbct_is_plugin_active('cleantalk-spam-protect/cleantalk.php') &&
|
717 |
+
( Post::get('action') === 'apbct_get_pixel_url' && wp_verify_nonce(Post::get('_ajax_nonce'), 'ct_secret_stuff') )
|
718 |
+
) {
|
719 |
+
return 'APBCT service actions';
|
720 |
+
}
|
721 |
+
// Elementor pro forms has a direct integration
|
722 |
+
if (
|
723 |
+
apbct_is_plugin_active('security-malware-firewall/security-malware-firewall.php') &&
|
724 |
+
Post::get('action') === 'elementor_pro_forms_send_form' &&
|
725 |
+
Post::get('post_id') !== '' &&
|
726 |
+
Post::get('form_id') !== '' &&
|
727 |
+
Post::get('cfajax') === ''
|
728 |
+
) {
|
729 |
+
return 'Elementor pro forms';
|
730 |
+
}
|
731 |
+
// Entry Views plugin service requests
|
732 |
+
if (
|
733 |
+
apbct_is_plugin_active('entry-views/entry-views.php') &&
|
734 |
+
Post::get('action') === 'entry_views' &&
|
735 |
+
Post::get('post_id') !== ''
|
736 |
+
) {
|
737 |
+
return 'Entry Views service actions';
|
738 |
+
}
|
739 |
+
// Woo Gift Wrapper plugin service requests
|
740 |
+
if (
|
741 |
+
apbct_is_plugin_active('woocommerce-gift-wrapper/woocommerce-gift-wrapper.php') &&
|
742 |
+
Post::get('action') === 'wcgwp_remove_from_cart'
|
743 |
+
) {
|
744 |
+
return 'Woo Gift Wrapper service actions';
|
745 |
+
}
|
746 |
+
// iThemes Security plugin service requests
|
747 |
+
if (
|
748 |
+
apbct_is_plugin_active('better-wp-security/better-wp-security.php') &&
|
749 |
+
Post::get('action') === 'itsec-login-interstitial-ajax'
|
750 |
+
) {
|
751 |
+
return 'iThemes Security service actions';
|
752 |
+
}
|
753 |
+
// Microsoft Azure Storage plugin service requests
|
754 |
+
if (
|
755 |
+
apbct_is_plugin_active('windows-azure-storage/windows-azure-storage.php') &&
|
756 |
+
Post::get('action') === 'get-azure-progress'
|
757 |
+
) {
|
758 |
+
return 'Microsoft Azure Storage service actions';
|
759 |
+
}
|
760 |
+
// AdRotate plugin service requests
|
761 |
+
if (
|
762 |
+
apbct_is_plugin_active('adrotate/adrotate.php') &&
|
763 |
+
Post::get('action') === 'adrotate_impression' &&
|
764 |
+
Post::get('track') !== ''
|
765 |
+
) {
|
766 |
+
return 'AdRotate service actions';
|
767 |
+
}
|
768 |
} else {
|
769 |
/*****************************************/
|
770 |
/* Here is non-ajax requests skipping */
|
797 |
// HappyForms skip every requests. HappyForms have the direct integration
|
798 |
if ( (apbct_is_plugin_active('happyforms-upgrade/happyforms-upgrade.php') ||
|
799 |
apbct_is_plugin_active('happyforms/happyforms.php')) &&
|
800 |
+
(Post::get('happyforms_message_nonce') !== '') ||
|
801 |
+
(Post::get('action') === 'happyforms_message' && Post::get('happyforms_form_id') !== '')
|
802 |
+
) {
|
803 |
return 'happyform_skipped';
|
804 |
}
|
805 |
// Essentials addons for elementor - light and pro
|
820 |
) {
|
821 |
return 'wp_forms';
|
822 |
}
|
823 |
+
// Formidable skip - this is the direct integration
|
824 |
if ( apbct_is_plugin_active('formidable/formidable.php') &&
|
825 |
+
(Post::get('frm_action') === 'update' ||
|
826 |
+
(Post::get('frm_action') === 'create' &&
|
827 |
+
$apbct->settings['forms__contact_forms_test'] == 1 &&
|
828 |
+
Post::get('form_id') !== '' &&
|
829 |
+
Post::get('form_key') !== ''))
|
830 |
+
) {
|
831 |
return 'formidable_skip';
|
832 |
}
|
833 |
// WC payment APIs
|
835 |
apbct_is_in_uri('wc-ajax=iwd_opc_update_order_review') ) {
|
836 |
return 'cartflows_save_cart';
|
837 |
}
|
838 |
+
// Vault Press (JetPack) plugin service requests
|
839 |
+
if (
|
840 |
+
Post::get('do_backups') !== '' &&
|
841 |
+
Get::get('vaultpress') === 'true' &&
|
842 |
+
Get::get('action') !== '' &&
|
843 |
+
preg_match('%Automattic\/VaultPress\/\d.\d$%', Server::get('HTTP_USER_AGENT'))
|
844 |
+
) {
|
845 |
+
return 'Vault Press service actions';
|
846 |
+
}
|
847 |
+
// GridBuilder plugin service requests
|
848 |
+
if (
|
849 |
+
apbct_is_plugin_active('wp-grid-builder/wp-grid-builder.php') &&
|
850 |
+
Post::get('wpgb') !== '' &&
|
851 |
+
Get::get('wpgb-ajax') !== ''
|
852 |
+
) {
|
853 |
+
return 'GridBuilder service actions';
|
854 |
+
}
|
855 |
}
|
856 |
|
857 |
return false;
|
858 |
}
|
859 |
|
860 |
+
/**
|
861 |
+
* Checking if the request must be skipped but logged by exception flag.
|
862 |
+
*
|
863 |
+
* @return false|string
|
864 |
+
*/
|
865 |
+
function apbct_is_exception_arg_request()
|
866 |
+
{
|
867 |
+
if (
|
868 |
+
apbct_is_plugin_active('wc-dynamic-pricing-and-discounts/wc-dynamic-pricing-and-discounts.php') &&
|
869 |
+
Post::get('action') === 'rp_wcdpd_promotion_countdown_timer_update'
|
870 |
+
) {
|
871 |
+
return 'WooCommerce Dynamic Pricing & Discounts service actions';
|
872 |
+
}
|
873 |
+
return false;
|
874 |
+
}
|
875 |
+
|
876 |
/**
|
877 |
* Checking availability of the handlers and return ajax type
|
878 |
*
|
inc/cleantalk-public-integrations.php
CHANGED
@@ -3199,6 +3199,11 @@ function apbct_custom_forms_trappings()
|
|
3199 |
return true;
|
3200 |
}
|
3201 |
|
|
|
|
|
|
|
|
|
|
|
3202 |
return false;
|
3203 |
}
|
3204 |
|
3199 |
return true;
|
3200 |
}
|
3201 |
|
3202 |
+
// Registration form of eMember plugin
|
3203 |
+
if ( $apbct->settings['forms__registrations_test'] && isset($_REQUEST['emember-form-builder-submit']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'emember-form-builder-nonce') ) {
|
3204 |
+
return true;
|
3205 |
+
}
|
3206 |
+
|
3207 |
return false;
|
3208 |
}
|
3209 |
|
inc/cleantalk-public-validate.php
CHANGED
@@ -451,6 +451,11 @@ function apbct__filter_form_data($form_data)
|
|
451 |
{
|
452 |
global $apbct;
|
453 |
|
|
|
|
|
|
|
|
|
|
|
454 |
if ($apbct->settings['exclusions__fields']) {
|
455 |
// regular expression exception
|
456 |
if ($apbct->settings['exclusions__fields__use_regexp']) {
|
451 |
{
|
452 |
global $apbct;
|
453 |
|
454 |
+
// It is a service field. Need to be deleted before the processing.
|
455 |
+
if ( isset($form_data['apbct_visible_fields']) ) {
|
456 |
+
unset($form_data['apbct_visible_fields']);
|
457 |
+
}
|
458 |
+
|
459 |
if ($apbct->settings['exclusions__fields']) {
|
460 |
// regular expression exception
|
461 |
if ($apbct->settings['exclusions__fields__use_regexp']) {
|
inc/cleantalk-settings.php
CHANGED
@@ -2710,7 +2710,8 @@ add_action('apbct_before_returning_settings', 'apbct__send_local_settings_to_api
|
|
2710 |
|
2711 |
function apbct__send_local_settings_to_api($settings)
|
2712 |
{
|
2713 |
-
|
|
|
2714 |
|
2715 |
// Settings to JSON
|
2716 |
$settings = json_encode($settings);
|
@@ -2718,5 +2719,5 @@ function apbct__send_local_settings_to_api($settings)
|
|
2718 |
// Hostname
|
2719 |
$hostname = preg_replace('/^(https?:)?(\/\/)?(www\.)?/', '', get_site_url());
|
2720 |
|
2721 |
-
\Cleantalk\Common\API::methodSendLocalSettings($
|
2722 |
}
|
2710 |
|
2711 |
function apbct__send_local_settings_to_api($settings)
|
2712 |
{
|
2713 |
+
// Current API key
|
2714 |
+
$api_key = $settings['apikey'] ?: '';
|
2715 |
|
2716 |
// Settings to JSON
|
2717 |
$settings = json_encode($settings);
|
2719 |
// Hostname
|
2720 |
$hostname = preg_replace('/^(https?:)?(\/\/)?(www\.)?/', '', get_site_url());
|
2721 |
|
2722 |
+
\Cleantalk\Common\API::methodSendLocalSettings($api_key, $hostname, $settings);
|
2723 |
}
|
js/apbct-public.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function apbct_collect_visible_fields(e){var t=[],n="",c=0,o="",a=0,i=[];for(var l in e.elements)isNaN(+l)||(t[l]=e.elements[l]);return(t=t.filter(function(e){return-1===i.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(i.push(e.getAttribute("name")),!1))})).forEach(function(e,t,i){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(n+=" "+e.getAttribute("name"),c++):(o+=" "+e.getAttribute("name"),a++))}),o=o.trim(),{visible_fields:n=n.trim(),visible_fields_count:c,invisible_fields:o,invisible_fields_count:a}}function apbct_visible_fields_set_cookie(e,t){var i="object"==typeof e&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var n in i){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:n),JSON.stringify(i[n]))}else ctSetCookie("apbct_visible_fields",JSON.stringify(i))}function
|
2 |
//# sourceMappingURL=apbct-public.min.js.map
|
1 |
+
function apbct_collect_visible_fields(e){var t=[],n="",c=0,o="",a=0,i=[];for(var l in e.elements)isNaN(+l)||(t[l]=e.elements[l]);return(t=t.filter(function(e){return-1===i.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(i.push(e.getAttribute("name")),!1))})).forEach(function(e,t,i){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(n+=" "+e.getAttribute("name"),c++):(o+=" "+e.getAttribute("name"),a++))}),o=o.trim(),{visible_fields:n=n.trim(),visible_fields_count:c,invisible_fields:o,invisible_fields_count:a}}function apbct_visible_fields_set_cookie(e,t){var i="object"==typeof e&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var n in i){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:n),JSON.stringify(i[n]))}else ctSetCookie("apbct_visible_fields",JSON.stringify(i))}function apbct_js_keys__set_input_value(e,t,i,n){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var c=document.querySelectorAll("[name^=ct_checkjs]"),o=0;o<c.length;o++)c[o].value=e.js_key}function apbctGetScreenInfo(){return JSON.stringify({fullWidth:document.documentElement.scrollWidth,fullHeight:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),visibleWidth:document.documentElement.clientWidth,visibleHeight:document.documentElement.clientHeight})}!function(){var o=new Date,t=(new Date).getTime(),i=!0,n=[],c=0,a={},e=!1,l=!1;function s(e,t,i){"function"==typeof window.addEventListener?e.addEventListener(t,i):e.attachEvent(t,i)}function _(e,t,i){"function"==typeof window.removeEventListener?e.removeEventListener(t,i):e.detachEvent(t,i)}var u=function(){var e=Math.floor((new Date).getTime()/1e3);ctSetCookie("ct_fkp_timestamp",e),_(window,"mousedown",u),_(window,"keydown",u)},d=setInterval(function(){i=!0},150),r=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(n))},1200),m=function(e){l||(ctSetCookie("ct_mouse_moved","true"),l=!0),!0===i&&(n.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-t)]),i=!1,50<=++c&&(_(window,"mousemove",m),clearInterval(d),clearInterval(r)))};function p(e){var t=e.target.value;!t||t in a||("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_before_post",{method:"POST",data:{email:t},callback:function(e){e.result&&(a[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(a)))}}):"custom_ajax"===ctPublicFunctions.data__ajax_type?apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:t},{apbct_ajax:1,callback:function(e){e.result&&(a[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(a)))}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:t},{callback:function(e){e.result&&(a[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(a)))}}))}function b(e){ctSetCookie("apbct_pixel_url",e),+ctPublic.pixel__enabled&&(document.getElementById("apbct_pixel")||jQuery("body").append('<img alt="Cleantalk Pixel" id="apbct_pixel" style="display: none; left: 99999px;" src="'+e+'">'))}s(window,"mousemove",m),s(window,"mousedown",u),s(window,"keydown",u),s(window,"scroll",function(){e||(ctSetCookie("ct_has_scrolled","true"),e=!0)}),s(window,"DOMContentLoaded",function(){var e,t=[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",o.getTimezoneOffset()/60*-1],["ct_screen_info",apbctGetScreenInfo()],["ct_has_scrolled","false"],["ct_mouse_moved","false"]];if("native"!==ctPublic.data__cookies_type)t.push(["apbct_visible_fields","0"]);else{var i=document.cookie.split(";");if(0!==i.length)for(var n=0;n<i.length;n++){var c=i[n].trim().split("=")[0];0===c.indexOf("apbct_visible_fields_")&&ctDeleteCookie(c)}}+ctPublic.pixel__setting&&(+ctPublic.pixel__enabled?"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_get_pixel_url",{method:"POST",callback:function(e){e&&b(e)}}):(e="custom_ajax"===ctPublicFunctions.data__ajax_type?1:0,apbct_public_sendAJAX({action:"apbct_get_pixel_url"},{apbct_ajax:e,notJson:!0,callback:function(e){e&&b(e)}})):t.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(t.push(["ct_checked_emails","0"]),jQuery("input[type = 'email'], #email").blur(p)),ctSetCookie(t),setTimeout(function(){for(var e=0;e<document.forms.length;e++){var t,i,n=document.forms[e];n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"===n.id||n.classList&&n.classList.contains("tinkoffPayRow")||n.classList&&n.classList.contains("give-form")||n.id&&"ult-forgot-password-form"===n.id||n.id&&-1!==n.id.toString().indexOf("calculatedfields")||n.id&&-1!==n.id.toString().indexOf("cp_tslotsbooking_pform")||n.name&&-1!==n.name.toString().indexOf("cp_tslotsbooking_pform")||((t=document.createElement("input")).setAttribute("type","hidden"),t.setAttribute("id","apbct_visible_fields_"+e),t.setAttribute("name","apbct_visible_fields"),(i={})[0]=apbct_collect_visible_fields(n),t.value=JSON.stringify(i),n.append(t),n.onsubmit_prev=n.onsubmit,n.ctFormIndex=e,n.onsubmit=function(e){var t;"native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex&&((t={})[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(t,e.target.ctFormIndex)),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}},1e3)})}(),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(e,t,i){var n;!t.responseText||-1===t.responseText.indexOf('"apbct')||void 0!==(n=JSON.parse(t.responseText)).apbct&&(n=n.apbct).blocked&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:n.comment}})),cleantalkModal.loaded=n.comment,cleantalkModal.open(),1==+n.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() {\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\t\tctCheckedEmails = {},\n\t\tctScrollCollected = false,\n\t\tctMouseMovedCollected = false;\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\t//Writing first key press timestamp\n\tvar ctFunctionFirstKey = function output(event){\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\t\tctSetCookie(\"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\tctSetCookie(\"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\tctSetMouseMoved();\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\tfunction checkEmail(e) {\n\t\tvar current_email = e.target.value;\n\t\tif (current_email && !(current_email in ctCheckedEmails)) {\n\t\t\t// Using REST API handler\n\t\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\t\tapbct_public_sendREST(\n\t\t\t\t\t'check_email_before_post',\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: {'email' : current_email},\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Using AJAX request and handler\n\t\t\t}else if( ctPublicFunctions.data__ajax_type === 'custom_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tapbct_ajax: 1,\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctSetPixelImg(pixelUrl) {\n\t\tctSetCookie('apbct_pixel_url', pixelUrl);\n\t\tif( +ctPublic.pixel__enabled ){\n\t\t\tif( ! document.getElementById('apbct_pixel') ) {\n\t\t\t\tjQuery('body').append( '<img alt=\"Cleantalk Pixel\" id=\"apbct_pixel\" style=\"display: none; left: 99999px;\" src=\"' + pixelUrl + '\">' );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctGetPixelUrl() {\n\t\t// Using REST API handler\n\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\tapbct_public_sendREST(\n\t\t\t\t'apbct_get_pixel_url',\n\t\t\t\t{\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t// Using AJAX request and handler\n\t\t}else{\n\t\t\tvar ajaxType = ctPublicFunctions.data__ajax_type === 'custom_ajax' ? 1 : 0;\n\t\t\tapbct_public_sendAJAX(\n\t\t\t\t{\n\t\t\t\t\taction: 'apbct_get_pixel_url',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tapbct_ajax: ajaxType,\n\t\t\t\t\tnotJson: true,\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction ctSetHasScrolled() {\n\t\tif( ! ctScrollCollected ) {\n\t\t\tctSetCookie(\"ct_has_scrolled\", 'true');\n\t\t\tctScrollCollected = true;\n\t\t}\n\t}\n\n\tfunction ctSetMouseMoved() {\n\t\tif( ! ctMouseMovedCollected ) {\n\t\t\tctSetCookie(\"ct_mouse_moved\", 'true');\n\t\t\tctMouseMovedCollected = true;\n\t\t}\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\tapbct_attach_event_handler(window, \"scroll\", ctSetHasScrolled);\n\n\t// Ready function\n\tfunction apbct_ready(){\n\n\t\t// Collect scrolling info\n\t\tvar initCookies = [\n\t\t\t[\"ct_ps_timestamp\", Math.floor(new Date().getTime() / 1000)],\n\t\t\t[\"ct_fkp_timestamp\", \"0\"],\n\t\t\t[\"ct_pointer_data\", \"0\"],\n\t\t\t[\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1) ],\n\t\t\t[\"ct_screen_info\", apbctGetScreenInfo()],\n\t\t\t[\"ct_has_scrolled\", 'false'],\n\t\t\t[\"ct_mouse_moved\", 'false'],\n\t\t];\n\n\t\tif( ctPublic.data__cookies_type !== 'native' ) {\n\t\t\tinitCookies.push(['apbct_visible_fields', '0']);\n\t\t} else {\n\t\t\t// Delete all visible fields cookies on load the page\n\t\t\tvar cookiesArray = document.cookie.split(\";\");\n\t\t\tif( cookiesArray.length !== 0 ) {\n\t\t\t\tfor ( var i = 0; i < cookiesArray.length; i++ ) {\n\t\t\t\t\tvar currentCookie = cookiesArray[i].trim();\n\t\t\t\t\tvar cookieName = currentCookie.split(\"=\")[0];\n\t\t\t\t\tif( cookieName.indexOf(\"apbct_visible_fields_\") === 0 ) {\n\t\t\t\t\t\tctDeleteCookie(cookieName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( +ctPublic.pixel__setting ){\n\t\t\tif( +ctPublic.pixel__enabled ){\n\t\t\t\tctGetPixelUrl();\n\t\t\t} else {\n\t\t\t\tinitCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n\t\t\t}\n\t\t}\n\n\t\tif ( +ctPublic.data__email_check_before_post) {\n\t\t\tinitCookies.push(['ct_checked_emails', '0']);\n\t\t\tjQuery(\"input[type = 'email'], #email\").blur(checkEmail);\n\t\t}\n\n\t\tctSetCookie(initCookies);\n\n\t\tsetTimeout(function(){\n\n\t\t\tvar visible_fields_collection = {};\n\t\t\tvar processedForms = [];\n\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 forms\n\t\t\t\tif (\n\t\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\n\t\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\n\t\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n\t\t\t\t\t(form.id && form.id === 'caspioform') || //Caspio Form\n\t\t\t\t\t(form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n\t\t\t\t\t(form.classList && form.classList.contains('give-form')) || // GiveWP\n\t\t\t\t\t(form.id && form.id === 'ult-forgot-password-form') || //ult forgot password\n\t\t\t\t\t(form.id && form.id.toString().indexOf('calculatedfields') !== -1) // CalculatedFieldsForm\n\t\t\t\t)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( ! apbct_visible_fields_already_collected( processedForms, form ) ) {\n\t\t\t\t\tvisible_fields_collection[i] = apbct_collect_visible_fields( form );\n\t\t\t\t\tprocessedForms.push( apbct_get_form_details( form ) );\n\t\t\t\t}\n\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\n\n\t\t\t\tform.ctFormIndex = i;\n\t\t\t\tform.onsubmit = function (event) {\n\n\t\t\t\t\tif ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n\n\t\t\t\t\t\tvar visible_fields = {};\n\t\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\n\t\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields, event.target.ctFormIndex );\n\t\t\t\t\t}\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\n\t\t\tapbct_visible_fields_set_cookie( visible_fields_collection );\n\n\t\t}, 1000);\n\t}\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\n\n}());\n\nfunction apbct_collect_visible_fields( form ) {\n\n\t// Get only fields\n\tvar inputs = [],\n\t\tinputs_visible = '',\n\t\tinputs_visible_count = 0,\n\t\tinputs_invisible = '',\n\t\tinputs_invisible_count = 0,\n\t\tinputs_with_duplicate_names = [];\n\n\tfor(var key in form.elements){\n\t\tif(!isNaN(+key))\n\t\t\tinputs[key] = form.elements[key];\n\t}\n\n\t// Filter fields\n\tinputs = inputs.filter(function(elem){\n\n\t\t// Filter already added fields\n\t\tif( inputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 ){\n\t\t\treturn false;\n\t\t}\n\t\t// Filter inputs with same names for type == radio\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\t// Visible fields\n\tinputs.forEach(function(elem, i, elements){\n\t\t// Unnecessary fields\n\t\tif(\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\telem.getAttribute('name') === null ||\n\t\t\telem.getAttribute('name') === 'ct_checkjs'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// Invisible fields\n\t\tif(\n\t\t\tgetComputedStyle(elem).display === \"none\" || // hidden\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\telem.getAttribute(\"type\") === \"hidden\" // type == hidden\n\t\t) {\n\t\t\tif( elem.classList.contains(\"wp-editor-area\") ) {\n\t\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_visible_count++;\n\t\t\t} else {\n\t\t\t\tinputs_invisible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_invisible_count++;\n\t\t\t}\n\t\t}\n\t\t// Visible fields\n\t\telse {\n\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\tinputs_visible_count++;\n\t\t}\n\n\t});\n\n\tinputs_invisible = inputs_invisible.trim();\n\tinputs_visible = inputs_visible.trim();\n\n\treturn {\n\t\tvisible_fields : inputs_visible,\n\t\tvisible_fields_count : inputs_visible_count,\n\t\tinvisible_fields : inputs_invisible,\n\t\tinvisible_fields_count : inputs_invisible_count,\n\t}\n\n}\n\nfunction apbct_visible_fields_set_cookie( visible_fields_collection, form_id ) {\n\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\n\n\tif( ctPublic.data__cookies_type === 'native' ) {\n\t\tfor ( var i in collection ) {\n\t\t\tif ( i > 10 ) {\n\t\t\t\t// Do not generate more than 10 cookies\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar collectionIndex = form_id !== undefined ? form_id : i;\n\t\t\tctSetCookie(\"apbct_visible_fields_\" + collectionIndex, JSON.stringify( collection[i] ) );\n\t\t}\n\t} else {\n\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\n\t}\n}\n\nfunction apbct_visible_fields_already_collected( formsProcessed, form ) {\n\n\tif ( formsProcessed.length > 0 && form.elements.length > 0 ) {\n\n\t\tvar formMethod = form.method;\n\t\tvar formAction = form.action;\n\t\tvar formFieldsCount = form.elements.length;\n\t\tvar formInputs = [];\n\n\t\t// Getting only input elements from HTMLFormControlsCollection and putting these into the simple array.\n\t\tfor( var key in form.elements ){\n\t\t\tif( ! isNaN( +key ) ) {\n\t\t\t\tformInputs[key] = form.elements[key];\n\t\t\t}\n\t\t}\n\n\t\tfor ( var i = 0; i < formsProcessed.length; i++ ) {\n\t\t\t// The form with the same METHOD has not processed.\n\t\t\tif ( formsProcessed[i].method !== formMethod ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// The form with the same ACTION has not processed.\n\t\t\tif ( formsProcessed[i].action !== formAction ) {\n\t\t\t\t// @ToDo actions often are different in the similar forms\n\t\t\t\t//return false;\n\t\t\t}\n\t\t\t// The form with the same FIELDS COUNT has not processed.\n\t\t\tif ( formsProcessed[i].fields_count !== formFieldsCount ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Compare every form fields by their TYPE and NAME\n\t\t\tvar fieldsNames = formsProcessed[i].fields_names;\n\t\t\tfor ( var field in fieldsNames ) {\n\t\t\t\tvar res = formInputs.filter(function(item, index, array){\n\t\t\t\t\tvar fieldName = item.name;\n\t\t\t\t\tvar fieldType = item.type;\n\t\t\t\t\tif( fieldsNames[field].fieldName === fieldName && fieldsNames[field].fieldType === fieldType ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif( res.length > 0 ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn false;\n}\n\nfunction apbct_get_form_details( form ) {\n\n\tif( form.elements.length > 0 ) {\n\n\t\tvar fieldsNames = {};\n\n\t\t// Collecting fields and their names\n\t\tvar inputs = form.elements;\n\t\tfor (i = 0; i < inputs.length; i++) {\n\t\t\tvar fieldName = inputs[i].name;\n\t\t\tvar fieldType = inputs[i].type;\n\t\t\tfieldsNames[i] = {\n\t\t\t\tfieldName : fieldName,\n\t\t\t\tfieldType : fieldType,\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t'method' : form.method,\n\t\t\t'action' : form.action,\n\t\t\t'fields_count' : form.elements.length,\n\t\t\t'fields_names' : fieldsNames,\n\t\t};\n\t}\n\n\treturn false;\n}\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n\t\tvar elements = document.querySelectorAll('[name^=ct_checkjs]');\n\t\tfor ( var i = 0; i < elements.length; i++ ) {\n\t\t\telements[i].value = result.js_key;\n\t\t}\n\t}\n}\n\nfunction apbctGetScreenInfo() {\n\treturn JSON.stringify({\n\t\tfullWidth : document.documentElement.scrollWidth,\n\t\tfullHeight : Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t),\n\t\tvisibleWidth : document.documentElement.clientWidth,\n\t\tvisibleHeight : document.documentElement.clientHeight,\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\tdocument.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent( \"apbctAjaxBockAlert\", {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tdetail: { message: response.comment }\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\n\t\t\t\t\t// Show the result by modal\n\t\t\t\t\tcleantalkModal.loaded = response.comment;\n\t\t\t\t\tcleantalkModal.open();\n\n\t\t\t\t\tif(+response.stop_script == 1)\n\t\t\t\t\t\twindow.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}"],"names":["apbct_collect_visible_fields","form","inputs","inputs_visible","inputs_visible_count","inputs_invisible","inputs_invisible_count","inputs_with_duplicate_names","key","elements","isNaN","filter","elem","indexOf","getAttribute","push","forEach","i","getComputedStyle","display","visibility","opacity","classList","contains","trim","visible_fields","visible_fields_count","invisible_fields","invisible_fields_count","apbct_visible_fields_set_cookie","visible_fields_collection","form_id","collection","ctPublic","data__cookies_type","ctSetCookie","undefined","JSON","stringify","apbct_visible_fields_already_collected","formsProcessed","length","formMethod","method","formFieldsCount","action","formInputs","fields_count","fieldsNames","fields_names","field","item","index","array","fieldName","name","fieldType","type","apbct_get_form_details","apbct_js_keys__set_input_value","result","data","params","obj","document","querySelectorAll","value","js_key","apbctGetScreenInfo","fullWidth","documentElement","scrollWidth","fullHeight","Math","max","body","scrollHeight","offsetHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","ctScrollCollected","ctMouseMovedCollected","apbct_attach_event_handler","event","callback","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctFunctionFirstKey","KeyTimestamp","floor","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","ctFunctionMouseMove","round","clientY","clientX","clearInterval","checkEmail","e","current_email","target","ctPublicFunctions","data__ajax_type","apbct_public_sendREST","email","timestamp","now","apbct_public_sendAJAX","apbct_ajax","ctSetPixelImg","pixelUrl","pixel__enabled","getElementById","jQuery","append","ajaxType","initCookies","getTimezoneOffset","cookiesArray","cookie","split","cookieName","ctDeleteCookie","pixel__setting","notJson","pixel__url","data__email_check_before_post","blur","setTimeout","processedForms","forms","parentElement","toString","id","onsubmit_prev","onsubmit","ctFormIndex","this","Function","call","ajaxComplete","xhr","settings","response","responseText","parse","apbct","blocked","dispatchEvent","CustomEvent","bubbles","detail","message","comment","cleantalkModal","loaded","open","stop_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,OAEa,IAAxBb,EAASc,aACZ7E,OAAO8E"}
|
1 |
+
{"version":3,"file":"apbct-public.min.js","sources":["apbct-public.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\t\tctCheckedEmails = {},\n\t\tctScrollCollected = false,\n\t\tctMouseMovedCollected = false;\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\t//Writing first key press timestamp\n\tvar ctFunctionFirstKey = function output(event){\n\t\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\t\tctSetCookie(\"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\tctSetCookie(\"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\tctSetMouseMoved();\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\tfunction checkEmail(e) {\n\t\tvar current_email = e.target.value;\n\t\tif (current_email && !(current_email in ctCheckedEmails)) {\n\t\t\t// Using REST API handler\n\t\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\t\tapbct_public_sendREST(\n\t\t\t\t\t'check_email_before_post',\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: {'email' : current_email},\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Using AJAX request and handler\n\t\t\t}else if( ctPublicFunctions.data__ajax_type === 'custom_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tapbct_ajax: 1,\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n\t\t\t\tapbct_public_sendAJAX(\n\t\t\t\t\t{\n\t\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\t\temail : current_email,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctSetPixelImg(pixelUrl) {\n\t\tctSetCookie('apbct_pixel_url', pixelUrl);\n\t\tif( +ctPublic.pixel__enabled ){\n\t\t\tif( ! document.getElementById('apbct_pixel') ) {\n\t\t\t\tjQuery('body').append( '<img alt=\"Cleantalk Pixel\" id=\"apbct_pixel\" style=\"display: none; left: 99999px;\" src=\"' + pixelUrl + '\">' );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction ctGetPixelUrl() {\n\t\t// Using REST API handler\n\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\tapbct_public_sendREST(\n\t\t\t\t'apbct_get_pixel_url',\n\t\t\t\t{\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t// Using AJAX request and handler\n\t\t}else{\n\t\t\tvar ajaxType = ctPublicFunctions.data__ajax_type === 'custom_ajax' ? 1 : 0;\n\t\t\tapbct_public_sendAJAX(\n\t\t\t\t{\n\t\t\t\t\taction: 'apbct_get_pixel_url',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tapbct_ajax: ajaxType,\n\t\t\t\t\tnotJson: true,\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction ctSetHasScrolled() {\n\t\tif( ! ctScrollCollected ) {\n\t\t\tctSetCookie(\"ct_has_scrolled\", 'true');\n\t\t\tctScrollCollected = true;\n\t\t}\n\t}\n\n\tfunction ctSetMouseMoved() {\n\t\tif( ! ctMouseMovedCollected ) {\n\t\t\tctSetCookie(\"ct_mouse_moved\", 'true');\n\t\t\tctMouseMovedCollected = true;\n\t\t}\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\tapbct_attach_event_handler(window, \"scroll\", ctSetHasScrolled);\n\n\t// Ready function\n\tfunction apbct_ready(){\n\n\t\t// Collect scrolling info\n\t\tvar initCookies = [\n\t\t\t[\"ct_ps_timestamp\", Math.floor(new Date().getTime() / 1000)],\n\t\t\t[\"ct_fkp_timestamp\", \"0\"],\n\t\t\t[\"ct_pointer_data\", \"0\"],\n\t\t\t[\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1) ],\n\t\t\t[\"ct_screen_info\", apbctGetScreenInfo()],\n\t\t\t[\"ct_has_scrolled\", 'false'],\n\t\t\t[\"ct_mouse_moved\", 'false'],\n\t\t];\n\n\t\tif( ctPublic.data__cookies_type !== 'native' ) {\n\t\t\tinitCookies.push(['apbct_visible_fields', '0']);\n\t\t} else {\n\t\t\t// Delete all visible fields cookies on load the page\n\t\t\tvar cookiesArray = document.cookie.split(\";\");\n\t\t\tif( cookiesArray.length !== 0 ) {\n\t\t\t\tfor ( var i = 0; i < cookiesArray.length; i++ ) {\n\t\t\t\t\tvar currentCookie = cookiesArray[i].trim();\n\t\t\t\t\tvar cookieName = currentCookie.split(\"=\")[0];\n\t\t\t\t\tif( cookieName.indexOf(\"apbct_visible_fields_\") === 0 ) {\n\t\t\t\t\t\tctDeleteCookie(cookieName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( +ctPublic.pixel__setting ){\n\t\t\tif( +ctPublic.pixel__enabled ){\n\t\t\t\tctGetPixelUrl();\n\t\t\t} else {\n\t\t\t\tinitCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n\t\t\t}\n\t\t}\n\n\t\tif ( +ctPublic.data__email_check_before_post) {\n\t\t\tinitCookies.push(['ct_checked_emails', '0']);\n\t\t\tjQuery(\"input[type = 'email'], #email\").blur(checkEmail);\n\t\t}\n\n\t\tctSetCookie(initCookies);\n\n\t\tsetTimeout(function(){\n\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 forms\n\t\t\t\tif (\n\t\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\n\t\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\n\t\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n\t\t\t\t\t(form.id && form.id === 'caspioform') || //Caspio Form\n\t\t\t\t\t(form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n\t\t\t\t\t(form.classList && form.classList.contains('give-form')) || // GiveWP\n\t\t\t\t\t(form.id && form.id === 'ult-forgot-password-form') || //ult forgot password\n\t\t\t\t\t(form.id && form.id.toString().indexOf('calculatedfields') !== -1) || // CalculatedFieldsForm\n\t\t\t\t\t(form.id && form.id.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\t\t(form.name && form.name.toString().indexOf('cp_tslotsbooking_pform') !== -1) // WP Time Slots Booking Form\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar hiddenInput = document.createElement( 'input' );\n\t\t\t\thiddenInput.setAttribute( 'type', 'hidden' );\n\t\t\t\thiddenInput.setAttribute( 'id', 'apbct_visible_fields_' + i );\n\t\t\t\thiddenInput.setAttribute( 'name', 'apbct_visible_fields');\n\t\t\t\tvar visibleFieldsToInput = {};\n\t\t\t\tvisibleFieldsToInput[0] = apbct_collect_visible_fields(form);\n\t\t\t\thiddenInput.value = JSON.stringify(visibleFieldsToInput);\n\t\t\t\tform.append( hiddenInput );\n\n\t\t\t\tform.onsubmit_prev = form.onsubmit;\n\n\t\t\t\tform.ctFormIndex = i;\n\t\t\t\tform.onsubmit = function (event) {\n\n\t\t\t\t\tif ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n\n\t\t\t\t\t\tvar visible_fields = {};\n\t\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\n\t\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields, event.target.ctFormIndex );\n\t\t\t\t\t}\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\n\t\t}, 1000);\n\t}\n\tapbct_attach_event_handler(window, \"DOMContentLoaded\", apbct_ready);\n\n}());\n\nfunction apbct_collect_visible_fields( form ) {\n\n\t// Get only fields\n\tvar inputs = [],\n\t\tinputs_visible = '',\n\t\tinputs_visible_count = 0,\n\t\tinputs_invisible = '',\n\t\tinputs_invisible_count = 0,\n\t\tinputs_with_duplicate_names = [];\n\n\tfor(var key in form.elements){\n\t\tif(!isNaN(+key))\n\t\t\tinputs[key] = form.elements[key];\n\t}\n\n\t// Filter fields\n\tinputs = inputs.filter(function(elem){\n\n\t\t// Filter already added fields\n\t\tif( inputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 ){\n\t\t\treturn false;\n\t\t}\n\t\t// Filter inputs with same names for type == radio\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\t// Visible fields\n\tinputs.forEach(function(elem, i, elements){\n\t\t// Unnecessary fields\n\t\tif(\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\telem.getAttribute('name') === null ||\n\t\t\telem.getAttribute('name') === 'ct_checkjs'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// Invisible fields\n\t\tif(\n\t\t\tgetComputedStyle(elem).display === \"none\" || // hidden\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\telem.getAttribute(\"type\") === \"hidden\" // type == hidden\n\t\t) {\n\t\t\tif( elem.classList.contains(\"wp-editor-area\") ) {\n\t\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_visible_count++;\n\t\t\t} else {\n\t\t\t\tinputs_invisible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_invisible_count++;\n\t\t\t}\n\t\t}\n\t\t// Visible fields\n\t\telse {\n\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\tinputs_visible_count++;\n\t\t}\n\n\t});\n\n\tinputs_invisible = inputs_invisible.trim();\n\tinputs_visible = inputs_visible.trim();\n\n\treturn {\n\t\tvisible_fields : inputs_visible,\n\t\tvisible_fields_count : inputs_visible_count,\n\t\tinvisible_fields : inputs_invisible,\n\t\tinvisible_fields_count : inputs_invisible_count,\n\t}\n\n}\n\nfunction apbct_visible_fields_set_cookie( visible_fields_collection, form_id ) {\n\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\n\n\tif( ctPublic.data__cookies_type === 'native' ) {\n\t\tfor ( var i in collection ) {\n\t\t\tif ( i > 10 ) {\n\t\t\t\t// Do not generate more than 10 cookies\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar collectionIndex = form_id !== undefined ? form_id : i;\n\t\t\tctSetCookie(\"apbct_visible_fields_\" + collectionIndex, JSON.stringify( collection[i] ) );\n\t\t}\n\t} else {\n\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\n\t}\n}\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n\t\tvar elements = document.querySelectorAll('[name^=ct_checkjs]');\n\t\tfor ( var i = 0; i < elements.length; i++ ) {\n\t\t\telements[i].value = result.js_key;\n\t\t}\n\t}\n}\n\nfunction apbctGetScreenInfo() {\n\treturn JSON.stringify({\n\t\tfullWidth : document.documentElement.scrollWidth,\n\t\tfullHeight : Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t),\n\t\tvisibleWidth : document.documentElement.clientWidth,\n\t\tvisibleHeight : document.documentElement.clientHeight,\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\tdocument.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent( \"apbctAjaxBockAlert\", {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tdetail: { message: response.comment }\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\n\t\t\t\t\t// Show the result by modal\n\t\t\t\t\tcleantalkModal.loaded = response.comment;\n\t\t\t\t\tcleantalkModal.open();\n\n\t\t\t\t\tif(+response.stop_script == 1)\n\t\t\t\t\t\twindow.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}"],"names":["apbct_collect_visible_fields","form","inputs","inputs_visible","inputs_visible_count","inputs_invisible","inputs_invisible_count","inputs_with_duplicate_names","key","elements","isNaN","filter","elem","indexOf","getAttribute","push","forEach","i","getComputedStyle","display","visibility","opacity","classList","contains","trim","visible_fields","visible_fields_count","invisible_fields","invisible_fields_count","apbct_visible_fields_set_cookie","visible_fields_collection","form_id","collection","ctPublic","data__cookies_type","ctSetCookie","undefined","JSON","stringify","apbct_js_keys__set_input_value","result","data","params","obj","document","querySelectorAll","length","value","js_key","apbctGetScreenInfo","fullWidth","documentElement","scrollWidth","fullHeight","Math","max","body","scrollHeight","offsetHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","ct_date","Date","ctTimeMs","getTime","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","ctScrollCollected","ctMouseMovedCollected","apbct_attach_event_handler","event","callback","window","addEventListener","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctFunctionFirstKey","KeyTimestamp","floor","ctMouseReadInterval","setInterval","ctMouseWriteDataInterval","ctFunctionMouseMove","round","clientY","clientX","clearInterval","checkEmail","e","current_email","target","ctPublicFunctions","data__ajax_type","apbct_public_sendREST","method","email","timestamp","now","apbct_public_sendAJAX","action","apbct_ajax","ctSetPixelImg","pixelUrl","pixel__enabled","getElementById","jQuery","append","ajaxType","initCookies","getTimezoneOffset","cookiesArray","cookie","split","cookieName","ctDeleteCookie","pixel__setting","notJson","pixel__url","data__email_check_before_post","blur","setTimeout","forms","hiddenInput","visibleFieldsToInput","parentElement","toString","id","name","createElement","setAttribute","onsubmit_prev","onsubmit","ctFormIndex","this","Function","call","ajaxComplete","xhr","settings","response","responseText","parse","apbct","blocked","dispatchEvent","CustomEvent","bubbles","detail","message","comment","cleantalkModal","loaded","open","stop_script","stop"],"mappings":"AAgSA,SAASA,6BAA8BC,GAGtC,IAAIC,EAAS,GACZC,EAAiB,GACjBC,EAAuB,EACvBC,EAAmB,GACnBC,EAAyB,EACzBC,EAA8B,GAE/B,IAAI,IAAIC,KAAOP,EAAKQ,SACfC,OAAOF,KACVN,EAAOM,GAAOP,EAAKQ,SAASD,IAsD9B,OAlDAN,EAASA,EAAOS,OAAO,SAASC,GAG/B,OAA0E,IAAtEL,EAA4BM,QAASD,EAAKE,aAAa,YAItD,IAAM,CAAC,QAAS,YAAYD,QAASD,EAAKE,aAAa,WAC3DP,EAA4BQ,KAAMH,EAAKE,aAAa,UAC7C,OAMFE,QAAQ,SAASJ,EAAMK,EAAGR,GAGO,WAAtCG,EAAKE,aAAa,SACoB,OAAtCF,EAAKE,aAAa,SACoB,eAAtCF,EAAKE,aAAa,UAMoB,SAAtCI,iBAAiBN,GAAMO,SACe,WAAtCD,iBAAiBN,GAAMQ,YACe,MAAtCF,iBAAiBN,GAAMS,SACe,WAAtCT,EAAKE,aAAa,SAEdF,EAAKU,UAAUC,SAAS,mBAU5BpB,GAAkB,IAAMS,EAAKE,aAAa,QAC1CV,MAPCC,GAAoB,IAAMO,EAAKE,aAAa,QAC5CR,QAWHD,EAAmBA,EAAiBmB,OAG7B,CACNC,eAHDtB,EAAiBA,EAAeqB,OAI/BE,qBAAuBtB,EACvBuB,iBAAmBtB,EACnBuB,uBAAyBtB,GAK3B,SAASuB,gCAAiCC,EAA2BC,GAEpE,IAAIC,EAAkD,iBAA9BF,GAAwE,OAA9BA,EAAsCA,EAA4B,GAEpI,GAAoC,WAAhCG,SAASC,mBACZ,IAAM,IAAIjB,KAAKe,EAAa,CAC3B,GAAS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WAAW,WACVpD,EAAMsB,OAAOwC,cAAcK,KAAKnE,EAAMsB,OAAQtB,IAC5C,SAKJ,OA1RL,GAmZqB,oBAAXqC,QAGTA,OAAOnE,UAAUkG,aAAa,SAAUpE,EAAOqE,EAAKC,GACnD,IACKC,GADDF,EAAIG,eAAwD,IAAxCH,EAAIG,aAAarI,QAAQ,gBAElB,KAD1BoI,EAAW5G,KAAK8G,MAAMJ,EAAIG,eACVE,QACnBH,EAAWA,EAASG,OACPC,UACZzG,SAAS0G,cACR,IAAIC,YAAa,qBAAsB,CACtCC,SAAS,EACTC,OAAQ,CAAEC,QAAST,EAASU,YAK9BC,eAAeC,OAASZ,EAASU,QACjCC,eAAeE,OAEa,IAAxBb,EAASc,aACZnF,OAAOoF"}
|
lib/Cleantalk/ApbctWP/Firewall/AntiCrawler.php
CHANGED
@@ -490,6 +490,8 @@ class AntiCrawler extends \Cleantalk\Common\Firewall\FirewallModule
|
|
490 |
{
|
491 |
global $apbct;
|
492 |
|
|
|
|
|
493 |
$localize_js = array(
|
494 |
'_ajax_nonce' => wp_create_nonce('ct_secret_stuff'),
|
495 |
'_rest_nonce' => wp_create_nonce('wp_rest'),
|
490 |
{
|
491 |
global $apbct;
|
492 |
|
493 |
+
parent::diePage('');
|
494 |
+
|
495 |
$localize_js = array(
|
496 |
'_ajax_nonce' => wp_create_nonce('ct_secret_stuff'),
|
497 |
'_rest_nonce' => wp_create_nonce('wp_rest'),
|
lib/Cleantalk/ApbctWP/Firewall/AntiFlood.php
CHANGED
@@ -202,8 +202,6 @@ class AntiFlood extends \Cleantalk\Common\Firewall\FirewallModule
|
|
202 |
|
203 |
public function diePage($result)
|
204 |
{
|
205 |
-
parent::diePage($result);
|
206 |
-
|
207 |
global $apbct;
|
208 |
|
209 |
// File exists?
|
@@ -255,6 +253,8 @@ class AntiFlood extends \Cleantalk\Common\Firewall\FirewallModule
|
|
255 |
{
|
256 |
global $apbct;
|
257 |
|
|
|
|
|
258 |
$localize_js = array(
|
259 |
'_ajax_nonce' => wp_create_nonce('ct_secret_stuff'),
|
260 |
'_rest_nonce' => wp_create_nonce('wp_rest'),
|
202 |
|
203 |
public function diePage($result)
|
204 |
{
|
|
|
|
|
205 |
global $apbct;
|
206 |
|
207 |
// File exists?
|
253 |
{
|
254 |
global $apbct;
|
255 |
|
256 |
+
parent::diePage('');
|
257 |
+
|
258 |
$localize_js = array(
|
259 |
'_ajax_nonce' => wp_create_nonce('ct_secret_stuff'),
|
260 |
'_rest_nonce' => wp_create_nonce('wp_rest'),
|
lib/Cleantalk/ApbctWP/Firewall/SFW.php
CHANGED
@@ -269,8 +269,6 @@ class SFW extends \Cleantalk\Common\Firewall\FirewallModule
|
|
269 |
{
|
270 |
global $apbct;
|
271 |
|
272 |
-
parent::diePage($result);
|
273 |
-
|
274 |
// Statistics
|
275 |
if ( ! empty($this->blocked_ips)) {
|
276 |
reset($this->blocked_ips);
|
@@ -403,6 +401,8 @@ class SFW extends \Cleantalk\Common\Firewall\FirewallModule
|
|
403 |
{
|
404 |
global $apbct;
|
405 |
|
|
|
|
|
406 |
$localize_js = array(
|
407 |
'_ajax_nonce' => wp_create_nonce('ct_secret_stuff'),
|
408 |
'_rest_nonce' => wp_create_nonce('wp_rest'),
|
269 |
{
|
270 |
global $apbct;
|
271 |
|
|
|
|
|
272 |
// Statistics
|
273 |
if ( ! empty($this->blocked_ips)) {
|
274 |
reset($this->blocked_ips);
|
401 |
{
|
402 |
global $apbct;
|
403 |
|
404 |
+
parent::diePage('');
|
405 |
+
|
406 |
$localize_js = array(
|
407 |
'_ajax_nonce' => wp_create_nonce('ct_secret_stuff'),
|
408 |
'_rest_nonce' => wp_create_nonce('wp_rest'),
|
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.9
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 5.
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -151,7 +151,7 @@ https://s.w.org/plugins/cleantalk-spam-protect/screenshot-5.png?r=1288723
|
|
151 |
* Anti-Spam by CleanTalk plugin sends action parameters into the CleanTalk cloud
|
152 |
* Service analyzes the parameters
|
153 |
* If this is a visitor, the comment will be published. If it's a spam bot, then CleanTalk blocks this comment or registration.
|
154 |
-
* Parameters are written to the spam log which can be viewed in the
|
155 |
|
156 |
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
|
157 |
your safety.
|
@@ -207,7 +207,6 @@ our own CleanTalk Cloud Service. Anti Spam by CleanTalk offers a free trial, you
|
|
207 |
|
208 |
= Additional features =
|
209 |
* Daily and weekly detailed anti-spam reports: traffic VS spam.
|
210 |
-
* Apps for iPhone, Android to control anti-spam service, comments, signups, contacts, traffic and spam stats for the last 7 days.
|
211 |
* AntiSpam apps for most popular CMS on cleantalk.org.
|
212 |
|
213 |
= How to protect sites from spam bots without CAPTCHA? =
|
@@ -347,7 +346,7 @@ Yes, it is. The plugin doesn't block mobile visitors as well as desktop website
|
|
347 |
Spam comments are being moved to SPAM folder by default or you can set the option to ban spam comments silently.
|
348 |
|
349 |
= How can I test the anti-spam protection? =
|
350 |
-
Please use the email **stop_email@example.com** for comments, contacts or signups to see how the anti-spam protection works. Also you can see the logs for the last 7 days
|
351 |
|
352 |
= Is the plugin effective against spam bots? =
|
353 |
The plugin Anti-Spam by CleanTalk stops up to 99.998% of spam comments, spam signups (registrations), spam contact emails, spam subscriptions, spam bookings or spam orders.
|
@@ -506,8 +505,8 @@ To close the notice please save the plugin settings again or it will be closed a
|
|
506 |
= I'm using PHP 4.2 version and i'm getting errors related with JSON. Why does it happens? =
|
507 |
С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.
|
508 |
|
509 |
-
= Should I change anything in the plugin's settings or in my CleanTalk
|
510 |
-
No. You don't need to change anything in the plugin's settings or in your CleanTalk
|
511 |
|
512 |
= How to use Anti-Spam Log? =
|
513 |
The following possibilities are available for you in the Anti-Spam Log:
|
@@ -595,6 +594,31 @@ If your website has forms that send data to external sources, you can enable opt
|
|
595 |
|
596 |
== Changelog ==
|
597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
= 5.170 Jan 13 2022 =
|
599 |
#### One integration added, CleanTalk pixel functionality fixed and minor issues fixed.
|
600 |
* Mod: Added Ova Login Integration. Registrations under protection
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 5.171
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
151 |
* Anti-Spam by CleanTalk plugin sends action parameters into the CleanTalk cloud
|
152 |
* Service analyzes the parameters
|
153 |
* If this is a visitor, the comment will be published. If it's a spam bot, then CleanTalk blocks this comment or registration.
|
154 |
+
* Parameters are written to the spam log which can be viewed in the service Dashboard.
|
155 |
|
156 |
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
|
157 |
your safety.
|
207 |
|
208 |
= Additional features =
|
209 |
* Daily and weekly detailed anti-spam reports: traffic VS spam.
|
|
|
210 |
* AntiSpam apps for most popular CMS on cleantalk.org.
|
211 |
|
212 |
= How to protect sites from spam bots without CAPTCHA? =
|
346 |
Spam comments are being moved to SPAM folder by default or you can set the option to ban spam comments silently.
|
347 |
|
348 |
= How can I test the anti-spam protection? =
|
349 |
+
Please use the email **stop_email@example.com** for comments, contacts or signups to see how the anti-spam protection works. Also, you can see the logs for the last 7 days in the <a href="http://cleantalk.org/my/show_requests">Dashboard</a> or look at the folder "Spam" for banned comments.
|
350 |
|
351 |
= Is the plugin effective against spam bots? =
|
352 |
The plugin Anti-Spam by CleanTalk stops up to 99.998% of spam comments, spam signups (registrations), spam contact emails, spam subscriptions, spam bookings or spam orders.
|
505 |
= I'm using PHP 4.2 version and i'm getting errors related with JSON. Why does it happens? =
|
506 |
С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.
|
507 |
|
508 |
+
= Should I change anything in the plugin's settings or in my CleanTalk Dashboard when I switch my website from HTTP to HTTPS or vice versa? =
|
509 |
+
No. You don't need to change anything in the plugin's settings or in your CleanTalk Dashboard. The plugin will work regardless of the protocol.
|
510 |
|
511 |
= How to use Anti-Spam Log? =
|
512 |
The following possibilities are available for you in the Anti-Spam Log:
|
594 |
|
595 |
== Changelog ==
|
596 |
|
597 |
+
= 5.171 Feb 03 2022 =
|
598 |
+
#### Visible fields processing modified, many excepted requests are skipped, SFW compatibility with a cache fixed and minor issues fixed.
|
599 |
+
* New. Exclusions. Excluded some service requests from checking but log them with exception flag.
|
600 |
+
* Upd. Visible fields. Storing visible fields into an input.
|
601 |
+
* Upd. Visible fields. Visible fields processing modified.
|
602 |
+
* Upd. Visible fields. Replacing redundant service field.
|
603 |
+
* Fix: SFW. Caching block page prevented.
|
604 |
+
* Fix: Skip. Entry Views plugin service requests.
|
605 |
+
* Fix: Antispam. Ajax checking moved to the plugins_loaded hook.
|
606 |
+
* Fix: Skip. APBCT plugin service requests.
|
607 |
+
* Fix: Skip. Vault Press (JetPack) plugin service requests.
|
608 |
+
* Fix: Skip. GridBuilder plugin service requests.
|
609 |
+
* Fix: Skip. Woo Gift Wrapper plugin service requests.
|
610 |
+
* Fix: Skip. iThemes Security plugin service requests.
|
611 |
+
* Fix: Settings. Using new API key when sending local settings to the cloud.
|
612 |
+
* Fix. Integration. Registration form of eMember plugin.
|
613 |
+
* Fix. Exception action. Xmlrpc requests skipped.
|
614 |
+
* Fix. Integration. Elementor pro forms integration fixed.
|
615 |
+
* Fix: Excluded from the test the standard check for Formidable Form Plugin in some situations
|
616 |
+
* Fix: Skip. Microsoft Azure Storage plugin service requests.
|
617 |
+
* Fix: Skip. AdRotate plugin service requests.
|
618 |
+
* Fix: Skip. Super admin requests.
|
619 |
+
* Fix: Fixed the block message for HappyForms
|
620 |
+
* Fix: Excluded the form of WP Time Slots Booking Form from apbct_ready()
|
621 |
+
|
622 |
= 5.170 Jan 13 2022 =
|
623 |
#### One integration added, CleanTalk pixel functionality fixed and minor issues fixed.
|
624 |
* Mod: Added Ova Login Integration. Registrations under protection
|