From b404e47f65ad6794d3a8867a001df90833f76cf1 Mon Sep 17 00:00:00 2001 From: Julien Maille Date: Sat, 26 Jun 2021 00:21:03 +0200 Subject: [PATCH] color tweaks --- dribbblish-dynamic.js | 11 +---------- dribbblish.js | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/dribbblish-dynamic.js b/dribbblish-dynamic.js index 5659e8b..e86f50d 100644 --- a/dribbblish-dynamic.js +++ b/dribbblish-dynamic.js @@ -52,7 +52,7 @@ document.styleSheets[0].insertRule(` .main-navBar-navBar a:hover, .main-navBar-navBar a:hover span, .main-buddyFeed-activityMetadata a:hover { - color: var(--spice-button) !important; + color: var(--spice-shadow) !important; }`) document.styleSheets[0].insertRule(` @@ -72,15 +72,6 @@ document.styleSheets[0].insertRule(` }`) /* js */ -function waitForElement(els, func, timeout = 100) { - const queries = els.map(el => document.querySelector(el)); - if (queries.every(a => a)) { - func(queries); - } else if (timeout > 0) { - setTimeout(waitForElement, 300, els, func, --timeout); - } -} - function getAlbumInfo(uri) { return Spicetify.CosmosAsync.get(`hm://album/v1/album-app/album/${uri}/desktop`); } diff --git a/dribbblish.js b/dribbblish.js index ace0105..79e1767 100644 --- a/dribbblish.js +++ b/dribbblish.js @@ -95,7 +95,7 @@ waitForElement([".Root__main-view"], ([mainView]) => { waitForElement([`.main-rootlist-rootlistPlaylistsScrollNode ul[tabindex="0"]`], ([query]) => { const fade = document.createElement("div"); fade.id = "dribbblish-sidebar-fade-in"; - queries[0].append(fade); + query.append(fade); }); waitForElement([