Grayscale mode: per-channel color exceptions - #228
Merged
Conversation
Feature request: keep grayscale on globally, but let designated channels render in color automatically. Page-level scope: watch pages (matched by the owner link) and channel pages (matched by URL); in-feed thumbnails stay gray (a parent CSS filter cannot be undone on descendants). - New string setting grayscale_exempt_channels (shortId 98), stored as a comma-separated @handle list; config of grayscale_mode, not a separate premium toggle. - Content script derives html[grayscale_exempt] in the dynamic loop; the root grayscale rule gains :not([grayscale_exempt='true']). - Options page: first sub-option UI — a pill input revealed beneath the grayscale toggle while it is on (Enter/comma adds, backspace/x removes, synced across windows via the existing storage listener). - Unit tests for the parse/match helpers (176 passing). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FC3StdH9UWAfgFj72JAhEc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Grayscale mode can now exempt specific channels: grayscale stays on globally, but channels on a user-managed allowlist render in color automatically — no manual toggling. Useful when grayscale is a distraction guard for entertainment content, but certain channels should stay watchable in color.
Scope: page-level. Watching an exempt channel's video or browsing their channel page shows color; in-feed thumbnails stay gray. (CSS ancestor filters can't be reversed on descendants, so per-thumbnail color would require a fragile per-element grayscale rework — deliberately out of scope.)
UI: introduces the extension's first sub-option pattern — a pill input indented beneath the grayscale toggle, visible only while grayscale is on. Type a handle (with or without
@), Enter/comma commits a pill,×or backspace removes. Stored as a plain comma-separated string (grayscale_exempt_channels, shortId 98), so import/export works with existing machinery.Mechanics: the content script's existing dynamic loop derives
html[grayscale_exempt](URL match on channel pages, owner-link match on watch pages — self-correcting across SPA navigations), and the root grayscale rule gains:not([grayscale_exempt='true']).Tests: 6 new unit tests for the parse/match helpers; suite at 176 passing. Not covered by automation: the pill UI itself and the live YouTube behavior — worth a manual pass (
./dev.sh chrome, enable grayscale, add a channel, visit their page/video).🤖 Generated with Claude Code