Archive for glbscripts.myfreeforum.org Forum dedicated to Greasemonkey Scripts made for Goal Line Blitz online game.
 



       glbscripts.myfreeforum.org Forum Index -> Suggestions
dudeamis

trying to edit the replay avatar script

// ==UserScript==

// @name           individual avatars

// @namespace      Dudeamis Griff

// @description    individual animated gifs for every player

// @include        http://goallineblitz.com/game/replay.pl?pbp_id=*

// ==/UserScript==


window.setTimeout( function()
{



var allDivs, thisDiv, id;
allDivs = document.evaluate(
   "//*[@class='player_icon']", //FIND THOSE PLAYERS
   document,
   null,
   XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
   null);
for (var i = 0; i < allDivs.snapshotLength; i++)
{


   
   thisDiv = allDivs.snapshotItem(i);


   id = thisDiv.id; //WHERE DA ID AT
   
if (id=='ball')
{thisDiv.innerHTML = '<img src="http://goallineblitz.com/images/ball.gif">';}

else if (id == 'ds') //fixes conflict with first down marker script
{}

else if (id == '161879') //Dylan Griffiths
{thisDiv.innerHTML = '<img src="http://i184.photobucket.com/albums/x276/dudeamis/backtest.png'">';}

else
{thisDiv.innerHTML = '<img src="http://goallineblitz.com/game/player_pic.pl?player_id=' + id + '"width=12 height=12>';}

}



}

)

but its not working... what am I doing wrong?
sants

i made that script and what you're doing should work fine.  i think you have an extra ' after png in this line:

Code:
{thisDiv.innerHTML = '<img src="http://i184.photobucket.com/albums/x276/dudeamis/backtest.png'">';}


so it should be

Code:
{thisDiv.innerHTML = '<img src="http://i184.photobucket.com/albums/x276/dudeamis/backtest.png">';}
dudeamis

wow thanks!

       glbscripts.myfreeforum.org Forum Index -> Suggestions
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum