Last active
March 2, 2024 11:23
-
-
Save VonLatvala/0c76a7ca9b3098a3b43ddd9ccf360ea6 to your computer and use it in GitHub Desktop.
Clear sonarr task queue sequentially
This file contains 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
// Modified after testing, might not work but somewhat functional selectors. Hacky af too. | |
let timer = null; | |
const killh = ((timer) => { | |
return () => { | |
if (document.querySelectorAll('.Modal-modalContainer-xTUsI').length < 1) { | |
const cancelBtnSearch = document.querySelectorAll('#root > div > div.Page-main-Swphf > div.PageContent-content-C67P9 > div > div > fieldset:nth-child(2) > div > table > tbody > tr button'); | |
if(calcelBtnSearch.length < 1) { | |
clearInterval(timer); | |
return; | |
} | |
cancelBtnSearch[0].click(); | |
document.querySelectorAll('#portal-root > div:nth-child(3) > div > div > div > div > div.ModalFooter-modalFooter-wjkx5 > button.SpinnerButton-button-uE9hL.Button-button-paJ9a.Link-link-RInnp.SpinnerButton-button-uE9hL.Button-button-paJ9a.Link-link-RInnp.Button-danger-vthZW.Button-medium-ZwfFe.Link-link-RInnp')[0].click(); | |
} | |
} | |
})(timer) | |
timer = setInterval(killh, 50); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment