diff options
author | 0neGal <mail@0negal.com> | 2024-06-09 18:09:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-09 18:09:26 +0200 |
commit | 04b0e9fcea6c60257d7bc68994103eacb340a82b (patch) | |
tree | cd46c3c09f11f839eebb0e4dc682ca6c85689bf6 /src/app/js/popups.js | |
parent | 3904a4492f72ef9a9fd531c0b81f3711541c97e0 (diff) | |
parent | aa53f7a5fd5408596d6cc1ea579d68d1ae897698 (diff) | |
download | Viper-04b0e9fcea6c60257d7bc68994103eacb340a82b.tar.gz Viper-04b0e9fcea6c60257d7bc68994103eacb340a82b.zip |
Merge pull request #237 from 0neGal/modularized-frontend
chore: Modularize the frontend code
Generally this should be fine, there might still be some uncaught bugs, but it hopefully isn't anything too major.
Diffstat (limited to 'src/app/js/popups.js')
-rw-r--r-- | src/app/js/popups.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app/js/popups.js b/src/app/js/popups.js index 7411180..10c6995 100644 --- a/src/app/js/popups.js +++ b/src/app/js/popups.js @@ -43,7 +43,7 @@ popups.list = () => { return document.querySelectorAll(".popup"); } -popups.set_all = (state, exclude_popup) => { +popups.set_all = (state = false, exclude_popup) => { let popups_list = document.querySelectorAll(".popup.shown"); for (let i = 0; i < popups_list.length; i++) { @@ -51,6 +51,8 @@ popups.set_all = (state, exclude_popup) => { continue; } - popups.set(popups_list[i], false, false); + popups.set(popups_list[i], state, false); } } + +module.exports = popups; |