aboutsummaryrefslogtreecommitdiff
path: root/ext/js/app/frontend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-20 23:13:17 -0500
committerGitHub <noreply@github.com>2024-01-21 04:13:17 +0000
commit6ba1ffe74558dd174e3308d48885fb068fa37d55 (patch)
tree5519bbf972096e0e3370171d2b62a26d6164d671 /ext/js/app/frontend.js
parentebdde1ee612a262256ad0384131e53bc29b1e10f (diff)
WebExtension class (#551)
* Add WebExtension class * Use WebExtension class * Use WebExtension instance for all runtime message sending * Use getUrl * Add a sendMessage variant which ignores the response and error
Diffstat (limited to 'ext/js/app/frontend.js')
-rw-r--r--ext/js/app/frontend.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js
index 13d2d9d8..837364ad 100644
--- a/ext/js/app/frontend.js
+++ b/ext/js/app/frontend.js
@@ -226,7 +226,7 @@ export class Frontend {
try {
await this._updateOptionsInternal();
} catch (e) {
- if (!yomitan.isExtensionUnloaded) {
+ if (!yomitan.webExtension.unloaded) {
throw e;
}
}
@@ -368,7 +368,7 @@ export class Frontend {
const scanningOptions = /** @type {import('settings').ProfileOptions} */ (this._options).scanning;
if (error !== null) {
- if (yomitan.isExtensionUnloaded) {
+ if (yomitan.webExtension.unloaded) {
if (textSource !== null && !passive) {
this._showExtensionUnloaded(textSource);
}
@@ -655,7 +655,7 @@ export class Frontend {
try {
return this._popup !== null && await this._popup.containsPoint(x, y);
} catch (e) {
- if (!yomitan.isExtensionUnloaded) {
+ if (!yomitan.webExtension.unloaded) {
throw e;
}
return false;
@@ -742,7 +742,7 @@ export class Frontend {
Promise.resolve()
);
this._lastShowPromise.catch((error) => {
- if (yomitan.isExtensionUnloaded) { return; }
+ if (yomitan.webExtension.unloaded) { return; }
log.error(error);
});
return this._lastShowPromise;