Skip to content

Instantly share code, notes, and snippets.

View devscotland65535's full-sized avatar

devscotland65535

View GitHub Profile
@devscotland65535
devscotland65535 / sgp-trolls.txt
Last active February 9, 2019 09:54
Bookmarklet to remove spam from http://scotgoespop.blogspot.co.uk comments. Click the 'Raw' button below, copy the code, add as a bookmark in your browser of choice and call it when reading posts on SCOT goes POP! Filtering updated as and when required.
javascript:(function(){function e(a){for(;(a=a.parentElement)&&!a.classList.contains("comment"););return a}var c,b,d,f=document.querySelectorAll(".comment-block"),g=window.atob("d29ya2luZyBjbGFzc3xnd2N8bmF0IHNpfGtuaWNrZXJsZXNzfGdsZXNnYSBmYWtlIG5ld3N8Z2xlc2dhMnxnbGVzZ2F8Y29yZGVsaWE=").split("|");Array.prototype.forEach.call(f,function(a){d=!1;c=a.textContent.toLowerCase().replace(/\s\s+/g," ");if(d=g.some(function(a){return-1<c.indexOf(a)}))b=e(a),b.parentNode.removeChild(b)})})();