
// afPLonk user script
// version 0.2 BETA!
// 2008-10-23
// Copyright (c) 2008, Dave Milbut
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.  To install it, you need
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "afPlonk", and click Uninstall.
//
// --------------------------------------------------------------------
// History:
// Version 0.2 fixes an array index issue.
//
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name          afPlonk
// @namespace     http://milbut.org
// @description   script to plonk specific users on every adobe forums page
// @include       http://www.adobeforums.com/*
// @include       https://www.adobeforums.com/*
// @exclude       http://diveintogreasemonkey.org/*
// @exclude       http://www.diveintogreasemonkey.org/*
// ==/UserScript==

	
	//names in the list should be surrounded in quotes
	// and comma delimited (seperated).
	// add names to the list by adding a comma then 
	// the name in quotes to the end of the list... 
	// like the below ',"Sample Name"'
	// Remove names by removing the name from the array.
	//
	
	// array of names to plonk
	var arPlonks=new Array("Sample Name", "Some Other Name"); 
	
	// get all font tags. adobeforums surrounds names with <font size="3"> 
	var allF= document.getElementsByTagName('font'); 
	var name;

	//for each name in the plonk array
	for (var j=0; j < arPlonks.length; j++) 
	{ 
		name=arPlonks[j]; //get a name

		for (var i=0; i < allF.length; i++) //loop through the font tags. 
		{
			//search for the name, if we find it, plonk it.
			if (allF[i].textContent==name) 
			{ 
				allF[i].textContent="afNamePlonk!"; //plonk the name
				allF[i+3].textContent="afMsgPlonk!"; //plonk the msg
			}
		}
	}