aboutsummaryrefslogtreecommitdiff
path: root/ext/js/comm/clipboard-reader.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-14 11:32:30 -0500
committerGitHub <noreply@github.com>2021-02-14 11:32:30 -0500
commit5268c5d1bc079ac99e99cf04853d3dea22def403 (patch)
tree0ea2383369fe571bd0686e69a626db1464c92a8a /ext/js/comm/clipboard-reader.js
parent0117df6bd8b1603fec0eb5b8d840e777372f47c8 (diff)
Util rename (#1389)
* Rename MediaUtility to MediaUtil for consistency * Update variable names * Rename media-utility.js to media-util.js * Rename ProfileConditions to ProfileConditionsUtil * Rename variables * Move profile-conditions.js to profile-conditions-util.js * Rename test-profile-conditions.js to test-profile-conditions-util.js
Diffstat (limited to 'ext/js/comm/clipboard-reader.js')
-rw-r--r--ext/js/comm/clipboard-reader.js8
1 files changed, 4 insertions, 4 deletions
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);
}
}