diff options
author | 0neGal <mail@0negal.com> | 2024-01-20 01:58:14 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-01-20 01:58:14 +0100 |
commit | c03ce1dc5b1e320a94ef6307aa4c32132c5bf33c (patch) | |
tree | 2bde427830974dbec8b4881801e05cd88138c961 /src/app/js/browser.js | |
parent | e2bae48724505c5b09b6bb28f053b8492bd66ba6 (diff) | |
download | Viper-c03ce1dc5b1e320a94ef6307aa4c32132c5bf33c.tar.gz Viper-c03ce1dc5b1e320a94ef6307aa4c32132c5bf33c.zip |
added src/app/js/popups.js
This makes opening and closing popups a little bit easier, on top of it,
it also fixes a bug where you could open the settings popup on top of
the browser popup or other popups, and it'd hide the background blur,
but still show both popups.
Diffstat (limited to 'src/app/js/browser.js')
-rw-r--r-- | src/app/js/browser.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/app/js/browser.js b/src/app/js/browser.js index cd162e6..7ca2729 100644 --- a/src/app/js/browser.js +++ b/src/app/js/browser.js @@ -87,28 +87,16 @@ var Browser = { }, }, toggle: (state) => { - if (state) { - browser.scrollTo(0, 0); - overlay.classList.add("shown"); - browser.classList.add("shown"); + browser.scrollTo(0, 0); + popups.set("#browser", state); + if (state) { if (browserEntries.querySelectorAll(".el").length == 0) { Browser.loadfront(); } - return - } else if (! state) { - if (state != undefined) { - Browser.filters.toggle(false); - overlay.classList.remove("shown"); - browser.classList.remove("shown"); - preview.classList.remove("shown"); - return - } + } else if (state === false) { + Browser.filters.toggle(false); } - - browser.scrollTo(0, 0); - overlay.classList.toggle("shown"); - browser.classList.toggle("shown"); }, install: (package_obj, clear_queue = false) => { return installFromURL( |