From e74e7fc7db023b54aeb6c52d80d313e36bae8fe8 Mon Sep 17 00:00:00 2001 From: Ahmad Kholid Date: Sat, 13 Nov 2021 15:35:09 +0800 Subject: [PATCH] chore: bump version to 0.4.6 --- package.json | 2 +- src/components/newtab/workflow/edit/EditTrigger.vue | 6 +++--- src/content/blocks-handler.js | 8 +++++++- src/utils/workflow-data.js | 1 - 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 967541e47..f6cfbd05e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "automa", - "version": "0.4.5", + "version": "0.4.6", "description": "An extension for automating your browser by connecting blocks", "license": "MIT", "repository": { diff --git a/src/components/newtab/workflow/edit/EditTrigger.vue b/src/components/newtab/workflow/edit/EditTrigger.vue index d744d382b..ab28cc3e2 100644 --- a/src/components/newtab/workflow/edit/EditTrigger.vue +++ b/src/components/newtab/workflow/edit/EditTrigger.vue @@ -23,8 +23,8 @@ type="number" class="w-full mr-2" label="Interval (minutes)" - placeholder="5-120" - min="10" + placeholder="1-120" + min="1" max="120" @change=" updateIntervalInput($event, { key: 'interval', min: 1, max: 120 }) @@ -97,7 +97,7 @@ Active while in input

- Note: keyboard shortcut only executed when you're on a webpage + Note: keyboard shortcut only working when you're on a webpage

diff --git a/src/content/blocks-handler.js b/src/content/blocks-handler.js index 2962a2c74..a3d03de16 100644 --- a/src/content/blocks-handler.js +++ b/src/content/blocks-handler.js @@ -93,7 +93,10 @@ export function javascriptCode(block) { return new Promise((resolve) => { const isScriptExists = document.getElementById('automa-custom-js'); - if (isScriptExists) isScriptExists.remove(); + if (isScriptExists) { + resolve(''); + return; + } const script = document.createElement('script'); let timeout; @@ -103,12 +106,14 @@ export function javascriptCode(block) { window.addEventListener('__automa-next-block__', ({ detail }) => { clearTimeout(timeout); + script.remove(); resolve(detail || {}); }); window.addEventListener('__automa-reset-timeout__', () => { clearTimeout(timeout); timeout = setTimeout(() => { + script.remove(); resolve(''); }, block.data.timeout); }); @@ -116,6 +121,7 @@ export function javascriptCode(block) { document.body.appendChild(script); timeout = setTimeout(() => { + script.remove(); resolve(''); }, block.data.timeout); }); diff --git a/src/utils/workflow-data.js b/src/utils/workflow-data.js index eb8bc86de..61476a53c 100644 --- a/src/utils/workflow-data.js +++ b/src/utils/workflow-data.js @@ -15,7 +15,6 @@ export function importWorkflow() { reader.readAsText(file); }) .catch((error) => { - alert(error.message); console.error(error); }); }