aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/action-popup-main.js
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-11-12 11:19:43 +0900
committerGitHub <noreply@github.com>2023-11-12 11:19:43 +0900
commit47b4d79e646a990699a1a4ca1da559a4aeec1c91 (patch)
treec33f61ba85354f18c68d4a054baa30ff0c41c153 /ext/js/pages/action-popup-main.js
parent9162d950eb2b3aa0339d95a98a60be89b8315f26 (diff)
parentd06029ea8c4244f40f9ddfeec5154f9ef2a4c053 (diff)
Merge branch 'master' into offscreen-db
Diffstat (limited to 'ext/js/pages/action-popup-main.js')
-rw-r--r--ext/js/pages/action-popup-main.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/js/pages/action-popup-main.js b/ext/js/pages/action-popup-main.js
index 163c226a..32bfcb7f 100644
--- a/ext/js/pages/action-popup-main.js
+++ b/ext/js/pages/action-popup-main.js
@@ -18,7 +18,7 @@
import {PermissionsUtil} from '../data/permissions-util.js';
import {HotkeyHelpController} from '../input/hotkey-help-controller.js';
-import {yomichan} from '../yomichan.js';
+import {yomitan} from '../yomitan.js';
export class DisplayController {
constructor() {
@@ -34,7 +34,7 @@ export class DisplayController {
this._setupButtonEvents('.action-open-search', 'openSearchPage', chrome.runtime.getURL('/search.html'), this._onSearchClick.bind(this));
this._setupButtonEvents('.action-open-info', 'openInfoPage', chrome.runtime.getURL('/info.html'));
- const optionsFull = await yomichan.api.optionsGetFull();
+ const optionsFull = await yomitan.api.optionsGetFull();
this._optionsFull = optionsFull;
this._setupHotkeys();
@@ -84,12 +84,12 @@ export class DisplayController {
const result = customHandler(e);
if (typeof result !== 'undefined') { return; }
}
- yomichan.api.commandExec(command, {mode: e.ctrlKey ? 'newTab' : 'existingOrNewTab'});
+ yomitan.api.commandExec(command, {mode: e.ctrlKey ? 'newTab' : 'existingOrNewTab'});
e.preventDefault();
}, false);
node.addEventListener('auxclick', (e) => {
if (e.button !== 1) { return; }
- yomichan.api.commandExec(command, {mode: 'newTab'});
+ yomitan.api.commandExec(command, {mode: 'newTab'});
e.preventDefault();
}, false);
}
@@ -144,7 +144,7 @@ export class DisplayController {
_setupOptions({options}) {
const extensionEnabled = options.general.enable;
- const onToggleChanged = () => yomichan.api.commandExec('toggleTextScanning');
+ const onToggleChanged = () => yomitan.api.commandExec('toggleTextScanning');
for (const toggle of document.querySelectorAll('#enable-search,#enable-search2')) {
toggle.checked = extensionEnabled;
toggle.addEventListener('change', onToggleChanged, false);
@@ -192,7 +192,7 @@ export class DisplayController {
}
async _setPrimaryProfileIndex(value) {
- return await yomichan.api.modifySettings(
+ return await yomitan.api.modifySettings(
[{
action: 'set',
path: 'profileCurrent',
@@ -204,7 +204,7 @@ export class DisplayController {
async _updateDictionariesEnabledWarnings(options) {
const noDictionariesEnabledWarnings = document.querySelectorAll('.no-dictionaries-enabled-warning');
- const dictionaries = await yomichan.api.getDictionaryInfo();
+ const dictionaries = await yomitan.api.getDictionaryInfo();
const enabledDictionaries = new Set();
for (const {name, enabled} of options.dictionaries) {
@@ -237,18 +237,18 @@ export class DisplayController {
}
async _isSafari() {
- const {browser} = await yomichan.api.getEnvironmentInfo();
+ const {browser} = await yomitan.api.getEnvironmentInfo();
return browser === 'safari';
}
}
(async () => {
- await yomichan.prepare();
+ await yomitan.prepare();
- yomichan.api.logIndicatorClear();
+ yomitan.api.logIndicatorClear();
const displayController = new DisplayController();
displayController.prepare();
- yomichan.ready();
+ yomitan.ready();
})();