From c4134168be8bf8df4e7ba4860e3d99b3c2256734 Mon Sep 17 00:00:00 2001 From: starxeras Date: Fri, 10 Nov 2023 19:48:27 -0600 Subject: `yomichan` -> `yomitan` --- ext/js/pages/settings/anki-controller.js | 6 +++--- ext/js/pages/settings/anki-templates-controller.js | 6 +++--- ext/js/pages/settings/backup-controller.js | 20 ++++++++++---------- .../settings/collapsible-dictionary-controller.js | 4 ++-- ext/js/pages/settings/dictionary-controller.js | 8 ++++---- .../pages/settings/dictionary-import-controller.js | 8 ++++---- .../extension-keyboard-shortcuts-controller.js | 4 ++-- .../pages/settings/keyboard-shortcuts-controller.js | 4 ++-- ext/js/pages/settings/mecab-controller.js | 4 ++-- .../pages/settings/persistent-storage-controller.js | 4 ++-- ext/js/pages/settings/popup-preview-frame-main.js | 6 +++--- ext/js/pages/settings/popup-preview-frame.js | 6 +++--- ext/js/pages/settings/popup-window-controller.js | 4 ++-- ext/js/pages/settings/profile-controller.js | 4 ++-- ext/js/pages/settings/scan-inputs-controller.js | 4 ++-- .../pages/settings/scan-inputs-simple-controller.js | 4 ++-- .../secondary-search-dictionary-controller.js | 4 ++-- ext/js/pages/settings/settings-controller.js | 16 ++++++++-------- ext/js/pages/settings/settings-main.js | 4 ++-- .../settings/sort-frequency-dictionary-controller.js | 6 +++--- ext/js/pages/settings/storage-controller.js | 4 ++-- 21 files changed, 65 insertions(+), 65 deletions(-) (limited to 'ext/js/pages/settings') diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js index 0ad047aa..8164b8f6 100644 --- a/ext/js/pages/settings/anki-controller.js +++ b/ext/js/pages/settings/anki-controller.js @@ -21,7 +21,7 @@ import {EventListenerCollection, log} from '../../core.js'; import {AnkiUtil} from '../../data/anki-util.js'; import {SelectorObserver} from '../../dom/selector-observer.js'; import {ObjectPropertyAccessor} from '../../general/object-property-accessor.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class AnkiController { constructor(settingsController) { @@ -394,7 +394,7 @@ export class AnkiController { let noteId = null; for (const query of queries) { - const notes = await yomichan.api.findAnkiNotes(query); + const notes = await yomitan.api.findAnkiNotes(query); if (notes.length > 0) { noteId = notes[0]; break; @@ -405,7 +405,7 @@ export class AnkiController { throw new Error('Could not find a note to test with'); } - await yomichan.api.noteView(noteId, mode, false); + await yomitan.api.noteView(noteId, mode, false); } _setAnkiNoteViewerStatus(visible, error) { diff --git a/ext/js/pages/settings/anki-templates-controller.js b/ext/js/pages/settings/anki-templates-controller.js index 83b1b0bb..ac8a0205 100644 --- a/ext/js/pages/settings/anki-templates-controller.js +++ b/ext/js/pages/settings/anki-templates-controller.js @@ -19,7 +19,7 @@ import {isObject} from '../../core.js'; import {AnkiNoteBuilder} from '../../data/anki-note-builder.js'; import {JapaneseUtil} from '../../language/sandbox/japanese-util.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class AnkiTemplatesController { constructor(settingsController, modalController, ankiController) { @@ -38,7 +38,7 @@ export class AnkiTemplatesController { } async prepare() { - this._defaultFieldTemplates = await yomichan.api.getDefaultAnkiFieldTemplates(); + this._defaultFieldTemplates = await yomitan.api.getDefaultAnkiFieldTemplates(); this._fieldTemplatesTextarea = document.querySelector('#anki-card-templates-textarea'); this._compileResultInfo = document.querySelector('#anki-card-templates-compile-result'); @@ -136,7 +136,7 @@ export class AnkiTemplatesController { async _getDictionaryEntry(text, optionsContext) { if (this._cachedDictionaryEntryText !== text) { - const {dictionaryEntries} = await yomichan.api.termsFind(text, {}, optionsContext); + const {dictionaryEntries} = await yomitan.api.termsFind(text, {}, optionsContext); if (dictionaryEntries.length === 0) { return null; } this._cachedDictionaryEntryValue = dictionaryEntries[0]; diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js index e429f9c7..c41d4315 100644 --- a/ext/js/pages/settings/backup-controller.js +++ b/ext/js/pages/settings/backup-controller.js @@ -17,11 +17,11 @@ */ import * as Dexie from '../../../lib/dexie.js'; -import {isObject, log} from '../../core.js'; -import {OptionsUtil} from '../../data/options-util.js'; -import {ArrayBufferUtil} from '../../data/sandbox/array-buffer-util.js'; -import {yomichan} from '../../yomichan.js'; -import {DictionaryController} from './dictionary-controller.js'; +import { isObject, log } from '../../core.js'; +import { OptionsUtil } from '../../data/options-util.js'; +import { ArrayBufferUtil } from '../../data/sandbox/array-buffer-util.js'; +import { yomitan } from '../../yomitan.js'; +import { DictionaryController } from './dictionary-controller.js'; export class BackupController { constructor(settingsController, modalController) { @@ -95,8 +95,8 @@ export class BackupController { async _getSettingsExportData(date) { const optionsFull = await this._settingsController.getOptionsFull(); - const environment = await yomichan.api.getEnvironmentInfo(); - const fieldTemplatesDefault = await yomichan.api.getDefaultAnkiFieldTemplates(); + const environment = await yomitan.api.getEnvironmentInfo(); + const fieldTemplatesDefault = await yomitan.api.getDefaultAnkiFieldTemplates(); const permissions = await this._settingsController.permissionsUtil.getAllPermissions(); // Format options @@ -503,10 +503,10 @@ export class BackupController { } async _importDatabase(databaseName, file) { - await yomichan.api.purgeDatabase(); + await yomitan.api.purgeDatabase(); await Dexie.import(file, {progressCallback: this._databaseImportProgressCallback}); - yomichan.api.triggerDatabaseUpdated('dictionary', 'import'); - yomichan.trigger('storageChanged'); + yomitan.api.triggerDatabaseUpdated('dictionary', 'import'); + yomitan.trigger('storageChanged'); } _onSettingsImportDatabaseClick() { diff --git a/ext/js/pages/settings/collapsible-dictionary-controller.js b/ext/js/pages/settings/collapsible-dictionary-controller.js index 37d5e6c9..c8ce5e4f 100644 --- a/ext/js/pages/settings/collapsible-dictionary-controller.js +++ b/ext/js/pages/settings/collapsible-dictionary-controller.js @@ -17,7 +17,7 @@ */ import {EventListenerCollection} from '../../core.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class CollapsibleDictionaryController { constructor(settingsController) { @@ -35,7 +35,7 @@ export class CollapsibleDictionaryController { await this._onDatabaseUpdated(); - yomichan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); + yomitan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); this._settingsController.on('optionsChanged', this._onOptionsChanged.bind(this)); this._settingsController.on('dictionarySettingsReordered', this._onDictionarySettingsReordered.bind(this)); } diff --git a/ext/js/pages/settings/dictionary-controller.js b/ext/js/pages/settings/dictionary-controller.js index 05f4f396..155ce55e 100644 --- a/ext/js/pages/settings/dictionary-controller.js +++ b/ext/js/pages/settings/dictionary-controller.js @@ -18,7 +18,7 @@ import {EventListenerCollection, log} from '../../core.js'; import {DictionaryWorker} from '../../language/dictionary-worker.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; class DictionaryEntry { constructor(dictionaryController, fragment, index, dictionaryInfo) { @@ -284,7 +284,7 @@ export class DictionaryController { this._deleteDictionaryModal = this._modalController.getModal('dictionary-confirm-delete'); this._allCheckbox = document.querySelector('#all-dictionaries-enabled'); - yomichan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); + yomitan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); this._settingsController.on('optionsChanged', this._onOptionsChanged.bind(this)); this._allCheckbox.addEventListener('change', this._onAllCheckboxChange.bind(this), false); document.querySelector('#dictionary-confirm-delete-button').addEventListener('click', this._onDictionaryConfirmDelete.bind(this), false); @@ -681,7 +681,7 @@ export class DictionaryController { async _deleteDictionaryInternal(dictionaryTitle, onProgress) { await new DictionaryWorker().deleteDictionary(dictionaryTitle, onProgress); - yomichan.api.triggerDatabaseUpdated('dictionary', 'delete'); + yomitan.api.triggerDatabaseUpdated('dictionary', 'delete'); } async _deleteDictionarySettings(dictionaryTitle) { @@ -706,7 +706,7 @@ export class DictionaryController { } _triggerStorageChanged() { - yomichan.trigger('storageChanged'); + yomitan.trigger('storageChanged'); } _updateDictionaryEntryCount() { diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js index 57fe1cd4..12d29a6f 100644 --- a/ext/js/pages/settings/dictionary-import-controller.js +++ b/ext/js/pages/settings/dictionary-import-controller.js @@ -18,7 +18,7 @@ import {deserializeError, log} from '../../core.js'; import {DictionaryWorker} from '../../language/dictionary-worker.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {DictionaryController} from './dictionary-controller.js'; export class DictionaryImportController { @@ -99,7 +99,7 @@ export class DictionaryImportController { this._setSpinnerVisible(true); if (purgeNotification !== null) { purgeNotification.hidden = false; } - await yomichan.api.purgeDatabase(); + await yomitan.api.purgeDatabase(); const errors = await this._clearDictionarySettings(); if (errors.length > 0) { @@ -215,7 +215,7 @@ export class DictionaryImportController { async _importDictionary(file, importDetails, onProgress) { const archiveContent = await this._readFile(file); const {result, errors} = await new DictionaryWorker().importDictionary(archiveContent, importDetails, onProgress); - yomichan.api.triggerDatabaseUpdated('dictionary', 'import'); + yomitan.api.triggerDatabaseUpdated('dictionary', 'import'); const errors2 = await this._addDictionarySettings(result.sequenced, result.title); if (errors.length > 0) { @@ -346,6 +346,6 @@ export class DictionaryImportController { } _triggerStorageChanged() { - yomichan.trigger('storageChanged'); + yomitan.trigger('storageChanged'); } } diff --git a/ext/js/pages/settings/extension-keyboard-shortcuts-controller.js b/ext/js/pages/settings/extension-keyboard-shortcuts-controller.js index 6e84fa0e..4f3ed569 100644 --- a/ext/js/pages/settings/extension-keyboard-shortcuts-controller.js +++ b/ext/js/pages/settings/extension-keyboard-shortcuts-controller.js @@ -18,7 +18,7 @@ import {EventListenerCollection, isObject} from '../../core.js'; import {HotkeyUtil} from '../../input/hotkey-util.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {KeyboardMouseInputField} from './keyboard-mouse-input-field.js'; export class ExtensionKeyboardShortcutController { @@ -53,7 +53,7 @@ export class ExtensionKeyboardShortcutController { this._clearButton.addEventListener('click', this._onClearClick.bind(this)); } - const {platform: {os}} = await yomichan.api.getEnvironmentInfo(); + const {platform: {os}} = await yomitan.api.getEnvironmentInfo(); this._os = os; this._hotkeyUtil.os = os; diff --git a/ext/js/pages/settings/keyboard-shortcuts-controller.js b/ext/js/pages/settings/keyboard-shortcuts-controller.js index 3f91d2f9..e7ad4d15 100644 --- a/ext/js/pages/settings/keyboard-shortcuts-controller.js +++ b/ext/js/pages/settings/keyboard-shortcuts-controller.js @@ -19,7 +19,7 @@ import {EventListenerCollection} from '../../core.js'; import {DocumentUtil} from '../../dom/document-util.js'; import {ObjectPropertyAccessor} from '../../general/object-property-accessor.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {KeyboardMouseInputField} from './keyboard-mouse-input-field.js'; export class KeyboardShortcutController { @@ -63,7 +63,7 @@ export class KeyboardShortcutController { } async prepare() { - const {platform: {os}} = await yomichan.api.getEnvironmentInfo(); + const {platform: {os}} = await yomitan.api.getEnvironmentInfo(); this._os = os; this._addButton = document.querySelector('#hotkey-list-add'); diff --git a/ext/js/pages/settings/mecab-controller.js b/ext/js/pages/settings/mecab-controller.js index 6f9f15ed..a839fc21 100644 --- a/ext/js/pages/settings/mecab-controller.js +++ b/ext/js/pages/settings/mecab-controller.js @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class MecabController { constructor(settingsController) { @@ -48,7 +48,7 @@ export class MecabController { this._testButton.disabled = true; this._resultsContainer.textContent = ''; this._resultsContainer.hidden = true; - await yomichan.api.testMecab(); + await yomitan.api.testMecab(); this._setStatus('Connection was successful', false); } catch (e) { this._setStatus(e.message, true); diff --git a/ext/js/pages/settings/persistent-storage-controller.js b/ext/js/pages/settings/persistent-storage-controller.js index 1c3bc276..aa060c14 100644 --- a/ext/js/pages/settings/persistent-storage-controller.js +++ b/ext/js/pages/settings/persistent-storage-controller.js @@ -17,7 +17,7 @@ */ import {isObject} from '../../core.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class PersistentStorageController { constructor() { @@ -71,7 +71,7 @@ export class PersistentStorageController { const node = document.querySelector('#storage-persistent-fail-warning'); if (node !== null) { node.hidden = isStoragePeristent; } - yomichan.trigger('storageChanged'); + yomitan.trigger('storageChanged'); } _isPersistentStorageSupported() { diff --git a/ext/js/pages/settings/popup-preview-frame-main.js b/ext/js/pages/settings/popup-preview-frame-main.js index 0b69fea0..59e409c5 100644 --- a/ext/js/pages/settings/popup-preview-frame-main.js +++ b/ext/js/pages/settings/popup-preview-frame-main.js @@ -19,14 +19,14 @@ import {PopupFactory} from '../../app/popup-factory.js'; import {log} from '../../core.js'; import {HotkeyHandler} from '../../input/hotkey-handler.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {PopupPreviewFrame} from './popup-preview-frame.js'; (async () => { try { - await yomichan.prepare(); + await yomitan.prepare(); - const {tabId, frameId} = await yomichan.api.frameInformationGet(); + const {tabId, frameId} = await yomitan.api.frameInformationGet(); const hotkeyHandler = new HotkeyHandler(); hotkeyHandler.prepare(); diff --git a/ext/js/pages/settings/popup-preview-frame.js b/ext/js/pages/settings/popup-preview-frame.js index c0d4358d..7a1a0b3a 100644 --- a/ext/js/pages/settings/popup-preview-frame.js +++ b/ext/js/pages/settings/popup-preview-frame.js @@ -19,7 +19,7 @@ import * as wanakana from '../../../lib/wanakana.js'; import {Frontend} from '../../app/frontend.js'; import {TextSourceRange} from '../../dom/text-source-range.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class PopupPreviewFrame { constructor(tabId, frameId, popupFactory, hotkeyHandler) { @@ -62,8 +62,8 @@ export class PopupPreviewFrame { this._exampleTextInput.addEventListener('input', this._onExampleTextInputInput.bind(this), false); // Overwrite API functions - this._apiOptionsGetOld = yomichan.api.optionsGet.bind(yomichan.api); - yomichan.api.optionsGet = this._apiOptionsGet.bind(this); + this._apiOptionsGetOld = yomitan.api.optionsGet.bind(yomitan.api); + yomitan.api.optionsGet = this._apiOptionsGet.bind(this); // Overwrite frontend this._frontend = new Frontend({ diff --git a/ext/js/pages/settings/popup-window-controller.js b/ext/js/pages/settings/popup-window-controller.js index 6f4d9ec3..9b6708d5 100644 --- a/ext/js/pages/settings/popup-window-controller.js +++ b/ext/js/pages/settings/popup-window-controller.js @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class PopupWindowController { prepare() { @@ -32,6 +32,6 @@ export class PopupWindowController { } async _testWindowOpen() { - await yomichan.api.getOrCreateSearchPopup({focus: true}); + await yomitan.api.getOrCreateSearchPopup({focus: true}); } } diff --git a/ext/js/pages/settings/profile-controller.js b/ext/js/pages/settings/profile-controller.js index a4a64e60..a5bf41b3 100644 --- a/ext/js/pages/settings/profile-controller.js +++ b/ext/js/pages/settings/profile-controller.js @@ -17,7 +17,7 @@ */ import {clone, EventListenerCollection} from '../../core.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {ProfileConditionsUI} from './profile-conditions-ui.js'; export class ProfileController { @@ -53,7 +53,7 @@ export class ProfileController { } async prepare() { - const {platform: {os}} = await yomichan.api.getEnvironmentInfo(); + const {platform: {os}} = await yomitan.api.getEnvironmentInfo(); this._profileConditionsUI.os = os; this._profileActiveSelect = document.querySelector('#profile-active-select'); diff --git a/ext/js/pages/settings/scan-inputs-controller.js b/ext/js/pages/settings/scan-inputs-controller.js index ea8d500a..252e7238 100644 --- a/ext/js/pages/settings/scan-inputs-controller.js +++ b/ext/js/pages/settings/scan-inputs-controller.js @@ -17,7 +17,7 @@ */ import {EventListenerCollection} from '../../core.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {KeyboardMouseInputField} from './keyboard-mouse-input-field.js'; export class ScanInputsController { @@ -31,7 +31,7 @@ export class ScanInputsController { } async prepare() { - const {platform: {os}} = await yomichan.api.getEnvironmentInfo(); + const {platform: {os}} = await yomitan.api.getEnvironmentInfo(); this._os = os; this._container = document.querySelector('#scan-input-list'); diff --git a/ext/js/pages/settings/scan-inputs-simple-controller.js b/ext/js/pages/settings/scan-inputs-simple-controller.js index 79ffb773..112c03a9 100644 --- a/ext/js/pages/settings/scan-inputs-simple-controller.js +++ b/ext/js/pages/settings/scan-inputs-simple-controller.js @@ -17,7 +17,7 @@ */ import {HotkeyUtil} from '../../input/hotkey-util.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {ScanInputsController} from './scan-inputs-controller.js'; export class ScanInputsSimpleController { @@ -33,7 +33,7 @@ export class ScanInputsSimpleController { this._middleMouseButtonScan = document.querySelector('#middle-mouse-button-scan'); this._mainScanModifierKeyInput = document.querySelector('#main-scan-modifier-key'); - const {platform: {os}} = await yomichan.api.getEnvironmentInfo(); + const {platform: {os}} = await yomitan.api.getEnvironmentInfo(); this._hotkeyUtil.os = os; this._mainScanModifierKeyInputHasOther = false; diff --git a/ext/js/pages/settings/secondary-search-dictionary-controller.js b/ext/js/pages/settings/secondary-search-dictionary-controller.js index 30575526..cc873901 100644 --- a/ext/js/pages/settings/secondary-search-dictionary-controller.js +++ b/ext/js/pages/settings/secondary-search-dictionary-controller.js @@ -17,7 +17,7 @@ */ import {EventListenerCollection} from '../../core.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class SecondarySearchDictionaryController { constructor(settingsController) { @@ -33,7 +33,7 @@ export class SecondarySearchDictionaryController { await this._onDatabaseUpdated(); - yomichan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); + yomitan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); this._settingsController.on('optionsChanged', this._onOptionsChanged.bind(this)); this._settingsController.on('dictionarySettingsReordered', this._onDictionarySettingsReordered.bind(this)); } diff --git a/ext/js/pages/settings/settings-controller.js b/ext/js/pages/settings/settings-controller.js index 6f83c4c0..83ccdb39 100644 --- a/ext/js/pages/settings/settings-controller.js +++ b/ext/js/pages/settings/settings-controller.js @@ -20,7 +20,7 @@ import {EventDispatcher, EventListenerCollection, generateId, isObject} from '.. import {OptionsUtil} from '../../data/options-util.js'; import {PermissionsUtil} from '../../data/permissions-util.js'; import {HtmlTemplateCollection} from '../../dom/html-template-collection.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class SettingsController extends EventDispatcher { constructor() { @@ -51,7 +51,7 @@ export class SettingsController extends EventDispatcher { } async prepare() { - yomichan.on('optionsUpdated', this._onOptionsUpdated.bind(this)); + yomitan.on('optionsUpdated', this._onOptionsUpdated.bind(this)); if (this._canObservePermissionsChanges()) { chrome.permissions.onAdded.addListener(this._onPermissionsChanged.bind(this)); chrome.permissions.onRemoved.addListener(this._onPermissionsChanged.bind(this)); @@ -69,16 +69,16 @@ export class SettingsController extends EventDispatcher { async getOptions() { const optionsContext = this.getOptionsContext(); - return await yomichan.api.optionsGet(optionsContext); + return await yomitan.api.optionsGet(optionsContext); } async getOptionsFull() { - return await yomichan.api.optionsGetFull(); + return await yomitan.api.optionsGetFull(); } async setAllSettings(value) { const profileIndex = value.profileCurrent; - await yomichan.api.setAllSettings(value, this._source); + await yomitan.api.setAllSettings(value, this._source); this._setProfileIndex(profileIndex, true); } @@ -115,7 +115,7 @@ export class SettingsController extends EventDispatcher { } async getDictionaryInfo() { - return await yomichan.api.getDictionaryInfo(); + return await yomitan.api.getDictionaryInfo(); } getOptionsContext() { @@ -186,12 +186,12 @@ export class SettingsController extends EventDispatcher { async _getSettings(targets, extraFields) { targets = this._setupTargets(targets, extraFields); - return await yomichan.api.getSettings(targets); + return await yomitan.api.getSettings(targets); } async _modifySettings(targets, extraFields) { targets = this._setupTargets(targets, extraFields); - return await yomichan.api.modifySettings(targets, this._source); + return await yomitan.api.modifySettings(targets, this._source); } _onBeforeUnload(e) { diff --git a/ext/js/pages/settings/settings-main.js b/ext/js/pages/settings/settings-main.js index 1cd0b0a9..f9ea0aa1 100644 --- a/ext/js/pages/settings/settings-main.js +++ b/ext/js/pages/settings/settings-main.js @@ -18,7 +18,7 @@ import {log} from '../../core.js'; import {DocumentFocusController} from '../../dom/document-focus-controller.js'; -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; import {ExtensionContentController} from '../common/extension-content-controller.js'; import {AnkiController} from './anki-controller.js'; import {AnkiTemplatesController} from './anki-templates-controller.js'; @@ -70,7 +70,7 @@ async function setupGenericSettingsController(genericSettingController) { document.documentElement.dataset.loadingStalled = 'true'; }, 1000); - await yomichan.prepare(); + await yomitan.prepare(); if (prepareTimer !== null) { clearTimeout(prepareTimer); diff --git a/ext/js/pages/settings/sort-frequency-dictionary-controller.js b/ext/js/pages/settings/sort-frequency-dictionary-controller.js index c946400f..53104085 100644 --- a/ext/js/pages/settings/sort-frequency-dictionary-controller.js +++ b/ext/js/pages/settings/sort-frequency-dictionary-controller.js @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class SortFrequencyDictionaryController { constructor(settingsController) { @@ -36,7 +36,7 @@ export class SortFrequencyDictionaryController { await this._onDatabaseUpdated(); - yomichan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); + yomitan.on('databaseUpdated', this._onDatabaseUpdated.bind(this)); this._settingsController.on('optionsChanged', this._onOptionsChanged.bind(this)); this._sortFrequencyDictionarySelect.addEventListener('change', this._onSortFrequencyDictionarySelectChange.bind(this)); this._sortFrequencyDictionaryOrderSelect.addEventListener('change', this._onSortFrequencyDictionaryOrderSelectChange.bind(this)); @@ -124,7 +124,7 @@ export class SortFrequencyDictionaryController { const lessCommonTerms = ['行なう', '論じる', '過す', '行方', '人口', '猫', '犬', '滝', '理', '暁']; const terms = [...moreCommonTerms, ...lessCommonTerms]; - const frequencies = await yomichan.api.getTermFrequencies( + const frequencies = await yomitan.api.getTermFrequencies( terms.map((term) => ({term, reading: null})), [dictionary] ); diff --git a/ext/js/pages/settings/storage-controller.js b/ext/js/pages/settings/storage-controller.js index 8bc63725..ba1145b8 100644 --- a/ext/js/pages/settings/storage-controller.js +++ b/ext/js/pages/settings/storage-controller.js @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import {yomichan} from '../../yomichan.js'; +import {yomitan} from '../../yomitan.js'; export class StorageController { constructor(persistentStorageController) { @@ -41,7 +41,7 @@ export class StorageController { this._storageUseInvalidNodes = document.querySelectorAll('.storage-use-invalid'); document.querySelector('#storage-refresh').addEventListener('click', this._onStorageRefreshButtonClick.bind(this), false); - yomichan.on('storageChanged', this._onStorageChanged.bind(this)); + yomitan.on('storageChanged', this._onStorageChanged.bind(this)); this._updateStats(); } -- cgit v1.2.3 From 9ab8f2753166209c8ce6a431b9c72be508d4ffd4 Mon Sep 17 00:00:00 2001 From: starxeras Date: Fri, 10 Nov 2023 21:16:58 -0600 Subject: Fix LintJS --- ext/js/pages/settings/backup-controller.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/js/pages/settings') diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js index c41d4315..1ddefa51 100644 --- a/ext/js/pages/settings/backup-controller.js +++ b/ext/js/pages/settings/backup-controller.js @@ -17,11 +17,11 @@ */ import * as Dexie from '../../../lib/dexie.js'; -import { isObject, log } from '../../core.js'; -import { OptionsUtil } from '../../data/options-util.js'; -import { ArrayBufferUtil } from '../../data/sandbox/array-buffer-util.js'; -import { yomitan } from '../../yomitan.js'; -import { DictionaryController } from './dictionary-controller.js'; +import {isObject, log} from '../../core.js'; +import {OptionsUtil} from '../../data/options-util.js'; +import {ArrayBufferUtil} from '../../data/sandbox/array-buffer-util.js'; +import {yomitan} from '../../yomitan.js'; +import {DictionaryController} from './dictionary-controller.js'; export class BackupController { constructor(settingsController, modalController) { -- cgit v1.2.3