 |
glbscripts.myfreeforum.org Forum dedicated to Greasemonkey Scripts made for Goal Line Blitz online game.
|
| View previous topic :: View next topic |
| Author |
Message |
mw54finest Site Admin

Joined: 22 Jun 2008 Posts: 160
|
Posted: Wed Jun 25, 2008 9:31 am Post subject: Add Cash To HomePage Part II |
|
|
by sirnotappearinginthisfilm
Adds player's cash to the home page dynamically.
This is a modification of http://userscripts.org/scripts/show/27967 which hard coded the player info, my script iterates through each player found on the home page and adds the cash for each player found to the respective player's section.
Tested on a page with 3 players, would be nice to have someone with a large amount of players test it out to see if it works correctly.
I also noticed that the background color for each player doesn't expand with the addition of this extra row of player data. GLB uses a background image for this and it seems that once it's size is initially defined by the page it cannot be changed (I tried!).
edit: I've made some changes to the code to allow some customization. At the top of the code you will see the following:
| Code: |
var displayLocation = { BelowEnergy:false, RightOfEnergy:false, BelowXP:true}; |
setting one of these to true will change the location of where the cash amount will display. Try setting one of them to true (with the others being false) to see the differences. While it is possible to set them all to true it would be better to have one to true and the others to false.
I personally like the dollar amount below the XP and have set that to be the default.
edit#2: some people use this in conjunction with other greasemonkey scripts, to allow those to work as well someone suggested adding a timeout to the script. The length of the timeout is set in a variable at the top of the script. By default the timeout is set to 0. If you need to have a timeout change the number on this line:
to the desired timeout. This number is the number of milliseconds. So to have the page wait 1 second it would be:
| Code: |
var timeout = 1000; |
http://userscripts.org/scripts/show/29108
_________________ Eat, Sleep, Live GLB!
Last edited by mw54finest on Wed Jun 25, 2008 1:08 pm; edited 2 times in total |
|
| Back to top |
|
 |
mw54finest Site Admin

Joined: 22 Jun 2008 Posts: 160
|
Posted: Wed Jun 25, 2008 10:00 am Post subject: |
|
|
BelowEnergy:true, RightOfEnergy:false, BelowXP:false
BelowEnergy:false, RightOfEnergy:false, BelowXP:true
BelowEnergy:false, RightOfEnergy:true, BelowXP:false _________________ Eat, Sleep, Live GLB!
Last edited by mw54finest on Wed Jun 25, 2008 11:02 am; edited 2 times in total |
|
| Back to top |
|
 |
dlawilliams
Joined: 27 Jun 2008 Posts: 2
|
Posted: Fri Jun 27, 2008 1:51 pm Post subject: |
|
|
| It works as long as I don't sort the players with the sort feature |
|
| Back to top |
|
 |
SNAITF Developer

Joined: 25 Jun 2008 Posts: 65
|
Posted: Fri Jun 27, 2008 2:19 pm Post subject: |
|
|
| dlawilliams wrote: | | It works as long as I don't sort the players with the sort feature |
That's what the timeout is for, by default it's set to 0. Try setting it to 1000 (1 second delay) and refresh the page, if that doesn't work, go to 2000, etc.
If you own a good number of players the sort takes time, modify the timeout to compensate for that.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|