Results 1 to 1 of 1

Thread: Free greasemonkey script, an alternative to vB's ignore list

  1. #1
    LogicFlux is offline Newbie Net Builder
    Join Date
    Dec 2008
    Posts
    47
    Thanks
    13
    Thanked 17 Times in 17 Posts

    Free greasemonkey script, an alternative to vB's ignore list

    Hi. I wrote a greasemonkey script that provides an alternative to putting people on your ignore list. I'm calling it "Troll Filter for vB".

    It's mostly useless except it's good for a chuckle. I just wanted to do a greasemonkey script since I hadn't before.

    Here's an example of me using it at DP's Politics and Religion forum.





    Here's the script:

    Code:
    // ==UserScript==
    // @name           Troll Filter for vB v1.0 beta
    // @namespace      http://footabulous.com/trollfilter
    // @include        http://forums.digitalpoint.com/*
    // ==/UserScript==
    
    
    
    //(function() {
    
    var defaultReplacement = 'General Tard lives here!!!';
    
    // Usernames should be all lower case.
    var badUsers = {
    
      'example_user_1': defaultReplacement, 
    
      'example_user_2': '<span style="font-size:150%; font-weight:bold; color:#ff0000;">I\'m a goob!!!</span>', 
    
    };
    
    var tableList = document.getElementsByTagName('TABLE');
    
    var postElemsToReplace = new Array;
    var aList, postID, i;
    
    for (i in tableList)
    { 
      if (/post\d+/.test(tableList[i].id))
      { 
        aList = tableList[i].getElementsByTagName('A');
    
        for (var j in aList)
        {
          if (aList[j].className == 'bigusername')
          {           
            if( aList[j].innerHTML.toLowerCase() in badUsers) 
            {             
              postID = 'td_post_'+tableList[i].id.match(/\w+?(\d+)/)[1];  
    
              postElemsToReplace.push({element:postID, user:aList[j].innerHTML.toLowerCase()});
            }
          }
        }
      }
    }
    
    for (i in postElemsToReplace)
    {
      var postMessageEl = document.getElementById(postElemsToReplace[i]['element']);
    
      postMessageEl.innerHTML = badUsers[postElemsToReplace[i]['user']];
    }
    
    //})();
    There's a little bit more of a description here.

  2. Thanked by:

    Will.Spencer (17 January, 2009)

Similar Threads

  1. Cheap or Possibly Free Proxy List Script suggestions?
    By CyberTroop in forum Proxy List Support Forum
    Replies: 6
    Last Post: 3 November, 2014, 01:17 AM
  2. i need a free proxy list script
    By photoworldblog in forum Proxy List Support Forum
    Replies: 6
    Last Post: 3 November, 2014, 01:14 AM
  3. Proxy Coder - Free Proxy List Script
    By xrvel in forum Web Proxies
    Replies: 45
    Last Post: 9 March, 2011, 22:16 PM
  4. Replies: 18
    Last Post: 1 October, 2009, 02:51 AM
  5. {Need}Free Proxy list Script
    By adda4u in forum Web Proxies
    Replies: 2
    Last Post: 10 September, 2009, 13:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •