From 156cd269271b0eb264b40775e1ac365d0980ad3e Mon Sep 17 00:00:00 2001 From: lscambo13 Date: Sat, 16 Sep 2023 21:07:44 +0530 Subject: [PATCH] fix: Going back from Settings should work now had removed accidentally :p --- index.html | 4 ++-- index.js | 18 +++++++++--------- js_modules/modals/advanced_settings.js | 14 +++++++------- style.css | 20 ++++---------------- 4 files changed, 22 insertions(+), 34 deletions(-) diff --git a/index.html b/index.html index 034fa8b..1653eab 100644 --- a/index.html +++ b/index.html @@ -67,8 +67,8 @@

Welcome

+ class="fa fa-plus"> diff --git a/index.js b/index.js index d07d160..8fa1493 100644 --- a/index.js +++ b/index.js @@ -279,16 +279,16 @@ document.addEventListener('DOMContentLoaded', async () => { // ---------------------------------------------------------- End -// window.addEventListener('hashchange', () => { -// const url = document.URL; +window.addEventListener('hashchange', () => { + const url = document.URL; -// if (!url.includes('#wallpapers')) { -// // console.log('url found'); -// hideWallpapers('body'); -// closeAdvancedSettings(); -// } -// console.log('go back'); -// }); + if (!url.includes('#wallpapers')) { + // console.log('url found'); + hideWallpapers('body'); + closeAdvancedSettings(); + } + // console.log('go back'); +}); window.addEventListener('blur', () => { hideLoading(); diff --git a/js_modules/modals/advanced_settings.js b/js_modules/modals/advanced_settings.js index 58353c8..97d5913 100644 --- a/js_modules/modals/advanced_settings.js +++ b/js_modules/modals/advanced_settings.js @@ -1,15 +1,15 @@ const modal = document.getElementById('advanced-settings-modal'); const modalBackground = - document.getElementById('advanced-settings-modal-background-overlay'); + document.getElementById('advanced-settings-modal-background-overlay'); export function openAdvancedSettings() { - document.title = document.title.replace('Backgrounds', 'Settings'); - modal.style.display = 'block'; - modalBackground.style.display = 'block'; + document.title = document.title.replace('Backgrounds', 'Settings'); + modal.style.display = 'block'; + modalBackground.style.display = 'block'; }; export function closeAdvancedSettings() { - document.title = document.title.replace('Settings', 'Search'); - modal.style.display = 'none'; - modalBackground.style.display = 'none'; + document.title = document.title.replace('Settings', 'Search'); + modal.style.display = 'none'; + modalBackground.style.display = 'none'; }; diff --git a/style.css b/style.css index c71e4ed..10c733e 100644 --- a/style.css +++ b/style.css @@ -661,9 +661,8 @@ input[type=checkbox] { backdrop-filter: blur(3em); -webkit-backdrop-filter: blur(3em); z-index: 2; - animation-name: animatetop; - animation-duration: .25s; - display: none + display: none; + /* transition: 300ms; */ } #advanced-settings-modal { @@ -678,19 +677,8 @@ input[type=checkbox] { /* backdrop-filter: blur(1em); -webkit-backdrop-filter: blur(1em); */ cursor: default; - animation-name: animatetop; - animation-duration: .25s; - display: none -} - -@keyframes animatetop { - from { - opacity: 0 - } - - to { - opacity: 1 - } + display: none; + /* transition: 300ms; */ } #btn-install {