Augie
|
Energy display on the depth chart.This will put the energy level on the depth chart page. It saves all roster data locally so there is no worries about bandwidth. The update Energy button will query the server if you need to update your players energy levels. This is only needed to be used if you need to update the energy levels, so constantly clicking it wont do anything but waste your time clicking.
Clicking on each position will show the players and energy levels. unfortunately any changes to the depth chart will remove the energy levels. I could not get this code to work properly.
http://userscripts.org/scripts/show/32788
|
rcillig
|
I cant get it to work, or maybe it is and Im not seeing anything.
|
Augie
|
It will only work if you have GM access to chance the depth chart
|
rcillig
|
I own and team so I got that.
|
Augie
|
hmm. are you getting anything displayed on the depth chart screen when it first loads?
|
pats4892
|
| rcillig wrote: | | I own and team so I got that. |
i've got the same problem
|
Augie
|
my fault, I uploaded the wrong file. somehow when i was editing it i saved the final version to the wrong file.
The correct version is uploaded now.
|
DeviantWolf
|
Still won't work for me. I own a team and GM a team. Neither works. This is what I get
I see stamina listed and then it all says undefined under it.
What am I doing wrong? Huh?
|
rcillig
|
I also get stamina undefined.
|
Augie
|
you need to hit the update energy button. under the title for "Available roster" if you dont everything will be undefined.
this lets you update the energy after downtime or your last game. it is not automatic.
|
DeviantWolf
|
| Augie wrote: | you need to hit the update energy button. under the title for "Available roster" if you dont everything will be undefined.
this lets you update the energy after downtime or your last game. it is not automatic. |
Awesome, I completely missed that.
Thanks
|
rcillig
|
ok nice, it works now awesome thanks very good work you done.
|
Augie
|
I still have one part that wont work, once you move a player the energy column goes away.
trust me having it disapear and having to reload the page to get the energy levels is much better than the problems that happen if i refresh the eventlistener after a player is moved.
|
DeviantWolf
|
| Augie wrote: | I still have one part that wont work, once you move a player the energy column goes away.
trust me having it disapear and having to reload the page to get the energy levels is much better than the problems that happen if i refresh the eventlistener after a player is moved. |
LOL what happened when you did that?
Man it's been a few years since I programmed java/java script. I might have to start dabbling in it some since there's so many cool things I want.
Any chance of instead of having just numbers we could get the graphic bar like you do on the roster page? It looks like there would be enough room to fit it in the depth chart screen.
|
Augie
|
if you look at the source youll see the last function that goes crazy. basicly after someone changes the depth chart I have to rebuild the event listeners on the up/down/remove links. and by doing this lets say you move 5 people around then go to another position. you will get (however many times you changed a position) * 2 energy fields displayed. and it keeps multiplying every click.
|
JOSH2OTTER
|
perfectexactly what I was looking for. Thanks a lot!
|
ken-in-rockwall
|
I get the undefined under Stam and there's not an update energy button under Available roster. Probably a conflict with another script.. will let you know if I find out which one.
|
Augie
|
Hmm. Definatly want to know what script is causing a conflict if the update energy button isn't displayed.
|
ken-in-rockwall
|
ok, I went to a totally different computer. Installed Firefox, installed Greasemonkey, installed this script only..
Went to a team that I have FULL rights to, roster, depth chart, etc.. Still same error of Undefined under the STAM and NO update energy button.
Not sure how everyone else got it to work???
Went to Error Console:
states Roster[n] is Undefined
in the link it went to this (var Module = new Object(); )
|
Augie
|
hmmm.... this is perplexing.
|
Augie
|
What version of firefox you running? Is Java up to date?
Also if you can install firebug - https://addons.mozilla.org/en-US/firefox/addon/1843
right click on the tile "Available Roster" and select "inspect Element"
it should say this:
| Code: |
<div class="medium_head">Available Roster</div>
<input id="get_energy" type="button" value="Update Energy"/>
|
the <input id="get_energy....... line is what inserts the button.
|
rcillig
|
I was wondering what version of Firefox do you have? I have 3.0 or the newest version and it works fine.
|
Augie
|
Yeah I built it using Firefox 3.0. I'm still extremely new to writing scripts and java related stuff so I don't know too much about any possible code problems.
Ill install ubuntu on my laptop tonight and run firefox 2.0 and see if the script works. I have 2 hours between classes tomorrow so I might as well do something with my time.
|
ken-in-rockwall
|
Ok, I have Firefox 3.0.1, installed Firebug. Installed Java for Mozilla.
Still the same issue.. I don't have the 2nd line (input) .
I found this, http://www.javatester.org, and ran it. It says I have Java Version 1.6.0_07 from Sun Microsystems Inc installed. i have checked under Tools, Content, Javascript, Advance tab, and all are checked.
Any other suggestions??? please.
|
rcillig
|
OK I found something out, on the team I own it works great but on teams I GM there is no energy button. I have full GM rights for the teams too.
|
Augie
|
hmm... ok, i need to get full gm on a team to see whats different.
but a quick workaround is change this code at line 20-28
| Code: | var GM_check = document.getElementById("roster")
if(GM_check != null){
window.onload = add_energy()
energy_button()
add_stam()
} |
to
| Code: |
//var GM_check = document.getElementById("roster")
//if(GM_check != null){
window.onload = add_energy()
energy_button()
add_stam()
// }
|
|
ken-in-rockwall
|
Still can't get this to work right.. I maybe because I don't know where/how to change the code as noted above...
|
RandomBeast
|
I'm having the same issue as Ken
|
Augie
|
Im working on getting GM status with depth chart access to see if it is some issue with owners and gm's.
If you are an owner it should work. GM's seem to be a problem. Ill see if I can fix it this weekend
|
ken-in-rockwall
|
looking for an update on this when you get a chance.. Thanks.
|
Augie
|
there will be no update to get it to work with GM's. for some reason the page behaves differently when a GM is looking at it. I dont know if its the timing of the script running, or something entirely different.
The source page is the same for owners and GM's on the depth chart. But there is a problem when it tries to insert the refresh button.
And anyways energy is not needed anymore. It gets refreshed to 100 after each game. So this script is officially dead as of the last update to GLB.
|
rcillig
|
hey bud thanks, i used it alot when I could.
|
Augie
|
was my first script, took forever to get certain parts working.... my poor first program done in java.
Though I am seriously excited about the stuff I learned Java can do. its like happy fun time meets web design.
|
pabst
|
| Augie wrote: | was my first script, took forever to get certain parts working.... my poor first program done in java.
Though I am seriously excited about the stuff I learned Java can do. its like happy fun time meets web design. |
JavaScript != Java
|
Augie
|
And im too lazy to type javascript. so I type java. as in i need more coffee to do this damned programming.
|
|
|