Skip to content

Instantly share code, notes, and snippets.

@dmitrydyomin
Created July 24, 2020 09:10
Show Gist options
  • Save dmitrydyomin/a663b54e577f1390104a82a8297b98ef to your computer and use it in GitHub Desktop.
Save dmitrydyomin/a663b54e577f1390104a82a8297b98ef to your computer and use it in GitHub Desktop.
document.querySelectorAll('.comment').forEach(el => {
const score = parseInt(el.querySelector('.voting-wjt__counter').innerText.replace('–', '-'));
if (Math.abs(score) < 2) {
el.remove();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment