OneTab delete all saved tabs script

OneTab is a nice extension, but it becomes very slow when we have about 10k tabs. There aren’t options in OneTab to delete all tabs after exporting them. So I wrote a script to delete all tabs.

Note that you should export all tabs before executing the script.

Open Developer Console and paste:

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();

You may wait for a while… It will start deleting groups.

Supplementary

  1. OneTab | Firefox Browser Add-ons
  2. OneTab | Chrome Web Store

Posted:

Comments