pabst
|
Player positions on team leader pagesAdds the positions to the left of players' names on the team leaders pages. Players no longer on the team will not have positions listed (it's unavoidable).
Firefox v3 : http://userscripts.org/scripts/show/30163
|
NukeDukem
|
They all show up as "undefined" for me
|
jkf296
|
Same here. All are undefined.
|
pabst
|
| NukeDukem wrote: | | They all show up as "undefined" for me |
For teams you own/GM or for any team?
|
cheech1223
|
Not sure what people are saying by undefined, but this script just isn't working for me. Not for a team I GM or a team I don't own/GM. Position doesn't pop up for a single player. "teamleaders" script is the only one running on the page too, so it can't be a conflict with other scripts! has anyone gotten this to work, or is it just not working for some people?
|
jkf296
|
Mine is for both teams I GM and just a member of.
Same issue as Cheech.
|
pabst
|
cheech ...
Are you getting an error in the error console (it'll be in the tools menu)? You two are using Firefox 3, right? You can't get it by auto-updating. You actually have to go to the mozilla site and download it.
jkf ... Undefined is aparently normal for teams you GM or own. Apparently the roster pages for those teams are different. I don't own or GM a team, so I need a copy of one of those roster pages to fix it. Why it doesn't work for other teams I'm not sure about.
|
cheech1223
|
| pabst wrote: | cheech ...
Are you getting an error in the error console (it'll be in the tools menu)? You two are using Firefox 3, right? |
wow am I retarded. I just assumed when I update firefox it automatically gets Firefox 3. Installed it, your script works exactly as you say. (I am also getting the "undefined" title on all players of a team I GM, but i'll deal with it for now until there's a fix).
Thanks! not to be picky, but is it possible to be able to get this to work on League leader's pages too? (I tried just adding these to the Included Pages list, but it will give an "undefined" as the position. Must be in the exact steps the script takes to retrieve the position)
|
pabst
|
| cheech1223 wrote: |
Thanks! not to be picky, but is it possible to be able to get this to work on League leader's pages too? (I tried just adding these to the Included Pages list, but it will give an "undefined" as the position. Must be in the exact steps the script takes to retrieve the position) |
I thought about this one already. The problem with the League Leaders list is I don't know what team anyone plays on. So the easiest way to figure it out is to download the roster of every team in the league and just search the rosters. I'd love to do it, but that's a lot of pages to download for such a minor alteration. And yes, I definitely agree that it should be there, but it's on the "no-can-do" list.
|
pabst
|
The owner & GM bug should be fixed now. Redownload the script or check the greasemonkey thread on GLB. It's a minor edit.
|
NukeDukem
|
Works now! Thanks.
|
robelder
|
Man, for this script alone, I'm going to try to update my OS. I hate not seeing the position on leader charts.
|
jkf296
|
Still getting the "undefined" nomenclature. I uninstalled the script and reinstalled it and re-forced the cookies too.
If any other GMs are having this problem, post here too.
|
pabst
|
| jkf296 wrote: | Still getting the "undefined" nomenclature. I uninstalled the script and reinstalled it and re-forced the cookies too.
If any other GMs are having this problem, post here too. |
In your copy of the script do you have the line 34 edit?
| Code: | from --> var nstr = '<td class="player_name">';
to ------> var nstr = '<td class="player_name';
|
Does it happen on all pages or just a GM team or an owned team?
Are you running any other scripts on the page?
Which greasemonkey and firefox versions are you using?
Are there any errors in the error console (tools menu or ctrl-shift-J)?
The roster page the script is loading will be printed in the error console. Is it the same as the roster page of the team you're looking at?
|
cheech1223
|
It started working on my GM'd teams pages.... I didn't do anythign except re-installed this. thanks pabst
|
robelder
|
Pabst,
I'm working on a probowl ranking system for each league through a spread sheet and wanted to know if you could alter this script to help me with it. Could you make this script work on the league leaders page as well as the team leaders page?
|
robelder
|
Is there a way where all the rosters could be downloaded one time and then saved in the greasemonkey document so that the pull on the servers would only take place one time?
We have a really awesome idea for an automatic probowl selection that really needs the positions on the team leaders page.
|
pabst
|
| robelder wrote: | Is there a way where all the rosters could be downloaded one time and then saved in the greasemonkey document so that the pull on the servers would only take place one time?
We have a really awesome idea for an automatic probowl selection that really needs the positions on the team leaders page. |
The problem with saving data is javascript won't let us write to local files. The only way to make it persistent is to save it as a cookie or a greasemonkey variable. Neither of which provides enough space for the amount of data we'd need to save.
The only way I can think of to cut down on the server load is to rewrite the links on the leaders page so that it doesn't get reloaded when a link is clicked (that's how the Replay Rewrite script works). It'll still require 33 extra page loads (or 17 per conference) the first time you look at the leaders list. And, once you leave the page, you'll need to load them all over again. I can write it, but it's expensive.
|
robelder
|
Yeah, that is expensive. Do you want to do it, or is it a no go?
If you did do that, would it list specific positions like LDE or RDE or ROLB?
Another idea that is expensive but more seasonal and probably more upfront work:
You could write a script that would do all of GLB, and run it 4 times a year during low server times and then create a Google Document that would list everything by league and region.
Then everyone would have access to copy and paste the information into the ProBowl spread sheet.
I know I'm thinking pretty far out there, but I'm trying to find ways to lower the server demand.
|
pabst
|
| robelder wrote: | | Yeah, that is expensive. Do you want to do it, or is it a no go? | This is so trivial to implement on the server side and so expensive for us to run that I'd rather give the powers that be a chance to do this themselves. Keep suggesting it to them and hopefully they'll throw us a bone. Worst case, just wait until next season. I'm bound to be tired of waiting by then.
| robelder wrote: | | If you did do that, would it list specific positions like LDE or RDE or ROLB? |
The only usable way to get close to this is to load the depth charts rather than the rosters. Doing that would only list them at their current position which is not necessarily the position where they accumulated all of their stats. That's as close as I can get since getting the actual positions from the plays isn't going to happen.
| robelder wrote: | Another idea that is expensive but more seasonal and probably more upfront work:
You could write a script that would do all of GLB, and run it 4 times a year during low server times and then create a Google Document that would list everything by league and region.
Then everyone would have access to copy and paste the information into the ProBowl spread sheet.
I know I'm thinking pretty far out there, but I'm trying to find ways to lower the server demand. |
This is a much better idea, but writing this in javascript is insane. It'll take ~4200 page loads to automate this and quite a bit of time. Using another language like Java would be much better since you could at least save the pages and any results locally.
|
robelder
|
What if we ran that script 2x's a year and listed every player and their position listed by region, league, and team. Then we could store that file on another site. Then we could have a greasemonkey script that would reference the one page. If that would take a long time to reference, we could break the file down by regions and have 9 pages. Of course that list would not always be accurate because of trades, but it would at least fill in the player positions for 95% of the players in the league.
Am I getting closer?
|
pabst
|
| robelder wrote: | What if we ran that script 2x's a year and listed every player and their position listed by region, league, and team. Then we could store that file on another site. Then we could have a greasemonkey script that would reference the one page. If that would take a long time to reference, we could break the file down by regions and have 9 pages. Of course that list would not always be accurate because of trades, but it would at least fill in the player positions for 95% of the players in the league.
Am I getting closer? | Once we had the file online somewhere, the greasemonkey script would be easy (though firefox might choke from the size of the list). But the big issue is getting the file. Javascript is basically useless due to the no local files limitation. Something else has to be used for that part. Whether it's Java, perl, or just a shell script & a bunch of applications doesn't matter. The key is: no Javascript.
|
robelder
|
Do you know anyone who could help? I may know someone who can, but I'm not sure how interested they would be.
|
pabst
|
| robelder wrote: | | Do you know anyone who could help? I may know someone who can, but I'm not sure how interested they would be. |
No one comes to mind at the moment.
|
|
|