mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix (UI - Firefox): CSS being inconsistently applied
This commit is contained in:
+3
-6
@@ -622,12 +622,9 @@ function applyDarkModeToIframe(iframe: HTMLIFrameElement, cssLink: HTMLStyleElem
|
||||
const iframeDocument = iframe.contentDocument;
|
||||
if (!iframeDocument) return;
|
||||
|
||||
if (iframeDocument.readyState !== 'complete') {
|
||||
iframe.onload = () => {
|
||||
applyDarkModeToIframe(iframe, cssLink);
|
||||
};
|
||||
return;
|
||||
}
|
||||
iframe.onload = () => {
|
||||
applyDarkModeToIframe(iframe, cssLink);
|
||||
};
|
||||
|
||||
if (settingsState.DarkMode) {
|
||||
iframeDocument.documentElement.classList.add('dark')
|
||||
|
||||
Reference in New Issue
Block a user