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:
There's a little bit more of a description here.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']]; } //})();


LinkBack URL
About LinkBacks


Reply With Quote
Bookmarks