Skip to content

Instantly share code, notes, and snippets.

@gokatz
Last active December 3, 2022 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gokatz/2baea7be35b2ffd34b2346da0a440f42 to your computer and use it in GitHub Desktop.
Save gokatz/2baea7be35b2ffd34b2346da0a440f42 to your computer and use it in GitHub Desktop.
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();
@gokatz
Copy link
Author

gokatz commented Dec 3, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment