Skip to content

Instantly share code, notes, and snippets.

@mfurlend
Created May 14, 2018 18:04
Show Gist options
  • Save mfurlend/c4f6fdb5a26bad4840822036a1ef3284 to your computer and use it in GitHub Desktop.
Save mfurlend/c4f6fdb5a26bad4840822036a1ef3284 to your computer and use it in GitHub Desktop.
delete all torrents in WebTorrent
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