|
|
@@ -2,6 +2,7 @@ import { isDataUri, isHttpOrHttps, noop, sendCmdDirectly } from '@/common/index'
|
|
|
|
|
|
// TODO: convert this into a component tag e.g. <safe-icon>
|
|
|
const KEY = 'safeIcon';
|
|
|
+const KEY_DEFAULT = 'noIcon';
|
|
|
|
|
|
/**
|
|
|
* Sets script's safeIcon property after the image is successfully loaded
|
|
|
@@ -17,6 +18,8 @@ export async function loadScriptIcon(script, store, showDefault) {
|
|
|
def = `${ICON_PREFIX}${isHiDPI && 128 || (script.config.removed ? 32 : 38)}.png`
|
|
|
);
|
|
|
if (!url || url !== script[KEY]) {
|
|
|
+ // exposing scripts with no icon for user's CustomCSS
|
|
|
+ script[KEY_DEFAULT] = def ? '' : null;
|
|
|
// creates an observable property so Vue will see the change after `await`
|
|
|
if (!(KEY in script)) {
|
|
|
script[KEY] = null;
|