Created
March 20, 2021 04:26
-
-
Save shioken/939754976670696789bd2f49791b2954 to your computer and use it in GitHub Desktop.
名無しのコメントを非表示にするスクリプト
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
comments = document.getElementsByClassName('comment'); | |
d = 0; | |
for (i = 0; i < comments.length; i++) { | |
const imgs = comments[i].getElementsByTagName('img'); | |
if (imgs.length == 0) { | |
comments[i].hidden = true; | |
d++; | |
} | |
} | |
console.log(`remove comment: ${d}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment