Skip to content

Commit

Permalink
fix: Going back from Settings should work now
Browse files Browse the repository at this point in the history
had removed accidentally :p
  • Loading branch information
lscambo13 committed Sep 16, 2023
1 parent 407fcf4 commit 156cd26
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 34 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ <h1 id="widget-4" class="widget-slide brush-text-style-3 has-shadow">Welcome</h1
<div id="ebooks-search" class="predefined-bookmark clickable" tabindex="1"><i
class="flaticon-ebook"></i></div>
<div onclick="createNewBookmark()" class="clickable" id="add_bookmark_button" tabindex="2"><i
class="fa fa-plus"></i></div><a onclick="hideWallpapers('button', event)" class="clickable"
id="settings_button" tabindex="2"><i class="fa fa-gear"></i></a></a>
class="fa fa-plus"></i></div><a href="#wallpapers" onclick="hideWallpapers('button', event)"
class="clickable" id="settings_button" tabindex="2"><i class="fa fa-gear"></i></a></a>
</div>
</div>
</div>
Expand Down
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
14 changes: 7 additions & 7 deletions js_modules/modals/advanced_settings.js
Original file line number Diff line number Diff line change
@@ -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';
};
20 changes: 4 additions & 16 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 156cd26

Please sign in to comment.