I was trying to create a greasemonkey script which removes Facebook and twitter from a website. In my case 9gag. I looked and I need to hide the classes:
1. 'social-action' (works fine)
2. 'badge-sticky-social sticky-social' (every second post)
3. 'post-afterbar-a in-list-view' (every second post)
my Code so far (differing classes)
(function() {
var ads=document.getElementsByClassName('badge-sticky-social sticky-social');
for (var i=0; i<ads.length; i++) {
ads[i].parentNode.removeChild(ads[i]);
}
})()
I don't know why it only works on half the post and not all of them