@@ -336,7 +336,7 @@ export function removeScript(id) {
storage.code.remove(id);
storage.value.remove(id);
}
- return browser.runtime.sendMessage({
+ browser.runtime.sendMessage({
cmd: 'RemoveScript',
data: id,
});
@@ -93,5 +93,9 @@ function initMain() {
initScript(updated);
},
+ RemoveScript(id) {
+ const i = store.scripts.findIndex(script => script.props.id === id);
+ if (i >= 0) store.scripts.splice(i, 1);
+ },