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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dynamic theme when darkreader-lock is detected early #9914

Merged
merged 2 commits into from Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## Unreleased

- Fixes a issue where `darkreader-fallback` wasn't removed from the DOM, when Dark Reader finds a `<meta name="darkreader-lock">` element.

## 4.9.58 (Sep 22, 2022)

- Remove newlines from CSS URL values, before handling them.
Expand Down
1 change: 1 addition & 0 deletions src/inject/dynamic-theme/index.ts
Expand Up @@ -488,6 +488,7 @@ export function createOrUpdateDynamicTheme(filterConfig: FilterConfig, dynamicTh
isIFrame = iframe;
if (document.head) {
if (isAnotherDarkReaderInstanceActive()) {
removeDynamicTheme();
return;
}
document.documentElement.setAttribute('data-darkreader-mode', 'dynamic');
Expand Down