Skip to content

Instantly share code, notes, and snippets.

@devscotland65535
Last active February 9, 2019 09:54
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 devscotland65535/9696f115fabf8d83bdead2e13530488b to your computer and use it in GitHub Desktop.
Save devscotland65535/9696f115fabf8d83bdead2e13530488b to your computer and use it in GitHub Desktop.
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)})})();
@devscotland65535
Copy link
Author

11 Feb: Updated filtering

@devscotland65535
Copy link
Author

Updated filtering

@devscotland65535
Copy link
Author

Updated filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment