-
-
Save chapter09/1fec48c31c4ccde5e30016367492f220 to your computer and use it in GitHub Desktop.
OneTab delete all saved tabs script
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
// https://intuitive-theory.com/notes/onetab-delete-all-saved-tabs-script/ | |
function delete_single() { | |
for (clickable of clickables) { | |
if (!clickable || clickable.innerHTML !== "Delete all") | |
continue; | |
clickable.click(); | |
return true; | |
} | |
return false; | |
} | |
window.confirm = function() { return true; } | |
var clickables = document.getElementsByClassName("clickable"); | |
document.addEventListener('DOMNodeRemoved', delete_single, false); | |
delete_single(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment