Created
August 10, 2016 13:44
-
-
Save justinobney/8dda000547cd10b3391c72ba5e957454 to your computer and use it in GitHub Desktop.
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
| var criteria = 'remote react'; | |
| var comments = document.querySelectorAll('.comment-tree .athing'); | |
| [].slice.call(comments).forEach((e) => { | |
| var terms = criteria.split(' '); | |
| var matches = terms.every(t=>(e.innerText.match(new RegExp(t, 'gi')) || []).length) | |
| if(!matches){ | |
| e.style.display = 'none' | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment