From 0e80c0d5d03b51c56e72657a46c868c9a2c1137d Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 19 Apr 2020 10:24:36 -0400 Subject: [PATCH] Rename loadImage to loadImageBase64 for clarity --- ext/bg/js/dictionary-importer.js | 2 +- ext/bg/js/media-utility.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/bg/js/dictionary-importer.js b/ext/bg/js/dictionary-importer.js index b5c535bb..3727f7ee 100644 --- a/ext/bg/js/dictionary-importer.js +++ b/ext/bg/js/dictionary-importer.js @@ -331,7 +331,7 @@ class DictionaryImporter { let image; try { - image = await mediaUtility.loadImage(mediaType, content); + image = await mediaUtility.loadImageBase64(mediaType, content); } catch (e) { throw new Error(`Could not load image at path ${JSON.stringify(path)} for ${errorSource}`); } diff --git a/ext/bg/js/media-utility.js b/ext/bg/js/media-utility.js index 8a46cb49..fcbf9d37 100644 --- a/ext/bg/js/media-utility.js +++ b/ext/bg/js/media-utility.js @@ -52,7 +52,7 @@ const mediaUtility = (() => { } } - function loadImage(mediaType, content) { + function loadImageBase64(mediaType, content) { return new Promise((resolve, reject) => { const image = new Image(); const eventListeners = new EventListenerCollection(); @@ -70,6 +70,6 @@ const mediaUtility = (() => { return { getImageMediaTypeFromFileName, - loadImage + loadImageBase64 }; })();