diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-11-12 11:19:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-12 11:19:43 +0900 |
commit | 47b4d79e646a990699a1a4ca1da559a4aeec1c91 (patch) | |
tree | c33f61ba85354f18c68d4a054baa30ff0c41c153 /ext/js/app/popup-window.js | |
parent | 9162d950eb2b3aa0339d95a98a60be89b8315f26 (diff) | |
parent | d06029ea8c4244f40f9ddfeec5154f9ef2a4c053 (diff) |
Merge branch 'master' into offscreen-db
Diffstat (limited to 'ext/js/app/popup-window.js')
-rw-r--r-- | ext/js/app/popup-window.js | 14 |
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}); } } |