Skip to content

Commit

Permalink
Update themes.js Shorts Background
Browse files Browse the repository at this point in the history
  • Loading branch information
raszpl authored May 31, 2024
1 parent 6224cb5 commit 0a4e805
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js&css/web-accessible/www.youtube.com/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ImprovedTube.myColors = function () {
'--yt-spec-inverted-background: #fff;' +
'--ytd-searchbox-background:' + primary_color + '!important;' +
'--ytd-searchbox-legacy-button-color:' + 'var(--yt-spec-brand-background-primary)' + '!important;' +
'background-color: var(--yt-spec-base-background)!important;' +
'}';

this.elements.my_colors = style;
Expand Down Expand Up @@ -94,19 +95,21 @@ ImprovedTube.setTheme = function () {
}
this.elements.my_colors?.remove();
break

case 'light':
document.documentElement.removeAttribute('dark');
document.querySelector('ytd-masthead')?.removeAttribute('dark');
ImprovedTube.messages.send({action: 'set', key: 'theme', value: null});
ImprovedTube.setPrefCookieValueByName('f6', null);
if (document.getElementById("cinematics")) {
document.getElementById('cinematics').style.display = 'none !important';
}
// fall through
case 'dawn':
case 'sunset':
case 'night':
case 'plain':
case 'desert':
document.documentElement.removeAttribute('dark');
document.querySelector('ytd-masthead')?.removeAttribute('dark');
document.getElementById('cinematics')?.removeAttribute('style');
this.elements.my_colors?.remove();
break
Expand Down

0 comments on commit 0a4e805

Please sign in to comment.