omnidevZero / YouTubeRedux

Browser extension that focuses on restoring old YouTube layout within Polymer design (modern layout).
184 stars 11 forks source link

YouTube has changed the Progress Bar to a red to Pink gradient for some users as an experiment. pls fix #261

Open mutageneral opened 1 week ago

mutageneral commented 1 week ago

Video about this: https://youtu.be/KJcLwknsyw0

My title bar is a red to pink gradient: image please add option to turn this off, thanks

here is more info: image

omnidevZero commented 6 days ago

Will be fixed in the next update πŸ‘

VerMishelb commented 1 day ago

Can the colours of these be exposed in control panel or are manual code edits the only way to do so? I was using the following script lately to get rid of pinkish colours and ended up with colours which resemble the old player: ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ But after the update YTR seems to take priority over a tampermonkey script.

const colorHex = "#cc181e";
const colorHexScrubber = "#ececec";
...
const seekBarElements = document.getElementsByClassName("ytp-play-progress ytp-swatch-background-color");
const thumbnailElements = document.getElementsByClassName("style-scope ytd-thumbnail-overlay-resume-playback-renderer");
const scrubberButtonElements = document.getElementsByClassName("ytp-scrubber-button ytp-swatch-background-color");
const navbarElements = document.getElementsByClassName("yt-page-navigation-progress");

for (let i = 0; i < seekBarElements.length; i++) {
    seekBarElements[i].style.background = colorHex;
}
for (let i = 0; i < thumbnailElements.length; i++) {
    thumbnailElements[i].style.background = colorHex;
}
for (let i = 0; i < scrubberButtonElements.length; i++) {
    scrubberButtonElements[i].style.background = colorHexScrubber;
}
for (let i = 0; i < navbarElements.length; i++) {
    navbarElements[i].style.background = colorHex;
}
omnidevZero commented 1 day ago

YTR changes the progress bar colors via the following code:

.ytp-swatch-background-color {
    background-color: #f00 !important;
    background-image: none !important;
}

So you'd have to override the !important property for these elements in your script which can be done via JS (e.g. with element.style.setProperty()) or via CSS by providing more specific selectors than in the code above.