Skip to content

Commit

Permalink
chore: bump version to 0.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Kholid060 committed Nov 13, 2021
1 parent 1fd5210 commit e74e7fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/components/newtab/workflow/edit/EditTrigger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down Expand Up @@ -97,7 +97,7 @@
Active while in input
</ui-checkbox>
<p class="mt-4 leading-tight text-gray-600 dark:text-gray-200">
Note: keyboard shortcut only executed when you're on a webpage
Note: keyboard shortcut only working when you're on a webpage
</p>
</div>
</transition-expand>
Expand Down
8 changes: 7 additions & 1 deletion src/content/blocks-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -103,19 +106,22 @@ 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);
});

document.body.appendChild(script);

timeout = setTimeout(() => {
script.remove();
resolve('');
}, block.data.timeout);
});
Expand Down
1 change: 0 additions & 1 deletion src/utils/workflow-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export function importWorkflow() {
reader.readAsText(file);
})
.catch((error) => {
alert(error.message);
console.error(error);
});
}
Expand Down

0 comments on commit e74e7fc

Please sign in to comment.