Changeset 3413544
- Timestamp:
- 12/07/2025 02:44:10 PM (4 months ago)
- Location:
- spam-prevention-for-contact-form-7-and-comments/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
public/sitelint-public.php (modified) (2 diffs)
-
sitelint.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spam-prevention-for-contact-form-7-and-comments/trunk/README.txt
r3383919 r3413544 3 3 Tags: contact form 7,comments,spam,prevent,protection 4 4 Requires at least: 4.7 5 Tested up to: 6. 8.36 Stable tag: 1.3.2 05 Tested up to: 6.9 6 Stable tag: 1.3.21 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 27 27 28 28 == Changelog == 29 30 = 1.3.21 = 31 32 * Add hidden field on the user action only 29 33 30 34 = 1.3.20 = -
spam-prevention-for-contact-form-7-and-comments/trunk/public/sitelint-public.php
r3383919 r3413544 108 108 } 109 109 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 111 115 const input = document.createElement('input'); 112 116 input.type = 'hidden'; … … 116 120 }; 117 121 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 }); 125 124 } 126 125 })(); -
spam-prevention-for-contact-form-7-and-comments/trunk/sitelint.php
r3383919 r3413544 10 10 * Plugin Name: Spam Prevention for Contact Form 7 and Comments 11 11 * Description: Automatic Spam Prevention for Contact Form 7 and Comments 12 * Version: 1.3.2 012 * Version: 1.3.21 13 13 * Author: SiteLint 14 14 * Author URI: https://www.sitelint.com … … 27 27 * Currently plugin version. Use SemVer - https://semver.org 28 28 */ 29 define('SLSP_SITELINT_VERSION', '1.3.2 0');29 define('SLSP_SITELINT_VERSION', '1.3.21'); 30 30 31 31 /**
Note: See TracChangeset
for help on using the changeset viewer.