aboutsummaryrefslogtreecommitdiff
path: root/ext/js/app/popup-window.js
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-11-12 02:16:11 +0000
committerGitHub <noreply@github.com>2023-11-12 02:16:11 +0000
commitd06029ea8c4244f40f9ddfeec5154f9ef2a4c053 (patch)
tree93f3e15603ec38faef01070475904c08d2e9280b /ext/js/app/popup-window.js
parentf263e994c6eca2438eaff79cb22f1b48fe14b7b2 (diff)
parent784dcd93b02443bc253e3af43ad0586a1add39c5 (diff)
Merge pull request #314 from starxeras/replace-yomichan
Replace all instances of yomichan
Diffstat (limited to 'ext/js/app/popup-window.js')
-rw-r--r--ext/js/app/popup-window.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/js/app/popup-window.js b/ext/js/app/popup-window.js
index b5fd9eb6..88370684 100644
--- a/ext/js/app/popup-window.js
+++ b/ext/js/app/popup-window.js
@@ -17,7 +17,7 @@
*/
import {EventDispatcher} from '../core.js';
-import {yomichan} from '../yomichan.js';
+import {yomitan} from '../yomitan.js';
import {Popup} from './popup.js';
/**
@@ -138,7 +138,7 @@ export class PopupWindow extends EventDispatcher {
* @returns {Promise<boolean>} `true` if the popup is visible, `false` otherwise.
*/
async isVisible() {
- return (this._popupTabId !== null && await yomichan.api.isTabSearchPopup(this._popupTabId));
+ return (this._popupTabId !== null && await yomitan.api.isTabSearchPopup(this._popupTabId));
}
/**
@@ -263,16 +263,16 @@ export class PopupWindow extends EventDispatcher {
// Private
async _invoke(open, action, params={}, defaultReturnValue) {
- if (yomichan.isExtensionUnloaded) {
+ if (yomitan.isExtensionUnloaded) {
return defaultReturnValue;
}
const frameId = 0;
if (this._popupTabId !== null) {
try {
- return await yomichan.crossFrame.invokeTab(this._popupTabId, frameId, 'popupMessage', {action, params});
+ return await yomitan.crossFrame.invokeTab(this._popupTabId, frameId, 'popupMessage', {action, params});
} catch (e) {
- if (yomichan.isExtensionUnloaded) {
+ if (yomitan.isExtensionUnloaded) {
open = false;
}
}
@@ -283,9 +283,9 @@ export class PopupWindow extends EventDispatcher {
return defaultReturnValue;
}
- const {tabId} = await yomichan.api.getOrCreateSearchPopup({focus: 'ifCreated'});
+ const {tabId} = await yomitan.api.getOrCreateSearchPopup({focus: 'ifCreated'});
this._popupTabId = tabId;
- return await yomichan.crossFrame.invokeTab(this._popupTabId, frameId, 'popupMessage', {action, params});
+ return await yomitan.crossFrame.invokeTab(this._popupTabId, frameId, 'popupMessage', {action, params});
}
}