wallabagger
wallabagger copied to clipboard
Switch icon to white when browser is in dark mode
When Firefox is set to dark mode / theme the icon stays black and doesn't really fit in. It would be great if it could switch do a white icon when the current page is not yet saved.
Is it possible to detect if the theme is dark? The better solution might be an outlined icon. like in the edge version of wallabagger
Is it possible to detect if the theme is dark? The better solution might be an outlined icon. like in the edge version of wallabagger
I'm no developer, so I don't know if this is helpful, but I found this:
How to correctly design color icon to be visible accross themes How to detect Firefox Theme
Firefox supports specifying dark and light versions of the browser action icon in the manifest. This is not supported elsewhere AFAIK but would be worth doing.
"browser_action": {
"default_title": "Wallabagger",
"default_icon": "img/wallabagger-dark.svg",
"theme_icons": [{
"dark": "img/wallabagger-dark.svg",
"light": "img/wallabagger-light.svg",
"size": 32
}],
"default_popup": "popup.html"
}
Unfortunately, I don't know that we can detect whether a theme is light or dark - which you'd need to do here otherwise the icon will revert back to the default colour after it's clicked.
Actually, it looks like passing null
to setIcon
produces the desired behaviour of setting the icon to the theme appropriate default.
I've updated #182 to include light and dark icon variants. :)
#256