Last active
April 20, 2024 21:32
-
-
Save uddhabh/67ab2737ccdbe4664e532e68a9e41ea5 to your computer and use it in GitHub Desktop.
OneTab delete all saved tabs script
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
// 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