All pastes #347831 Raw Edit

Stuff

public javascript v1 · immutable
·published 2007-02-09 19:05 UTC
rendered paste body
(function() {  var words = new Array();var bgColors = new Array();var fgColors = new Array();/* Add your own "words" to this "list", in the same format.  The next word would be  * words[2] = "some word or phrase"  * add more colors, too * if there is no color corresponding to the word (no bgColors[4] for words[4]) the first (bgColors[0]) will be used * The words are should be written in all caps, but the word matching is not case sensitive */ var ally = "[CCE]|[NOD]";var allyColor = "skyblue";var enemy = "[PHI]|[{rnb}]";var enemyColor = "red";var nap = "[KWH]|[WTF]";var napColor = "orange";theAllies = ally.split("|");for (z = 0; z <= theAllies.length; z++){if (theAllies[z] == undefined) continue;words[words.length] = theAllies[z].toUpperCase();bgColors[bgColors.length] = allyColor;}theNAPs = nap.split("|");for (z = 0; z <= theNAPs.length; z++){if (theNAPs[z] == undefined) continue;words[words.length] = theNAPs[z].toUpperCase();bgColors[bgColors.length] = napColor;}theEnemys = enemy.split("|");for (z = 0; z <= theEnemys.length; z++){if (theEnemys[z] == undefined) continue;words[words.length] = theEnemys[z].toUpperCase();bgColors[bgColors.length] = enemyColor;}words[words.length] = "[CCE]"; bgColors[bgColors.length] = "";fgColors[fgColors.length] = "yellowgreen";words[words.length] = "---";bgColors[bgColors.length] = "lightGreen";fgColors[fgColors.length] = "Black";// Leaderswords[words.length] = "BEREFT OF";bgColors[bgColors.length] = "lightblue";fgColors[fgColors.length] = "Black";words[words.length] = "DRACON7";bgColors[bgColors.length]= "lightblue";fgColors[fgColors.length] = "Black";words[words.length] = "MUNCH OF";bgColors[bgColors.length] = "lightblue";fgColors[fgColors.length] = "Black";// Rebel Guardwords[words.length] = "MURF OF CATHAL";bgColors[bgColors.length] = "White";fgColors[fgColors.length] = "Black";words[words.length] = "SCORPATTARIUS OF";bgColors[bgColors.length] = "White";fgColors[fgColors.length] = "Black";words[words.length] = "GEARJAMMER OF";bgColors[bgColors.length] = "White";fgColors[fgColors.length] = "Black";words[words.length] = "PIPES6969";bgColors[bgColors.length] = "White";fgColors[fgColors.length] = "Black";words[words.length] = "THE1STVOICE";bgColors[bgColors.length] = "White";fgColors[fgColors.length] = "Black"; for(var i = 0; i < words.length; i++) {   var xpath = "//a[contains(translate(.,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),'"+words[i]+"')]";  var results = document.evaluate(xpath, document, null, XPathResult.UNORDERED_SNAPSHOT_TYPE, null);  var items = new Array();  var thisItem = results.iterateNext();  while(thisItem) { items.push(thisItem); thisItem = results.iterateNext(); }  for(var ii = 0; ii < items.length; ii++) {     items[ii].style.backgroundColor = bgColors[i]?bgColors[i]:bgColors[0];   items[ii].style.color = fgColors[i]?fgColors[i]:fgColors[0];  }   }})()