Created
May 14, 2018 18:04
-
-
Save mfurlend/c4f6fdb5a26bad4840822036a1ef3284 to your computer and use it in GitHub Desktop.
delete all torrents in WebTorrent
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
var delete_buttons = Array.from(document.getElementsByClassName('delete')) | |
while (delete_buttons.length > 0) { | |
var button = delete_buttons.pop(); | |
button.click(); | |
Array.from(document.querySelector('.control.ok').getElementsByTagName('*')).forEach(o=>o.click()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment