From 229f04ba358b3485fa7952088e03dad9e651bb23 Mon Sep 17 00:00:00 2001 From: Cashew <52880648+Scrub1492@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:36:27 +0900 Subject: rename variables (#409) * rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions --- ext/js/app/frontend.js | 8 ++++---- ext/js/app/popup.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'ext/js/app') diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js index 8c11775a..c8b63813 100644 --- a/ext/js/app/frontend.js +++ b/ext/js/app/frontend.js @@ -964,7 +964,7 @@ export class Frontend { _prepareSiteSpecific() { switch (location.hostname.toLowerCase()) { case 'docs.google.com': - this._prepareGoogleDocs(); + this._prepareGoogleDocsWrapper(); break; } } @@ -972,18 +972,18 @@ export class Frontend { /** * @returns {Promise} */ - async _prepareGoogleDocs() { + async _prepareGoogleDocsWrapper() { if (typeof GoogleDocsUtil !== 'undefined') { return; } await yomitan.api.loadExtensionScripts([ '/js/accessibility/google-docs-util.js' ]); - this._prepareGoogleDocs2(); + this._prepareGoogleDocs(); } /** * @returns {Promise} */ - async _prepareGoogleDocs2() { + async _prepareGoogleDocs() { if (typeof GoogleDocsUtil === 'undefined') { return; } DocumentUtil.registerGetRangeFromPointHandler(GoogleDocsUtil.getRangeFromPoint.bind(GoogleDocsUtil)); } diff --git a/ext/js/app/popup.js b/ext/js/app/popup.js index 45604a55..a0712604 100644 --- a/ext/js/app/popup.js +++ b/ext/js/app/popup.js @@ -417,7 +417,7 @@ export class Popup extends EventDispatcher { _inject() { let injectPromise = this._injectPromise; if (injectPromise === null) { - injectPromise = this._injectInner1(); + injectPromise = this._injectInnerWrapper(); this._injectPromise = injectPromise; injectPromise.then( () => { @@ -433,9 +433,9 @@ export class Popup extends EventDispatcher { /** * @returns {Promise} */ - async _injectInner1() { + async _injectInnerWrapper() { try { - await this._injectInner2(); + await this._injectInner(); return true; } catch (e) { this._resetFrame(); @@ -447,7 +447,7 @@ export class Popup extends EventDispatcher { /** * @returns {Promise} */ - async _injectInner2() { + async _injectInner() { if (this._optionsContext === null) { throw new Error('Options not initialized'); } -- cgit v1.2.3