summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-29 12:00:41 -0500
committerGitHub <noreply@github.com>2020-11-29 12:00:41 -0500
commita8cd03cbecf4015483ce3479e589e65ce7eece45 (patch)
tree316ddd0673a2a15156fb7ef815813801260fd11c /ext/fg
parent008ffdb6bffc2855957be948a24c9e07730501d6 (diff)
Fix outer CSS being incorrectly injected (#1075)
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/popup.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 0328edda..ffd72dca 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -195,12 +195,13 @@ class Popup extends EventDispatcher {
async setCustomOuterCss(css, useWebExtensionApi) {
let parentNode = null;
- if (this._shadow !== null) {
+ const inShadow = (this._shadow !== null);
+ if (inShadow) {
useWebExtensionApi = false;
parentNode = this._shadow;
}
const node = await dynamicLoader.loadStyle('yomichan-popup-outer-user-stylesheet', 'code', css, useWebExtensionApi, parentNode);
- this.trigger('customOuterCssChanged', {node, useWebExtensionApi});
+ this.trigger('customOuterCssChanged', {node, useWebExtensionApi, inShadow});
}
getFrameRect() {