Plugin Directory

Changeset 3413544


Ignore:
Timestamp:
12/07/2025 02:44:10 PM (4 months ago)
Author:
ctomczyk
Message:

Release version 1.3.21

Location:
spam-prevention-for-contact-form-7-and-comments/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • spam-prevention-for-contact-form-7-and-comments/trunk/README.txt

    r3383919 r3413544  
    33Tags: contact form 7,comments,spam,prevent,protection
    44Requires at least: 4.7
    5 Tested up to: 6.8.3
    6 Stable tag: 1.3.20
     5Tested up to: 6.9
     6Stable tag: 1.3.21
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Changelog ==
     29
     30= 1.3.21 =
     31
     32* Add hidden field on the user action only
    2933
    3034= 1.3.20 =
  • spam-prevention-for-contact-form-7-and-comments/trunk/public/sitelint-public.php

    r3383919 r3413544  
    108108              }
    109109
    110               const addField = () => {
     110              const events = ['mousedown', 'mousemove', 'keydown', 'touchstart', 'scroll', 'wheel'];
     111
     112              const onContactFormFevent = () => {
     113                events.forEach(ev => document.removeEventListener(ev, onContactFormFevent));
     114
    111115                const input = document.createElement('input');
    112116                input.type = 'hidden';
     
    116120              };
    117121
    118               const rect = form.getBoundingClientRect();
    119               const fullyVisible = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
    120 
    121               if (fullyVisible) {
    122                 addField();
    123               } else {
    124                 document.addEventListener('scroll', addField, { once: true });
     122              for (const event of events) {
     123                document.addEventListener(event, onContactFormFevent, { once: true });
    125124              }
    126125            })();
  • spam-prevention-for-contact-form-7-and-comments/trunk/sitelint.php

    r3383919 r3413544  
    1010 * Plugin Name:       Spam Prevention for Contact Form 7 and Comments
    1111 * Description:       Automatic Spam Prevention for Contact Form 7 and Comments
    12  * Version:           1.3.20
     12 * Version:           1.3.21
    1313 * Author:            SiteLint
    1414 * Author URI:        https://www.sitelint.com
     
    2727 * Currently plugin version. Use SemVer - https://semver.org
    2828 */
    29 define('SLSP_SITELINT_VERSION', '1.3.20');
     29define('SLSP_SITELINT_VERSION', '1.3.21');
    3030
    3131/**
Note: See TracChangeset for help on using the changeset viewer.