Last active
December 3, 2022 17:31
-
-
Save gokatz/2baea7be35b2ffd34b2346da0a440f42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timeout = 1000; | |
async function disableRules(params) { | |
const ruleDisableButtons = document.querySelectorAll( | |
'button[title="Disable rule"]' | |
); | |
for await (const ruleDisableButton of ruleDisableButtons) { | |
ruleDisableButton.click(); | |
await wait(timeout); | |
} | |
} | |
function wait(timeout) { | |
return new Promise((res) => { | |
setTimeout(() => { | |
res(); | |
}, timeout); | |
}); | |
} | |
disableRules(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.