Skip to content

Instantly share code, notes, and snippets.

@gwash
Created October 8, 2012 08:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gwash/3851456 to your computer and use it in GitHub Desktop.
Save gwash/3851456 to your computer and use it in GitHub Desktop.
pentadactyl command to close duplicate tabs
com -d "Delete duplicate tabs" tabcloseduplicates,tabclosed -js let seen={},vtabs=tabs.visibleTabs,i=vtabs.length;while(i--){let loc=vtabs[i].linkedBrowser.contentDocument.location.href||"";if(Object.prototype.hasOwnProperty.call(seen, loc)){config.tabbrowser.removeTab(vtabs[i]);}else{seen[loc]=true;}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment