PageSourceSearch

https://wpforms.com/wp-content/plugins/am-site-security/assets/js/remove-numbers-from-comments.js?ver=5.2.3

js wpforms.com collected 2026-09-24 06:54:11 UTC 834 bytes, 28 lines download raw bytes

1/**
2  * This JavaScript file removes any numbers from the author name field in comment
3  * forms. It listens for when users finish typing in the author field and
4  * automatically strips out any numerical digits, helping prevent user enumeration
5  * through comments.
6  *
7  * This code is from the 'Stop User Enumeration' plugin.
8  * https://wordpress.org/plugins/stop-user-enumeration/
9  */
10document.addEventListener('DOMContentLoaded', function () {
11    var commentForm = document.getElementById("commentform");
12    if (null === commentForm) {
13        return;
14    }
15
16    var author = commentForm.querySelector("#author");
17    if (null === author) {
18        return;
19    }
20
21    author.addEventListener(
22        'blur',
23        function () {
24            this.value = this.value.replace(/\d+/g, '');
25        },
26        false
27    );
28});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.