From ba68616d809800aa40165a8913e55d6fe05a5502 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 19 Apr 2020 10:57:23 -0400 Subject: Change some more variables using 'source' instead of 'content' --- ext/mixed/js/media-loader.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/mixed/js') 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; } -- cgit v1.2.3