rename modules after moving to appropriate folders
This commit is contained in:
parent
0b7be21d03
commit
a226f12645
16 changed files with 17 additions and 17 deletions
|
@ -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};
|
Loading…
Add table
Add a link
Reference in a new issue