Skip to content

Instantly share code, notes, and snippets.

@shioken
Created March 20, 2021 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shioken/939754976670696789bd2f49791b2954 to your computer and use it in GitHub Desktop.
Save shioken/939754976670696789bd2f49791b2954 to your computer and use it in GitHub Desktop.
名無しのコメントを非表示にするスクリプト
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