From a2b66dc6cc3bd0d037c050eb49e270189a6617fb Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 7 Apr 2020 19:51:39 -0400 Subject: Rename apiForward to apiBroadcast --- ext/mixed/js/api.js | 4 ++-- ext/mixed/js/display.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js index feec94df..d28e3ab6 100644 --- a/ext/mixed/js/api.js +++ b/ext/mixed/js/api.js @@ -81,8 +81,8 @@ function apiScreenshotGet(options) { return _apiInvoke('screenshotGet', {options}); } -function apiForward(action, params) { - return _apiInvoke('forward', {action, params}); +function apiBroadcast(action, params) { + return _apiInvoke('broadcast', {action, params}); } function apiFrameInformationGet() { diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 2f456c3e..710674b2 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -23,9 +23,9 @@ * DisplayGenerator * WindowScroll * apiAudioGetUri + * apiBroadcast * apiDefinitionAdd * apiDefinitionsAddable - * apiForward * apiKanjiFind * apiNoteView * apiOptionsGet @@ -855,7 +855,7 @@ class Display { } setPopupVisibleOverride(visible) { - return apiForward('popupSetVisibleOverride', {visible}); + return apiBroadcast('popupSetVisibleOverride', {visible}); } setSpinnerVisible(visible) { -- cgit v1.2.3 From a296c758b95b428777548f5aada1be13429faf03 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 10 Apr 2020 20:00:18 -0400 Subject: apiBroadcast => apiBroadcastTab --- ext/bg/js/backend.js | 4 ++-- ext/fg/js/float.js | 6 +++--- ext/fg/js/frame-offset-forwarder.js | 4 ++-- ext/fg/js/frontend-initialize.js | 4 ++-- ext/fg/js/frontend.js | 6 +++--- ext/mixed/js/api.js | 4 ++-- ext/mixed/js/display.js | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'ext/mixed/js') diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 35e75bbe..20e17836 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -94,7 +94,7 @@ class Backend { ['commandExec', {handler: this._onApiCommandExec.bind(this), async: false}], ['audioGetUri', {handler: this._onApiAudioGetUri.bind(this), async: true}], ['screenshotGet', {handler: this._onApiScreenshotGet.bind(this), async: true}], - ['broadcast', {handler: this._onApiBroadcast.bind(this), async: false}], + ['broadcastTab', {handler: this._onApiBroadcastTab.bind(this), async: false}], ['frameInformationGet', {handler: this._onApiFrameInformationGet.bind(this), async: true}], ['injectStylesheet', {handler: this._onApiInjectStylesheet.bind(this), async: true}], ['getEnvironmentInfo', {handler: this._onApiGetEnvironmentInfo.bind(this), async: true}], @@ -566,7 +566,7 @@ class Backend { }); } - _onApiBroadcast({action, params}, sender) { + _onApiBroadcastTab({action, params}, sender) { if (!(sender && sender.tab)) { return false; } diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js index 8c00d0a5..d0c0f419 100644 --- a/ext/fg/js/float.js +++ b/ext/fg/js/float.js @@ -18,7 +18,7 @@ /* global * Display - * apiBroadcast + * apiBroadcastTab * apiGetMessageToken * popupNestedInitialize */ @@ -80,7 +80,7 @@ class DisplayFloat extends Display { this.setContentScale(scale); - apiBroadcast('popupPrepareCompleted', {targetPopupId: this._popupId}); + apiBroadcastTab('popupPrepareCompleted', {targetPopupId: this._popupId}); } onError(error) { @@ -181,7 +181,7 @@ class DisplayFloat extends Display { }, 2000 ); - apiBroadcast('requestDocumentInformationBroadcast', {uniqueId}); + apiBroadcastTab('requestDocumentInformationBroadcast', {uniqueId}); const {title} = await promise; return title; diff --git a/ext/fg/js/frame-offset-forwarder.js b/ext/fg/js/frame-offset-forwarder.js index 88c1b72c..609d0d77 100644 --- a/ext/fg/js/frame-offset-forwarder.js +++ b/ext/fg/js/frame-offset-forwarder.js @@ -17,7 +17,7 @@ */ /* global - * apiBroadcast + * apiBroadcastTab */ class FrameOffsetForwarder { @@ -97,6 +97,6 @@ class FrameOffsetForwarder { } _forwardFrameOffsetOrigin(offset, uniqueId) { - apiBroadcast('frameOffset', {offset, uniqueId}); + apiBroadcastTab('frameOffset', {offset, uniqueId}); } } diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js index d2572746..5c9ce7b1 100644 --- a/ext/fg/js/frontend-initialize.js +++ b/ext/fg/js/frontend-initialize.js @@ -21,7 +21,7 @@ * Frontend * PopupProxy * PopupProxyHost - * apiBroadcast + * apiBroadcastTab * apiOptionsGet */ @@ -44,7 +44,7 @@ async function main() { } } ); - apiBroadcast('rootPopupRequestInformationBroadcast'); + apiBroadcastTab('rootPopupRequestInformationBroadcast'); const {popupId, frameId} = await rootPopupInformationPromise; const frameOffsetForwarder = new FrameOffsetForwarder(); diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index bcb0b84a..b380dbfd 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -18,7 +18,7 @@ /* global * TextScanner - * apiBroadcast + * apiBroadcastTab * apiGetZoom * apiKanjiFind * apiOptionsGet @@ -261,12 +261,12 @@ class Frontend extends TextScanner { _broadcastRootPopupInformation() { if (!this.popup.isProxy() && this.popup.depth === 0) { - apiBroadcast('rootPopupInformation', {popupId: this.popup.id, frameId: this.popup.frameId}); + apiBroadcastTab('rootPopupInformation', {popupId: this.popup.id, frameId: this.popup.frameId}); } } _broadcastDocumentInformation(uniqueId) { - apiBroadcast('documentInformationBroadcast', { + apiBroadcastTab('documentInformationBroadcast', { uniqueId, frameId: this.popup.frameId, title: document.title diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js index d28e3ab6..83a4a403 100644 --- a/ext/mixed/js/api.js +++ b/ext/mixed/js/api.js @@ -81,8 +81,8 @@ function apiScreenshotGet(options) { return _apiInvoke('screenshotGet', {options}); } -function apiBroadcast(action, params) { - return _apiInvoke('broadcast', {action, params}); +function apiBroadcastTab(action, params) { + return _apiInvoke('broadcastTab', {action, params}); } function apiFrameInformationGet() { diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 710674b2..b691ae12 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -23,7 +23,7 @@ * DisplayGenerator * WindowScroll * apiAudioGetUri - * apiBroadcast + * apiBroadcastTab * apiDefinitionAdd * apiDefinitionsAddable * apiKanjiFind @@ -855,7 +855,7 @@ class Display { } setPopupVisibleOverride(visible) { - return apiBroadcast('popupSetVisibleOverride', {visible}); + return apiBroadcastTab('popupSetVisibleOverride', {visible}); } setSpinnerVisible(visible) { -- cgit v1.2.3