Feature/themed browser toolbar icon#8
Open
richardkrikler wants to merge 3 commits intomikker:mainfrom
Open
Conversation
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/action#syntax theme_icons: * "dark"-option: icon that is visible when a theme with dark text is active (e.g. Firefox Light Theme) * "light"-option: icon that is visible when a theme with light text is active (e.g. Firefox Dark Theme)
Owner
|
Good stuff! Thanks – I'll take a look soon |
added 2 commits
November 26, 2025 22:04
* Use window.matchMedia('(prefers-color-scheme: dark)') & onchange event-listener to listen for theme-changes & send "themeChange"-extension-message
* Listen to "themeChange"-extension-events & call new function "setTheme"
* Add "setTheme(theme)" to set toolbar-icon based on current user-theme (load available icons from manifest.json)
* Inspiration: https://stackoverflow.com/questions/58880234/toggle-chrome-extension-icon-based-on-light-or-dark-mode-browser#comment138897725_58882519
** https://github.com/Zren/RecentBookmarksPopup
8548253 to
1ff2c14
Compare
Author
|
Sry, forgot to commit the icons for chrome yesterday. |
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.
Solves #7