summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index f6b0d236..33cb0b90 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -32,7 +32,6 @@ class Frontend {
this._options = null;
this._pageZoomFactor = 1.0;
this._contentScale = 1.0;
- this._orphaned = false;
this._lastShowPromise = Promise.resolve();
this._enabledEventListeners = new EventListenerCollection();
this._activeModifiers = new Set();
@@ -110,7 +109,6 @@ class Frontend {
visualViewport.addEventListener('resize', this._onVisualViewportResize.bind(this));
}
- yomichan.on('orphaned', this._onOrphaned.bind(this));
yomichan.on('optionsUpdated', this.updateOptions.bind(this));
yomichan.on('zoomChanged', this._onZoomChanged.bind(this));
chrome.runtime.onMessage.addListener(this._onRuntimeMessage.bind(this));
@@ -230,10 +228,6 @@ class Frontend {
return false;
}
- _onOrphaned() {
- this._orphaned = true;
- }
-
_onZoomChanged({newZoomFactor}) {
this._pageZoomFactor = newZoomFactor;
this._updateContentScale();
@@ -370,9 +364,9 @@ class Frontend {
}
}
} catch (e) {
- if (this._orphaned) {
+ if (yomichan.isExtensionUnloaded) {
if (textSource !== null && this._options.scanning.modifier !== 'none') {
- this._showPopupContent(textSource, await this.getOptionsContext(), 'orphaned');
+ this._showPopupContent(textSource, await this.getOptionsContext(), 'extensionUnloaded');
}
} else {
yomichan.logError(e);