Browse Source

fix: themesong integration stuff

Sv443 8 months ago
parent
commit
f772d0cf14
5 changed files with 13 additions and 13 deletions
  1. 4 4
      dist/BetterYTM.css
  2. 4 0
      src/features/integrations.css
  3. 1 1
      src/features/integrations.ts
  4. 0 4
      src/features/layout.css
  5. 4 4
      src/index.ts

+ 4 - 4
dist/BetterYTM.css

@@ -1375,10 +1375,6 @@ hr {
 
 /* #region misc */
 
-:root {
-  --bytm-themed-bg: var(--ts-playerpage-color, #030303);
-}
-
 .bytm-disable-scroll {
   overflow: hidden !important;
 }
@@ -1966,6 +1962,10 @@ body.bytm-dom-ytm
   color: var(--ytmusic-subscribe-button-color, rgba(255, 255, 255, 0.7));
 }
 
+:root {
+  --bytm-themed-bg: var(--ts-playerpage-color, #030303);
+}
+
 #ts-visualizer-container #ThemeSong-Visualizer canvas {
   /* Fix for the thumbnail overlay */
   z-index: 1;

+ 4 - 0
src/features/integrations.css

@@ -1,3 +1,7 @@
+:root {
+  --bytm-themed-bg: var(--ts-playerpage-color, #030303);
+}
+
 #ts-visualizer-container #ThemeSong-Visualizer canvas {
   /* Fix for the thumbnail overlay */
   z-index: 1;

+ 1 - 1
src/features/integrations.ts

@@ -44,7 +44,7 @@ export async function fixPlayerPageTheming() {
 }
 
 /** Sets the lightness of the theme color used by BYTM according to the configured lightness value */
-export async function setThemeSongLightness() {
+export async function fixThemeSong() {
   try {
     const cssVarName = (() => {
       switch(getFeature("themeSongLightness")) {

+ 0 - 4
src/features/layout.css

@@ -1,9 +1,5 @@
 /* #region misc */
 
-:root {
-  --bytm-themed-bg: var(--ts-playerpage-color, #030303);
-}
-
 .bytm-disable-scroll {
   overflow: hidden !important;
 }

+ 4 - 4
src/index.ts

@@ -29,7 +29,7 @@ import {
   addPlayerBarLyricsBtn, initLyricsCache,
   // integrations
   disableDarkReader, fixSponsorBlock,
-  fixPlayerPageTheming, setThemeSongLightness,
+  fixPlayerPageTheming, fixThemeSong,
   // general
   initVersionCheck,
   // menu
@@ -208,10 +208,10 @@ async function onDomLoad() {
       if(feats.sponsorBlockIntegration)
         ftInit.push(["sponsorBlockIntegration", fixSponsorBlock()]);
 
-      if(!feats.themeSongIntegration)
-        ftInit.push(["themeSongIntegration", fixPlayerPageTheming()]);
+      if(feats.themeSongIntegration)
+        ftInit.push(["themeSongIntegration", fixThemeSong()]);
       else
-        ftInit.push(["themeSongIntegration", setThemeSongLightness()]);
+        ftInit.push(["themeSongIntegration", fixPlayerPageTheming()]);
     }
 
     //#region (ytm+yt) cfg menu