Skip to content

Commit

Permalink
fix(sidebarConfig): personal-library dragover styling (spicetify#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrie25 authored Sep 1, 2022
1 parent 61cc9a6 commit 811877b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jsHelper/sidebarConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
ele.dataset.id = link.pathname;
}
ele.classList.add("personal-library");
new MutationObserver((mutations) => {
for (const mutation of mutations) {
if (mutation.type === "attributes" && mutation.attributeName === "class") {
if (!mutation.target.classList.contains("personal-library")) {
mutation.target.classList.add("personal-library");
}
}
}
}).observe(ele, { attributes: true, attributeFilter: ["class"] });

buttons.push(ele);
}

Expand Down

0 comments on commit 811877b

Please sign in to comment.