From 3d27e80ae646bcc9c421cbc8aa281008f47c8992 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 16 Feb 2020 13:53:19 -0500 Subject: [PATCH] Delay CSS injection until a popup is created --- ext/fg/js/popup.js | 1 + ext/manifest.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index d799e371..dc538b02 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -220,6 +220,7 @@ class Popup { this._observeFullscreen(true); this._onFullscreenChanged(); try { + Popup._injectStylesheet('yomichan-popup-outer-stylesheet', 'file', '/fg/css/client.css', true); this.setCustomOuterCss(this._options.general.customPopupOuterCss, true); } catch (e) { // NOP diff --git a/ext/manifest.json b/ext/manifest.json index 68a8adb4..b86459f9 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -30,7 +30,6 @@ "fg/js/frontend.js", "fg/js/frontend-initialize.js" ], - "css": ["fg/css/client.css"], "match_about_blank": true, "all_frames": true }],