diff --git a/.gitignore b/.gitignore index c680358..f2465d3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /dist /dist-zip Session.vim +.idea/ diff --git a/src/background.js b/src/background.js index 93205e1..adc3a80 100644 --- a/src/background.js +++ b/src/background.js @@ -37,7 +37,7 @@ const menu = { this.hosts = await utils.methods.getHosts(); this.actions = await utils.methods.getActions(); this.scripts = await utils.methods.getScripts(); - browser.contextMenus.removeAll(); + await browser.contextMenus.removeAll(); for (const [host] of Object.entries(this.hosts)) { const hostId = this.separator + host; @@ -71,9 +71,9 @@ const menu = { const target = await utils.methods.getTargetElement(); if (action in this.actions) { - utils.methods.run(this.actions[action], this.hosts[host]); + await utils.methods.run(this.actions[action], this.hosts[host]); } else { - utils.methods.runScript(this.scripts[action].script, this.hosts[host], tab, target); + await utils.methods.runScript(this.scripts[action].script, this.hosts[host], tab, target); } }); }, @@ -84,6 +84,7 @@ const menu = { }; const onCreate = () => { + // noinspection JSIgnoredPromiseFromCall menu.create(); }; diff --git a/src/options/Run.vue b/src/options/Run.vue index a2aeb3c..5e5050f 100644 --- a/src/options/Run.vue +++ b/src/options/Run.vue @@ -1,3 +1,4 @@ +