rename modules after moving to appropriate folders

This commit is contained in:
buzz-lightsnack-2007 2024-04-26 21:32:32 +08:00
parent 0b7be21d03
commit a226f12645
16 changed files with 17 additions and 17 deletions

View file

@ -1,23 +0,0 @@
const CONFIG = chrome.runtime.getURL("media/config.icons.json");
class Image {
/* Get the appropriate image path from the configuration.
@param {string} name The name of the image.
*/
static get(name, size) {
return (fetch(CONFIG)
.then((response) => response.json())
.then((jsonData) => {
let image = {'raw': jsonData[name]};
image[`filtered`] = (image[`raw`] && size) ? image[`raw`][String(size)] : image[`raw`];
return image[`filtered`];
})
.catch((error) => {
console.error(error);
}));
};
}
export {Image as default};