Skip to content

Instantly share code, notes, and snippets.

@andreyvolokitin
Created December 9, 2018 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreyvolokitin/76de55c5fc8f281ac528b4cf305cc8f0 to your computer and use it in GitHub Desktop.
Save andreyvolokitin/76de55c5fc8f281ac528b4cf305cc8f0 to your computer and use it in GitHub Desktop.
Search exported bookmarks HTML via browser console
const query = 'git';
const regexp = new RegExp(`\\b${query}\\b`, 'i');
Array.prototype.slice.apply(document.querySelectorAll('dt > a')).forEach(link => {
if (!regexp.test(link.innerHTML)) {
link.parentNode.removeChild(link);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment