aboutsummaryrefslogtreecommitdiff
path: root/ext/js/app/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/app/frontend.js')
-rw-r--r--ext/js/app/frontend.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js
index 0f72e06b..3b482ad2 100644
--- a/ext/js/app/frontend.js
+++ b/ext/js/app/frontend.js
@@ -92,9 +92,9 @@ class Frontend {
this._optionsContextOverride = null;
this._runtimeMessageHandlers = new Map([
- ['requestFrontendReadyBroadcast', {async: false, handler: this._onMessageRequestFrontendReadyBroadcast.bind(this)}],
- ['setAllVisibleOverride', {async: true, handler: this._onApiSetAllVisibleOverride.bind(this)}],
- ['clearAllVisibleOverride', {async: true, handler: this._onApiClearAllVisibleOverride.bind(this)}]
+ ['Frontend.requestReadyBroadcast', {async: false, handler: this._onMessageRequestFrontendReadyBroadcast.bind(this)}],
+ ['Frontend.setAllVisibleOverride', {async: true, handler: this._onApiSetAllVisibleOverride.bind(this)}],
+ ['Frontend.clearAllVisibleOverride', {async: true, handler: this._onApiClearAllVisibleOverride.bind(this)}]
]);
this._hotkeyHandler.registerActions([
@@ -159,11 +159,11 @@ class Frontend {
this._textScanner.on('searched', this._onSearched.bind(this));
yomichan.crossFrame.registerHandlers([
- ['closePopup', {async: false, handler: this._onApiClosePopup.bind(this)}],
- ['copySelection', {async: false, handler: this._onApiCopySelection.bind(this)}],
- ['getSelectionText', {async: false, handler: this._onApiGetSelectionText.bind(this)}],
- ['getPopupInfo', {async: false, handler: this._onApiGetPopupInfo.bind(this)}],
- ['getPageInfo', {async: false, handler: this._onApiGetPageInfo.bind(this)}]
+ ['Frontend.closePopup', {async: false, handler: this._onApiClosePopup.bind(this)}],
+ ['Frontend.copySelection', {async: false, handler: this._onApiCopySelection.bind(this)}],
+ ['Frontend.getSelectionText', {async: false, handler: this._onApiGetSelectionText.bind(this)}],
+ ['Frontend.getPopupInfo', {async: false, handler: this._onApiGetPopupInfo.bind(this)}],
+ ['Frontend.getPageInfo', {async: false, handler: this._onApiGetPageInfo.bind(this)}]
]);
this._updateContentScale();
@@ -509,7 +509,7 @@ class Frontend {
return await this._getDefaultPopup();
}
- const {popupId} = await yomichan.crossFrame.invoke(targetFrameId, 'getPopupInfo');
+ const {popupId} = await yomichan.crossFrame.invoke(targetFrameId, 'Frontend.getPopupInfo');
if (popupId === null) {
return null;
}
@@ -702,7 +702,7 @@ class Frontend {
}
chrome.runtime.onMessage.addListener(onMessage);
- yomichan.api.broadcastTab('requestFrontendReadyBroadcast', {frameId: this._frameId});
+ yomichan.api.broadcastTab('Frontend.requestReadyBroadcast', {frameId: this._frameId});
});
}
@@ -728,7 +728,7 @@ class Frontend {
let documentTitle = document.title;
if (this._useProxyPopup) {
try {
- ({url, documentTitle} = await yomichan.crossFrame.invoke(this._parentFrameId, 'getPageInfo', {}));
+ ({url, documentTitle} = await yomichan.crossFrame.invoke(this._parentFrameId, 'Frontend.getPageInfo', {}));
} catch (e) {
// NOP
}