From f7976b7f79640a946f085234d6290949acfb8b71 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Mon, 18 Dec 2023 07:50:03 +1100 Subject: [PATCH] fix stylesheets loading incorrectly --- src/SEQTA.ts | 8 ++++++-- src/css/iframe.scss | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 32310e04..54c6ccd5 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -25,6 +25,8 @@ import { enableCurrentTheme } from './seqta/ui/Themes'; import { delay } from "./seqta/utils/delay"; import { SettingsState } from "./types/storage"; +import iframeCSS from "./css/iframe.scss?inline"; + browser.storage.local.get([ "telemetry" ]).then((telemetry) => { if (telemetry.telemetry === true) { Sentry.init({ @@ -426,8 +428,10 @@ function removeThemeTagsFromNotices () { function CheckiFrameItems() { // Injecting CSS File to the webpage to overwrite iFrame default CSS - import('./css/iframe.scss'); - let fileref = GetCSSElement('css/iframe.css'); + const fileref = document.createElement('link') + fileref.setAttribute('rel', 'stylesheet') + fileref.setAttribute('type', 'text/css') + fileref.innerHTML = iframeCSS const observer = new MutationObserver(function (mutations_list) { mutations_list.forEach(function (mutation) { diff --git a/src/css/iframe.scss b/src/css/iframe.scss index 7b733a2b..fe69fde5 100644 --- a/src/css/iframe.scss +++ b/src/css/iframe.scss @@ -69,6 +69,7 @@ table th { html, p, div, span { color: white !important; + background-color: #232323 } body { background-color: #232323;