Advertisement
Guest User

GreaseMonkey - Remove user posts from bitcointalk.org

a guest
Mar 17th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        NoClownNoMore
  3. // @namespace   bitcointalk.org
  4. // @description Remove giorgiotheclown user entries
  5. // @include     https://bitcointalk.org/*
  6. // @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  7. // @version     1
  8. // @grant       none
  9. // ==/UserScript==
  10.  
  11. // add names of users to remove
  12. var rgtc_remove_these_users = [
  13.     'giorgiotheclown'
  14. ];
  15.  
  16. // set to true to completely remove and not add
  17. // a new row informing that user was removed
  18. var rgtc_remove = false;
  19.  
  20. // search for links containing defined name and replace/remove
  21. $('td.poster_info b a').each(function()  {
  22.     var me = $(this);
  23.     var sName = me.html();
  24.     for (var n in rgtc_remove_these_users)  {
  25.         if (sName == rgtc_remove_these_users[n])  {          
  26.             if (rgtc_remove == true)  {
  27.                 me.parents('table').parents('table').parents('tr').remove();
  28.             } else {
  29.                 var replaceWith = $('<tr><td colspan="4" style="padding:5px; background-color:#efefef; color:#333; border:1px solid #ADADAD; border-bottom-width:0;">User removed: '+sName+'</td></tr>');
  30.                 me.parents('table').parents('table').parents('tr').replaceWith(replaceWith);
  31.             }    
  32.         }
  33.     }
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement