aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/media-loader.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-19 10:57:23 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-19 10:57:23 -0400
commitba68616d809800aa40165a8913e55d6fe05a5502 (patch)
tree243cd65b700f45a04be379042bcdd73cd07a9800 /ext/mixed/js/media-loader.js
parenta7e7d546c70c604e986d5c772d842c47fb701eda (diff)
Change some more variables using 'source' instead of 'content'
Diffstat (limited to 'ext/mixed/js/media-loader.js')
-rw-r--r--ext/mixed/js/media-loader.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/mixed/js/media-loader.js b/ext/mixed/js/media-loader.js
index 5e3177fc..64ccd715 100644
--- a/ext/mixed/js/media-loader.js
+++ b/ext/mixed/js/media-loader.js
@@ -86,8 +86,8 @@ class MediaLoader {
const token = this._token;
const data = (await apiGetMedia([{path, dictionaryName}]))[0];
if (token === this._token && data !== null) {
- const sourceArrayBuffer = this._base64ToArrayBuffer(data.content);
- const blob = new Blob([sourceArrayBuffer], {type: data.mediaType});
+ const contentArrayBuffer = this._base64ToArrayBuffer(data.content);
+ const blob = new Blob([contentArrayBuffer], {type: data.mediaType});
const url = URL.createObjectURL(blob);
cachedData.data = data;
cachedData.url = url;
@@ -96,11 +96,11 @@ class MediaLoader {
}
_base64ToArrayBuffer(content) {
- const binarySource = window.atob(content);
- const length = binarySource.length;
+ const binaryContent = window.atob(content);
+ const length = binaryContent.length;
const array = new Uint8Array(length);
for (let i = 0; i < length; ++i) {
- array[i] = binarySource.charCodeAt(i);
+ array[i] = binaryContent.charCodeAt(i);
}
return array.buffer;
}