aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/float.html2
-rw-r--r--ext/fg/js/frontend.js10
2 files changed, 3 insertions, 9 deletions
diff --git a/ext/fg/float.html b/ext/fg/float.html
index 735a880a..a13244ee 100644
--- a/ext/fg/float.html
+++ b/ext/fg/float.html
@@ -29,7 +29,7 @@
</div>
</div>
- <div id="error-orphaned" hidden>
+ <div id="error-extension-unloaded" hidden>
<div class="entry">
<h1>Yomichan Updated!</h1>
<p>
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);