Skip to content

Commit

Permalink
fix text visiblity issue on artist page and occasional missing shooti…
Browse files Browse the repository at this point in the history
…ng stars
  • Loading branch information
b-chen00 committed Sep 20, 2024
1 parent fc69490 commit 29d6201
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
29 changes: 14 additions & 15 deletions StarryNight/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,23 @@ waitForElement(['.Root__top-container'], ([topContainer]) => {

resizeObserver.observe(rightbar);

// start or stop spinning animation based on whether something is playing
const targetElement = document.querySelector('[data-encore-id="buttonPrimary"]');

const playObserver = new MutationObserver((mutationsList, observer) => {
for (const mutation of mutationsList) {
if (
mutation.type === 'attributes' &&
mutation.attributeName === 'aria-label'
) {
handleLabelChange();
waitForElement(['[data-encore-id="buttonPrimary"]'], ([targetElement]) => {
// start or stop spinning animation based on whether something is playing
const playObserver = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (
mutation.type === 'attributes' &&
mutation.attributeName === 'aria-label'
) {
handleLabelChange();
}
}
}
});

const playConfig = { attributes: true, attributeFilter: ['aria-label'] };
playObserver.observe(targetElement, playConfig);
});

const playConfig = { attributes: true, attributeFilter: ['aria-label'] };

playObserver.observe(targetElement, playConfig);

function handleLabelChange() {
const img = document.querySelector(
'.main-nowPlayingWidget-coverArt .cover-art img'
Expand Down
21 changes: 11 additions & 10 deletions StarryNight/user.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
background-color: #00000000 !important;
}

.main-actionBarBackground-background {
background-color: #00000000 !important;
}

.main-home-homeHeader {
background-color: #00000000 !important;
background-image: none !important;
}

.Root__top-container {
Expand Down Expand Up @@ -75,15 +72,19 @@
}

.main-actionBarBackground-background {
background-image: linear-gradient(rgba(var(--spice-rgb-shadow), .6) 0, #000000 100%), #00000000 !important;
background-image: none;
background-color: #00000000 !important;
animation: none !important;
-webkit-animation: none !important;
}

.main-entityHeader-background.main-entityHeader-overlay {
background-image: none !important;
.main-entityHeader-overlay {
background: none !important;
}

.main-entityHeader-background.main-entityHeader-gradient {
opacity: 0.5;
animation: none !important;
-webkit-animation: none !important;
}

.main-entityHeader-background.main-entityHeader-overlay:after {
Expand All @@ -93,7 +94,7 @@
}

.pUNc2aOeOQANHrhYa1GU .RDZ61ETnag1ilfZTkVxe {
color: #000000 !important;
color: #00000000 !important;
}

.playlist-playlist-playlistContent {
Expand Down Expand Up @@ -123,7 +124,7 @@
}

.main-home-homeHeader {
background-image: linear-gradient(rgba(var(--spice-rgb-shadow), .6) 0, #00000000 100%), var(--background-noise);
background-image: linear-gradient(rgba(var(--spice-rgb-shadow), .6) 0, #000000 100%), var(--background-noise);
}

.main-nowPlayingBar-center {
Expand Down

0 comments on commit 29d6201

Please sign in to comment.