Skip to content

Instantly share code, notes, and snippets.

@dubeme
Created November 18, 2014 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dubeme/7f672067f0aa599ad2a2 to your computer and use it in GitHub Desktop.
Save dubeme/7f672067f0aa599ad2a2 to your computer and use it in GitHub Desktop.
Script to delete all google chrome history
// https://superuser.com/questions/480646/how-can-i-delete-all-web-history-that-matches-a-specific-query-in-google-chrome
// Visit -> [chrome://history-frame/] to clear all history
// Visit -> [chrome://history-frame/#q=SEARCH_TERM] to clear all history with SEARCH_TERM
function remove() {
var inputs = document.getElementsByTagName('input');
try {
for (var i = 0; i < inputs.length; ++i) {
if (inputs[i].type == "checkbox"){
inputs[i].checked = true;
}
}
document.getElementById("remove-selected").removeAttribute("disabled");
document.getElementById("remove-selected").click();
document.getElementById("alertOverlayCancel").click();
setTimeout(remove,10);
} catch(ex) {
console.log(ex.message);
}
}
remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment