Last active
February 16, 2016 04:07
-
-
Save kubosho/d2a49b1c1b1b231195b8 to your computer and use it in GitHub Desktop.
👍 eraser in GitHub issue
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
| function closest(baseElement, className) { | |
| var targetElement = baseElement; | |
| if(!(targetElement.classList.contains(className))) { | |
| targetElement = baseElement.parentElement; | |
| return closest(targetElement, className); | |
| } | |
| return targetElement; | |
| } | |
| Array.prototype.forEach.call(document.querySelectorAll('[title=":+1:"], [title=":thumbsup:"]'), function(plusoneElement) { | |
| closest(plusoneElement, 'comment').style.display = 'none'; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment