Created
December 9, 2018 17:03
-
-
Save andreyvolokitin/76de55c5fc8f281ac528b4cf305cc8f0 to your computer and use it in GitHub Desktop.
Search exported bookmarks HTML via browser console
This file contains hidden or 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
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