Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
Last active December 25, 2015 14:28
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 OliverJAsh/6990807 to your computer and use it in GitHub Desktop.
Save OliverJAsh/6990807 to your computer and use it in GitHub Desktop.
A script to select multiple history entries (in Chrome) that match against a given string — handy for bulk deletions
// Go to chrome://history-frame and run the following script from the console:
var url = window.prompt('Enter a URL to match');
var entries = document.querySelectorAll('.entry');
Array.prototype.forEach.call(entries, function (entry) {
var test = new RegExp(url)
if (test.exec(entry.querySelector('.title a').attributes.getNamedItem('href').value)) {
entry.querySelector('input[type="checkbox"]').checked = true;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment