diff options
author | ThibG <thib@sitedethib.com> | 2020-12-10 10:25:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 10:25:52 +0100 |
commit | cbe9b0640ba4d466c8b24fb233dff60e9f8d00f0 (patch) | |
tree | 4e814a622966f1b71f18c1ff41116c75f0728afc /app/javascript/packs | |
parent | b27d11dd3320cb005561f0bb1b81baecea8a7c43 (diff) | |
parent | 9a5825f864b9e9c545e995249518bb50a74f4359 (diff) |
Merge pull request #1473 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/packs')
-rw-r--r-- | app/javascript/packs/public.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 3f6700195..2166d8df0 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -155,6 +155,17 @@ function main() { target.style.display = 'block'; } }); + + // Empty the honeypot fields in JS in case something like an extension + // automatically filled them. + delegate(document, '#registration_new_user,#new_user', 'submit', () => { + ['user_website', 'user_confirm_password', 'registration_user_website', 'registration_user_confirm_password'].forEach(id => { + const field = document.getElementById(id); + if (field) { + field.value = ''; + } + }); + }); } loadPolyfills() |