diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/background.html | 4 | ||||
-rw-r--r-- | ext/js/background/backend.js | 16 | ||||
-rw-r--r-- | ext/js/background/profile-conditions-util.js (renamed from ext/js/background/profile-conditions.js) | 2 | ||||
-rw-r--r-- | ext/js/comm/clipboard-reader.js | 8 | ||||
-rw-r--r-- | ext/js/language/dictionary-importer.js | 6 | ||||
-rw-r--r-- | ext/js/media/media-util.js (renamed from ext/js/media/media-utility.js) | 4 | ||||
-rw-r--r-- | ext/settings-old.html | 2 | ||||
-rw-r--r-- | ext/settings.html | 2 | ||||
-rw-r--r-- | ext/sw.js | 4 | ||||
-rw-r--r-- | ext/welcome.html | 2 |
10 files changed, 25 insertions, 25 deletions
diff --git a/ext/background.html b/ext/background.html index 740bee57..6818db23 100644 --- a/ext/background.html +++ b/ext/background.html @@ -35,10 +35,10 @@ <script src="/js/language/dictionary-database.js"></script> <script src="/js/data/json-schema.js"></script> <script src="/js/comm/mecab.js"></script> - <script src="/js/media/media-utility.js"></script> + <script src="/js/media/media-util.js"></script> <script src="/js/data/options-util.js"></script> <script src="/js/data/permissions-util.js"></script> - <script src="/js/background/profile-conditions.js"></script> + <script src="/js/background/profile-conditions-util.js"></script> <script src="/js/background/request-builder.js"></script> <script src="/js/dom/native-simple-dom-parser.js"></script> <script src="/js/templates/template-patcher.js"></script> diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 3bb23310..69c90aca 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -25,11 +25,11 @@ * JapaneseUtil * JsonSchemaValidator * Mecab - * MediaUtility + * MediaUtil * ObjectPropertyAccessor * OptionsUtil * PermissionsUtil - * ProfileConditions + * ProfileConditionsUtil * RequestBuilder * Translator * wanakana @@ -46,13 +46,13 @@ class Backend { }); this._anki = new AnkiConnect(); this._mecab = new Mecab(); - this._mediaUtility = new MediaUtility(); + this._mediaUtil = new MediaUtil(); this._clipboardReader = new ClipboardReader({ // eslint-disable-next-line no-undef document: (typeof document === 'object' && document !== null ? document : null), pasteTargetSelector: '#clipboard-paste-target', imagePasteTargetSelector: '#clipboard-image-paste-target', - mediaUtility: this._mediaUtility + mediaUtil: this._mediaUtil }); this._clipboardMonitor = new ClipboardMonitor({ japaneseUtil: this._japaneseUtil, @@ -61,7 +61,7 @@ class Backend { this._options = null; this._profileConditionsSchemaValidator = new JsonSchemaValidator(); this._profileConditionsSchemaCache = []; - this._profileConditionsUtil = new ProfileConditions(); + this._profileConditionsUtil = new ProfileConditionsUtil(); this._defaultAnkiFieldTemplates = null; this._requestBuilder = new RequestBuilder(); this._audioDownloader = new AudioDownloader({ @@ -1707,7 +1707,7 @@ class Backend { return null; } - let extension = this._mediaUtility.getFileExtensionFromAudioMediaType(contentType); + let extension = this._mediaUtil.getFileExtensionFromAudioMediaType(contentType); if (extension === null) { extension = '.mp3'; } let fileName = this._generateAnkiNoteMediaFileName('yomichan_audio', extension, timestamp, definitionDetails); fileName = fileName.replace(/\]/g, ''); @@ -1721,7 +1721,7 @@ class Backend { const dataUrl = await this._getScreenshot(tabId, frameId, format, quality); const {mediaType, data} = this._getDataUrlInfo(dataUrl); - const extension = this._mediaUtility.getFileExtensionFromImageMediaType(mediaType); + const extension = this._mediaUtil.getFileExtensionFromImageMediaType(mediaType); if (extension === null) { throw new Error('Unknown media type for screenshot image'); } @@ -1739,7 +1739,7 @@ class Backend { } const {mediaType, data} = this._getDataUrlInfo(dataUrl); - const extension = this._mediaUtility.getFileExtensionFromImageMediaType(mediaType); + const extension = this._mediaUtil.getFileExtensionFromImageMediaType(mediaType); if (extension === null) { throw new Error('Unknown media type for clipboard image'); } diff --git a/ext/js/background/profile-conditions.js b/ext/js/background/profile-conditions-util.js index 8e6c7163..928026e0 100644 --- a/ext/js/background/profile-conditions.js +++ b/ext/js/background/profile-conditions-util.js @@ -18,7 +18,7 @@ /** * Utility class to help processing profile conditions. */ -class ProfileConditions { +class ProfileConditionsUtil { /** * Creates a new instance. */ diff --git a/ext/js/comm/clipboard-reader.js b/ext/js/comm/clipboard-reader.js index 275c2d60..6d4f5abc 100644 --- a/ext/js/comm/clipboard-reader.js +++ b/ext/js/comm/clipboard-reader.js @@ -25,14 +25,14 @@ class ClipboardReader { * @param pasteTargetSelector The selector for the paste target element. * @param imagePasteTargetSelector The selector for the image paste target element. */ - constructor({document=null, pasteTargetSelector=null, imagePasteTargetSelector=null, mediaUtility=null}) { + constructor({document=null, pasteTargetSelector=null, imagePasteTargetSelector=null, mediaUtil=null}) { this._document = document; this._browser = null; this._pasteTarget = null; this._pasteTargetSelector = pasteTargetSelector; this._imagePasteTarget = null; this._imagePasteTargetSelector = imagePasteTargetSelector; - this._mediaUtility = mediaUtility; + this._mediaUtil = mediaUtil; } /** @@ -107,7 +107,7 @@ class ClipboardReader { // See browser-specific notes in getText if ( this._isFirefox() && - this._mediaUtility !== null && + this._mediaUtil !== null && typeof navigator.clipboard !== 'undefined' && typeof navigator.clipboard.read === 'function' ) { @@ -120,7 +120,7 @@ class ClipboardReader { } for (const file of files) { - if (this._mediaUtility.getFileExtensionFromImageMediaType(file.type) !== null) { + if (this._mediaUtil.getFileExtensionFromImageMediaType(file.type) !== null) { return await this._readFileAsDataURL(file); } } diff --git a/ext/js/language/dictionary-importer.js b/ext/js/language/dictionary-importer.js index 4cb608db..c23a93e3 100644 --- a/ext/js/language/dictionary-importer.js +++ b/ext/js/language/dictionary-importer.js @@ -18,14 +18,14 @@ /* global * JSZip * JsonSchemaValidator - * MediaUtility + * MediaUtil */ class DictionaryImporter { constructor() { this._schemas = new Map(); this._jsonSchemaValidator = new JsonSchemaValidator(); - this._mediaUtility = new MediaUtility(); + this._mediaUtil = new MediaUtil(); } async importDictionary(dictionaryDatabase, archiveSource, details, onProgress) { @@ -325,7 +325,7 @@ class DictionaryImporter { } const content = await file.async('base64'); - const mediaType = this._mediaUtility.getImageMediaTypeFromFileName(path); + const mediaType = this._mediaUtil.getImageMediaTypeFromFileName(path); if (mediaType === null) { throw new Error(`Could not determine media type for image at path ${JSON.stringify(path)} for ${errorSource}`); } diff --git a/ext/js/media/media-utility.js b/ext/js/media/media-util.js index b4fbe04d..25bcdd18 100644 --- a/ext/js/media/media-utility.js +++ b/ext/js/media/media-util.js @@ -16,9 +16,9 @@ */ /** - * MediaUtility is a class containing helper methods related to media processing. + * MediaUtil is a class containing helper methods related to media processing. */ -class MediaUtility { +class MediaUtil { /** * Gets the file extension of a file path. URL search queries and hash * fragments are not handled. diff --git a/ext/settings-old.html b/ext/settings-old.html index 8b541ab3..697b95dc 100644 --- a/ext/settings-old.html +++ b/ext/settings-old.html @@ -1304,7 +1304,7 @@ <script src="/js/language/dictionary-database.js"></script> <script src="/js/language/dictionary-importer.js"></script> <script src="/js/data/json-schema.js"></script> - <script src="/js/media/media-utility.js"></script> + <script src="/js/media/media-util.js"></script> <script src="/js/data/permissions-util.js"></script> <script src="/js/templates/template-patcher.js"></script> <script src="/js/templates/template-renderer-proxy.js"></script> diff --git a/ext/settings.html b/ext/settings.html index faea4aa3..b37507ed 100644 --- a/ext/settings.html +++ b/ext/settings.html @@ -3218,7 +3218,7 @@ <script src="/js/language/dictionary-database.js"></script> <script src="/js/language/dictionary-importer.js"></script> <script src="/js/data/json-schema.js"></script> -<script src="/js/media/media-utility.js"></script> +<script src="/js/media/media-util.js"></script> <script src="/js/data/permissions-util.js"></script> <script src="/js/templates/template-patcher.js"></script> <script src="/js/templates/template-renderer-proxy.js"></script> @@ -34,10 +34,10 @@ self.importScripts( '/js/language/dictionary-database.js', '/js/data/json-schema.js', '/js/comm/mecab.js', - '/js/media/media-utility.js', + '/js/media/media-util.js', '/js/data/options-util.js', '/js/data/permissions-util.js', - '/js/background/profile-conditions.js', + '/js/background/profile-conditions-util.js', '/js/background/request-builder.js', '/js/dom/simple-dom-parser.js', '/js/templates/template-patcher.js', diff --git a/ext/welcome.html b/ext/welcome.html index 16dd964d..0ea2020f 100644 --- a/ext/welcome.html +++ b/ext/welcome.html @@ -335,7 +335,7 @@ <script src="/js/language/dictionary-database.js"></script> <script src="/js/language/dictionary-importer.js"></script> <script src="/js/data/json-schema.js"></script> -<script src="/js/media/media-utility.js"></script> +<script src="/js/media/media-util.js"></script> <script src="/js/data/permissions-util.js"></script> <script src="/js/settings/dictionary-controller.js"></script> |