Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix monochrome icon in Chrome when colorTheme == 'system' (MV3 fix) #2152

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

stefansundin
Copy link
Contributor

Since the MV3 upgrade, the background script in Chrome does not have a window. Attempting to use the monochrome icon when the theme is system results in an error.

Screenshot 2024-03-18 at 20 04 00

This uses the offscreen API to work around the issue. Another option is to set the "effective" theme when the options are saved. This would be a poor experience if the user changes the theme (or if their computer is set to automatically change it based on the time of day).

This doesn't close the offscreen document, which I think is ok. I think it will automatically close on its own. I think this is called a lot so it is probably good to keep it around. 馃し

@varjolintu varjolintu added the bug label Mar 19, 2024
@varjolintu varjolintu added this to the 1.9.1 milestone Mar 30, 2024
@varjolintu
Copy link
Member

It would be preferred if it could be possible to just send a request to content script and return the answer, but after looking at the issue myself this seems to be the only proper solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants