Skip to content

Commit

Permalink
Fix: Bookmarks should load before background
Browse files Browse the repository at this point in the history
This prevents the delay in their display, in case the network is slow.
  • Loading branch information
lscambo13 committed Feb 11, 2023
1 parent 4d59b34 commit 627fe74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,9 @@ function resolve_wallpapers() {
}

document.addEventListener("DOMContentLoaded", async () => {
// Add wallpapers to HTML
load_bookmarks();

// Add wallpapers to HTML
var response = await fetch(
"https://raw.githubusercontent.com/lscambo13/casamia/main/wallpapers/wallpapers_list.json"
);
Expand Down Expand Up @@ -606,7 +607,6 @@ document.addEventListener("DOMContentLoaded", async () => {
load_settings();
set_wallpaper(selected_wallpaper, color);
highlight_set_wallpaper();
load_bookmarks();

// Make the DIV element draggable:
dragElement(document.getElementById("labs"));
Expand Down

0 comments on commit 627fe74

Please sign in to comment.