NetBuilders

You are welcome to look around. You will have to register before you can post a message, create a blog, chat live with our members, or add a site to our directory.



Advertise With Us
Reply Learn SEO from Aaron Wall
Old 17 January, 2009, 02:45 AM   #1 (permalink)
Newbie Net Builder
 
Thanked 17 Times in 17 Posts
Posts: 48
$NetBucks: 0
Join Date: Dec 2008
Last Online: 27 February, 2009 21:22 PM
Default 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.
  Reply With Quote
Thanked by:
Will.Spencer (17 January, 2009)
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
{Need}Free Proxy list Script adda4u Web Proxies 2 10 September, 2009 12:28 PM
proxy list script reviews ALiveGeek Web Proxies 0 10 September, 2009 01:26 AM
Proxy List Script (which one do you use) Jorge05r Web Proxies 12 4 August, 2009 15:21 PM
Bug in Proxy List Script 1.2 Zash Web Proxies 3 25 April, 2009 14:09 PM
What script this proxy list is using ? Szise Web Proxies 2 18 February, 2009 11:34 AM


All times are GMT. The time now is 17:05 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.1
vBAdvertise v1.0.0 Copyright ©2009, PixelFX Studios
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios