Last active
December 25, 2015 14:28
-
-
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
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
// 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