Ahmad Kholid 2 lat temu
rodzic
commit
c1af692579
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 1 1
      package.json
  2. 2 1
      src/background/index.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "automa",
-  "version": "1.22.3",
+  "version": "1.23.0",
   "description": "An extension for automating your browser by connecting blocks",
   "repository": {
     "type": "git",

+ 2 - 1
src/background/index.js

@@ -112,7 +112,8 @@ message.on('dashboard:refresh-packages', async () => {
 message.on('workflow:stop', (stateId) => workflowState.stop(stateId));
 message.on('workflow:execute', async (workflowData, sender) => {
   const context = workflowData.settings.execContext;
-  if (!context || context === 'popup') {
+  const isMV2 = browser.runtime.getManifest().manifest_version === 2;
+  if (!isMV2 && (!context || context === 'popup')) {
     await BackgroundUtils.openDashboard('', false);
     await sleep(1000);
     await BackgroundUtils.sendMessageToDashboard('workflow:execute', {