aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-10-30 08:18:02 +0100
committerGravatar GitHub <noreply@github.com> 2025-10-30 08:18:02 +0100
commitf97d774c59711245e0efa47018afdcabe0620505 (patch)
treeef881d556a80fc6ab19a80182a9a68128eb05f1e /p
parent53c1562cc096e21b471993bd38bf9b10012ea433 (diff)
Fix `console.log()` spam due to lack of `window.bcrypt` object (#8166)
Harmless bug introduced in https://github.com/FreshRSS/FreshRSS/pull/7877 Before: <img width="1580" height="96" alt="image" src="https://github.com/user-attachments/assets/eaebd4fc-fb40-49ec-83af-43bde3009b00" /> (load *Archiving* page for example, `init_crypto_forms()` is not called on view pages)
Diffstat (limited to 'p')
-rw-r--r--p/scripts/extra.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index 476970c3b..2e956d6db 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -17,6 +17,11 @@ function forgetOpenCategories() {
}
function init_crypto_forms() {
+ const crypto_forms = document.querySelectorAll('.crypto-form');
+ if (crypto_forms.length === 0) {
+ return;
+ }
+
if (!(window.bcrypt)) {
if (window.console) {
console.log('FreshRSS waiting for bcrypt.js…');
@@ -26,7 +31,6 @@ function init_crypto_forms() {
}
/* globals bcrypt */
- const crypto_forms = document.querySelectorAll('.crypto-form');
crypto_forms.forEach(crypto_form => {
const submit_button = crypto_form.querySelector('[type="submit"]');
if (submit_button) {