summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-26 18:47:58 -0400
committerGitHub <noreply@github.com>2020-09-26 18:47:58 -0400
commit9c7b9d666087add0f72900c045ee43ed05c5b467 (patch)
tree25094cf37cdb542f96736d2286bb5a7761a15467 /ext/fg/js
parentc1b59763941a74367b81e9b8329319f1ede72317 (diff)
Fix page type never being detected as search page correctly (#867)
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/content-script-main.js2
-rw-r--r--ext/fg/js/float.js3
-rw-r--r--ext/fg/js/frontend.js6
3 files changed, 6 insertions, 5 deletions
diff --git a/ext/fg/js/content-script-main.js b/ext/fg/js/content-script-main.js
index 84e78392..a427d10f 100644
--- a/ext/fg/js/content-script-main.js
+++ b/ext/fg/js/content-script-main.js
@@ -41,7 +41,7 @@
parentPopupId: null,
parentFrameId: null,
useProxyPopup: false,
- isSearchPage: false,
+ pageType: 'web',
allowRootFramePopupProxy: true
});
await frontend.prepare();
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 7f673bd5..bfa2195e 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -184,7 +184,8 @@ class DisplayFloat extends Display {
depth,
parentPopupId,
parentFrameId,
- useProxyPopup: true
+ useProxyPopup: true,
+ pageType: 'popup'
});
} catch (e) {
yomichan.logError(e);
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index e3988c94..13b0d80c 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -30,7 +30,7 @@ class Frontend {
parentPopupId,
parentFrameId,
useProxyPopup,
- isSearchPage,
+ pageType,
allowRootFramePopupProxy
}) {
this._id = generateId(16);
@@ -55,7 +55,7 @@ class Frontend {
this._parentPopupId = parentPopupId;
this._parentFrameId = parentFrameId;
this._useProxyPopup = useProxyPopup;
- this._isSearchPage = isSearchPage;
+ this._pageType = pageType;
this._depth = depth;
this._frameId = frameId;
this._popupFactory = popupFactory;
@@ -392,7 +392,7 @@ class Frontend {
}
if (this._updatePopupToken !== token) { return; }
- if (this._isSearchPage) {
+ if (this._pageType === 'search') {
this.setDisabledOverride(!this._options.scanning.enableOnSearchPage);
}