mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-26 13:08:38 -04:00
Fix js errors (#3980)
* fixed missed popup
* fix missed document.getElementById('loginButton')
* make fix-all
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
1 parent
e61906b5e7
commit
f12637d2b2
2 files changed
+24
-17
No files matched your search
+9
-3
@@ -51,10 +51,14 @@ function init_crypto_form() {
|
||||
forgetOpenCategories();
|
||||
|
||||
const submit_button = document.getElementById('loginButton');
|
||||
submit_button.disabled = false;
|
||||
if (submit_button) {
|
||||
submit_button.disabled = false;
|
||||
}
|
||||
|
||||
crypto_form.onsubmit = function (e) {
|
||||
submit_button.disabled = true;
|
||||
if (submit_button) {
|
||||
submit_button.disabled = true;
|
||||
}
|
||||
let success = false;
|
||||
|
||||
const req = new XMLHttpRequest();
|
||||
@@ -86,7 +90,9 @@ function init_crypto_form() {
|
||||
req.onerror();
|
||||
}
|
||||
|
||||
submit_button.disabled = false;
|
||||
if (submit_button) {
|
||||
submit_button.disabled = false;
|
||||
}
|
||||
return success;
|
||||
};
|
||||
}
|
||||
|
||||
+15
-14
@@ -1392,23 +1392,24 @@ function closePopup() {
|
||||
function init_popup() {
|
||||
// Fetch elements.
|
||||
popup = document.getElementById('popup');
|
||||
if (popup) {
|
||||
popup_iframe_container = document.getElementById('popup-iframe-container');
|
||||
popup_iframe = document.getElementById('popup-iframe');
|
||||
|
||||
popup_iframe_container = document.getElementById('popup-iframe-container');
|
||||
popup_iframe = document.getElementById('popup-iframe');
|
||||
popup_txt = document.getElementById('popup-txt');
|
||||
|
||||
popup_txt = document.getElementById('popup-txt');
|
||||
|
||||
// Configure close button.
|
||||
document.getElementById('popup-close').addEventListener('click', function (ev) {
|
||||
closePopup();
|
||||
});
|
||||
|
||||
// Configure close-on-click.
|
||||
window.addEventListener('click', function (ev) {
|
||||
if (ev.target == popup) {
|
||||
// Configure close button.
|
||||
document.getElementById('popup-close').addEventListener('click', function (ev) {
|
||||
closePopup();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Configure close-on-click.
|
||||
window.addEventListener('click', function (ev) {
|
||||
if (ev.target == popup) {
|
||||
closePopup();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// </popup>
|
||||
|
||||
|
||||
Reference in new issue
Block a user