aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/js/pages/settings/anki-templates-controller.js10
-rw-r--r--ext/js/pages/settings/audio-controller.js6
-rw-r--r--ext/js/pages/settings/backup-controller.js10
-rw-r--r--ext/js/pages/settings/dictionary-controller.js18
-rw-r--r--ext/js/pages/settings/dictionary-import-controller.js14
-rw-r--r--ext/js/pages/settings/keyboard-shortcuts-controller.js4
-rw-r--r--ext/js/pages/settings/popup-preview-frame.js8
-rw-r--r--ext/js/pages/settings/profile-conditions-ui.js6
-rw-r--r--ext/js/pages/settings/profile-controller.js22
-rw-r--r--ext/js/pages/settings/scan-inputs-controller.js6
-rw-r--r--ext/js/pages/settings/settings-display-controller.js4
-rw-r--r--ext/js/pages/settings/storage-controller.js4
12 files changed, 52 insertions, 60 deletions
diff --git a/ext/js/pages/settings/anki-templates-controller.js b/ext/js/pages/settings/anki-templates-controller.js
index 875ade3c..89848ef3 100644
--- a/ext/js/pages/settings/anki-templates-controller.js
+++ b/ext/js/pages/settings/anki-templates-controller.js
@@ -24,15 +24,15 @@ import {yomitan} from '../../yomitan.js';
export class AnkiTemplatesController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {ModalController} modalController
- * @param {AnkiController} ankiController
+ * @param {import('./modal-controller.js').ModalController} modalController
+ * @param {import('./anki-controller.js').AnkiController} ankiController
*/
constructor(settingsController, modalController, ankiController) {
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
this._modalController = modalController;
- /** @type {AnkiController} */
+ /** @type {import('./anki-controller.js').AnkiController} */
this._ankiController = ankiController;
/** @type {?import('dictionary').TermDictionaryEntry} */
this._cachedDictionaryEntryValue = null;
@@ -48,7 +48,7 @@ export class AnkiTemplatesController {
this._renderFieldInput = null;
/** @type {?HTMLElement} */
this._renderResult = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._fieldTemplateResetModal = null;
/** @type {AnkiNoteBuilder} */
this._ankiNoteBuilder = new AnkiNoteBuilder({japaneseUtil: new JapaneseUtil(null)});
diff --git a/ext/js/pages/settings/audio-controller.js b/ext/js/pages/settings/audio-controller.js
index 0bd56ff0..0a3f9454 100644
--- a/ext/js/pages/settings/audio-controller.js
+++ b/ext/js/pages/settings/audio-controller.js
@@ -25,13 +25,13 @@ import {AudioSystem} from '../../media/audio-system.js';
export class AudioController extends EventDispatcher {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {ModalController} modalController
+ * @param {import('./modal-controller.js').ModalController} modalController
*/
constructor(settingsController, modalController) {
super();
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
this._modalController = modalController;
/** @type {AudioSystem} */
this._audioSystem = new AudioSystem();
@@ -52,7 +52,7 @@ export class AudioController extends EventDispatcher {
return this._settingsController;
}
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
get modalController() {
return this._modalController;
}
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index c701b975..50a50b1a 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -26,12 +26,12 @@ import {DictionaryController} from './dictionary-controller.js';
export class BackupController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {?ModalController} modalController
+ * @param {?import('./modal-controller.js').ModalController} modalController
*/
constructor(settingsController, modalController) {
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {?ModalController} */
+ /** @type {?import('./modal-controller.js').ModalController} */
this._modalController = modalController;
/** @type {?import('core').TokenObject} */
this._settingsExportToken = null;
@@ -39,11 +39,11 @@ export class BackupController {
this._settingsExportRevoke = null;
/** @type {number} */
this._currentVersion = 0;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._settingsResetModal = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._settingsImportErrorModal = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._settingsImportWarningModal = null;
/** @type {?OptionsUtil} */
this._optionsUtil = null;
diff --git a/ext/js/pages/settings/dictionary-controller.js b/ext/js/pages/settings/dictionary-controller.js
index aa59bb97..de63b200 100644
--- a/ext/js/pages/settings/dictionary-controller.js
+++ b/ext/js/pages/settings/dictionary-controller.js
@@ -336,15 +336,15 @@ class DictionaryExtraInfo {
export class DictionaryController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {ModalController} modalController
- * @param {StatusFooter} statusFooter
+ * @param {import('./modal-controller.js').ModalController} modalController
+ * @param {import('./status-footer.js').StatusFooter} statusFooter
*/
constructor(settingsController, modalController, statusFooter) {
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
this._modalController = modalController;
- /** @type {StatusFooter} */
+ /** @type {import('./status-footer.js').StatusFooter} */
this._statusFooter = statusFooter;
/** @type {?import('dictionary-importer').Summary[]} */
this._dictionaries = null;
@@ -366,7 +366,7 @@ export class DictionaryController {
this._noDictionariesInstalledWarnings = null;
/** @type {?NodeListOf<HTMLElement>} */
this._noDictionariesEnabledWarnings = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._deleteDictionaryModal = null;
/** @type {?HTMLInputElement} */
this._allCheckbox = null;
@@ -376,7 +376,7 @@ export class DictionaryController {
this._isDeleting = false;
}
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
get modalController() {
return this._modalController;
}
@@ -418,7 +418,7 @@ export class DictionaryController {
*/
deleteDictionary(dictionaryTitle) {
if (this._isDeleting) { return; }
- const modal = /** @type {Modal} */ (this._deleteDictionaryModal);
+ const modal = /** @type {import('./modal.js').Modal} */ (this._deleteDictionaryModal);
modal.node.dataset.dictionaryTitle = dictionaryTitle;
const nameElement = /** @type {Element} */ (modal.node.querySelector('#dictionary-confirm-delete-name'));
nameElement.textContent = dictionaryTitle;
@@ -671,7 +671,7 @@ export class DictionaryController {
_onDictionaryConfirmDelete(e) {
e.preventDefault();
- const modal = /** @type {Modal} */ (this._deleteDictionaryModal);
+ const modal = /** @type {import('./modal.js').Modal} */ (this._deleteDictionaryModal);
modal.setVisible(false);
const title = modal.node.dataset.dictionaryTitle;
@@ -691,7 +691,7 @@ export class DictionaryController {
/** */
_onDictionaryMoveButtonClick() {
- const modal = /** @type {Modal} */ (this._modalController.getModal('dictionary-move-location'));
+ const modal = /** @type {import('./modal.js').Modal} */ (this._modalController.getModal('dictionary-move-location'));
const {index} = modal.node.dataset;
if (typeof index !== 'number') { return; }
const indexNumber = Number.parseInt(index, 10);
diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js
index 04128b1a..d1255e11 100644
--- a/ext/js/pages/settings/dictionary-import-controller.js
+++ b/ext/js/pages/settings/dictionary-import-controller.js
@@ -25,15 +25,15 @@ import {DictionaryController} from './dictionary-controller.js';
export class DictionaryImportController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {ModalController} modalController
- * @param {StatusFooter} statusFooter
+ * @param {import('./modal-controller.js').ModalController} modalController
+ * @param {import('./status-footer.js').StatusFooter} statusFooter
*/
constructor(settingsController, modalController, statusFooter) {
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
this._modalController = modalController;
- /** @type {StatusFooter} */
+ /** @type {import('./status-footer.js').StatusFooter} */
this._statusFooter = statusFooter;
/** @type {boolean} */
this._modifying = false;
@@ -45,7 +45,7 @@ export class DictionaryImportController {
this._importFileButton = null;
/** @type {?HTMLInputElement} */
this._importFileInput = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._purgeConfirmModal = null;
/** @type {?HTMLElement} */
this._errorContainer = null;
@@ -95,7 +95,7 @@ export class DictionaryImportController {
*/
_onPurgeButtonClick(e) {
e.preventDefault();
- /** @type {Modal} */ (this._purgeConfirmModal).setVisible(true);
+ /** @type {import('./modal.js').Modal} */ (this._purgeConfirmModal).setVisible(true);
}
/**
@@ -103,7 +103,7 @@ export class DictionaryImportController {
*/
_onPurgeConfirmButtonClick(e) {
e.preventDefault();
- /** @type {Modal} */ (this._purgeConfirmModal).setVisible(false);
+ /** @type {import('./modal.js').Modal} */ (this._purgeConfirmModal).setVisible(false);
this._purgeDatabase();
}
diff --git a/ext/js/pages/settings/keyboard-shortcuts-controller.js b/ext/js/pages/settings/keyboard-shortcuts-controller.js
index 32f22499..ad16b0e9 100644
--- a/ext/js/pages/settings/keyboard-shortcuts-controller.js
+++ b/ext/js/pages/settings/keyboard-shortcuts-controller.js
@@ -267,7 +267,7 @@ class KeyboardShortcutHotkeyEntry {
this._stringComparer = stringComparer;
/** @type {?HTMLButtonElement} */
this._enabledButton = null;
- /** @type {?PopupMenu} */
+ /** @type {?import('../../dom/popup-menu.js').PopupMenu} */
this._scopeMenu = null;
/** @type {EventListenerCollection} */
this._scopeMenuEventListeners = new EventListenerCollection();
@@ -629,7 +629,7 @@ class KeyboardShortcutHotkeyEntry {
}
/**
- * @param {PopupMenu} menu
+ * @param {import('../../dom/popup-menu.js').PopupMenu} menu
*/
_updateScopeMenuItems(menu) {
this._scopeMenuEventListeners.removeAllEventListeners();
diff --git a/ext/js/pages/settings/popup-preview-frame.js b/ext/js/pages/settings/popup-preview-frame.js
index acf4e0de..c1a0d706 100644
--- a/ext/js/pages/settings/popup-preview-frame.js
+++ b/ext/js/pages/settings/popup-preview-frame.js
@@ -25,17 +25,17 @@ export class PopupPreviewFrame {
/**
* @param {number} tabId
* @param {number} frameId
- * @param {PopupFactory} popupFactory
- * @param {HotkeyHandler} hotkeyHandler
+ * @param {import('../../app/popup-factory.js').PopupFactory} popupFactory
+ * @param {import('../../input/hotkey-handler.js').HotkeyHandler} hotkeyHandler
*/
constructor(tabId, frameId, popupFactory, hotkeyHandler) {
/** @type {number} */
this._tabId = tabId;
/** @type {number} */
this._frameId = frameId;
- /** @type {PopupFactory} */
+ /** @type {import('../../app/popup-factory.js').PopupFactory} */
this._popupFactory = popupFactory;
- /** @type {HotkeyHandler} */
+ /** @type {import('../../input/hotkey-handler.js').HotkeyHandler} */
this._hotkeyHandler = hotkeyHandler;
/** @type {?Frontend} */
this._frontend = null;
diff --git a/ext/js/pages/settings/profile-conditions-ui.js b/ext/js/pages/settings/profile-conditions-ui.js
index 8711518f..96aef83f 100644
--- a/ext/js/pages/settings/profile-conditions-ui.js
+++ b/ext/js/pages/settings/profile-conditions-ui.js
@@ -17,13 +17,9 @@
*/
import {EventDispatcher, EventListenerCollection} from '../../core.js';
+import {DocumentUtil} from '../../dom/document-util.js';
import {KeyboardMouseInputField} from './keyboard-mouse-input-field.js';
-/* global
- * DocumentUtil
- * KeyboardMouseInputField
- */
-
/**
* @augments EventDispatcher<import('profile-conditions-ui').EventType>
*/
diff --git a/ext/js/pages/settings/profile-controller.js b/ext/js/pages/settings/profile-controller.js
index 64c2e2fd..c82223b8 100644
--- a/ext/js/pages/settings/profile-controller.js
+++ b/ext/js/pages/settings/profile-controller.js
@@ -23,12 +23,12 @@ import {ProfileConditionsUI} from './profile-conditions-ui.js';
export class ProfileController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {ModalController} modalController
+ * @param {import('./modal-controller.js').ModalController} modalController
*/
constructor(settingsController, modalController) {
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
this._modalController = modalController;
/** @type {ProfileConditionsUI} */
this._profileConditionsUI = new ProfileConditionsUI(settingsController);
@@ -52,11 +52,11 @@ export class ProfileController {
this._profileEntryListContainer = null;
/** @type {?HTMLElement} */
this._profileConditionsProfileName = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._profileRemoveModal = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._profileCopyModal = null;
- /** @type {?Modal} */
+ /** @type {?import('./modal.js').Modal} */
this._profileConditionsModal = null;
/** @type {boolean} */
this._profileEntriesSupported = false;
@@ -340,8 +340,8 @@ export class ProfileController {
if (profile === null || this.profileCount <= 1) { return; }
/** @type {HTMLElement} */ (this._removeProfileNameElement).textContent = profile.name;
- /** @type {Modal} */ (this._profileRemoveModal).node.dataset.profileIndex = `${profileIndex}`;
- /** @type {Modal} */ (this._profileRemoveModal).setVisible(true);
+ /** @type {import('./modal.js').Modal} */ (this._profileRemoveModal).node.dataset.profileIndex = `${profileIndex}`;
+ /** @type {import('./modal.js').Modal} */ (this._profileRemoveModal).setVisible(true);
}
/**
@@ -368,8 +368,8 @@ export class ProfileController {
}
select.value = `${copyFromIndex}`;
- /** @type {Modal} */ (this._profileCopyModal).node.dataset.profileIndex = `${profileIndex}`;
- /** @type {Modal} */ (this._profileCopyModal).setVisible(true);
+ /** @type {import('./modal.js').Modal} */ (this._profileCopyModal).node.dataset.profileIndex = `${profileIndex}`;
+ /** @type {import('./modal.js').Modal} */ (this._profileCopyModal).setVisible(true);
}
/**
@@ -453,7 +453,7 @@ export class ProfileController {
/** */
_onDeleteConfirm() {
- const modal = /** @type {Modal} */ (this._profileRemoveModal);
+ const modal = /** @type {import('./modal.js').Modal} */ (this._profileRemoveModal);
modal.setVisible(false);
const {node} = modal;
const profileIndex = node.dataset.profileIndex;
@@ -467,7 +467,7 @@ export class ProfileController {
/** */
_onCopyConfirm() {
- const modal = /** @type {Modal} */ (this._profileCopyModal);
+ const modal = /** @type {import('./modal.js').Modal} */ (this._profileCopyModal);
modal.setVisible(false);
const {node} = modal;
const destinationProfileIndex = node.dataset.profileIndex;
diff --git a/ext/js/pages/settings/scan-inputs-controller.js b/ext/js/pages/settings/scan-inputs-controller.js
index 0686540a..53423bdc 100644
--- a/ext/js/pages/settings/scan-inputs-controller.js
+++ b/ext/js/pages/settings/scan-inputs-controller.js
@@ -17,14 +17,10 @@
*/
import {EventListenerCollection} from '../../core.js';
+import {DocumentUtil} from '../../dom/document-util.js';
import {yomitan} from '../../yomitan.js';
import {KeyboardMouseInputField} from './keyboard-mouse-input-field.js';
-/* global
- * DocumentUtil
- * KeyboardMouseInputField
- */
-
export class ScanInputsController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
diff --git a/ext/js/pages/settings/settings-display-controller.js b/ext/js/pages/settings/settings-display-controller.js
index ca4fc32e..16e6cfae 100644
--- a/ext/js/pages/settings/settings-display-controller.js
+++ b/ext/js/pages/settings/settings-display-controller.js
@@ -23,12 +23,12 @@ import {SelectorObserver} from '../../dom/selector-observer.js';
export class SettingsDisplayController {
/**
* @param {import('./settings-controller.js').SettingsController} settingsController
- * @param {ModalController} modalController
+ * @param {import('./modal-controller.js').ModalController} modalController
*/
constructor(settingsController, modalController) {
/** @type {import('./settings-controller.js').SettingsController} */
this._settingsController = settingsController;
- /** @type {ModalController} */
+ /** @type {import('./modal-controller.js').ModalController} */
this._modalController = modalController;
/** @type {?HTMLElement} */
this._contentNode = null;
diff --git a/ext/js/pages/settings/storage-controller.js b/ext/js/pages/settings/storage-controller.js
index 8af44b33..7f323b48 100644
--- a/ext/js/pages/settings/storage-controller.js
+++ b/ext/js/pages/settings/storage-controller.js
@@ -20,10 +20,10 @@ import {yomitan} from '../../yomitan.js';
export class StorageController {
/**
- * @param {PersistentStorageController} persistentStorageController
+ * @param {import('./persistent-storage-controller.js').PersistentStorageController} persistentStorageController
*/
constructor(persistentStorageController) {
- /** @type {PersistentStorageController} */
+ /** @type {import('./persistent-storage-controller.js').PersistentStorageController} */
this._persistentStorageController = persistentStorageController;
/** @type {?StorageEstimate} */
this._mostRecentStorageEstimate = null;