To see less ads Register or Login ----- Daily Fantasy Sports games 18+

Greasemonkey script to display team data on FPL league page

A Fantasy Football forum for news on fantasy football games run by the Premierleague (FPL).
Post Reply
User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Greasemonkey script to display team data on FPL league page

Post by kidzio »

nickchild wrote:That's correct... 4 chips, 1 per gw. You can check the details by browsing to that teams gameweek history just to make sure...

Sorry but I mean it should not be showing pink? The colour is for upcoming gameweek which would indicate that he has 5 chips? Since he has already used up 4 chips, it should not be highlighted as pink?

User avatar
nickchild
FISOhead
Posts: 648
Joined: 27 Jul 2006, 23:51
FS Record: 180th Overall FPL and X-League Winner 2008/09
Contact:

Re: Greasemonkey script to display team data on FPL league page

Post by nickchild »

The pink reflects the fact that he used a chip in the current gameweek, as do all the other stats (captain, gameweek points, players games status' etc) It's not possible to see if a user has activated a chip for the NEXT gameweek. This information comes available once a new gameweek begins.

The pink highlight is essentially there to say "this teams current gameweek score came courtesy of a chip"

So in this case, they have played 4 chips in 4 weeks.

User avatar
JimminyCricket
Cheetah
Posts: 8
Joined: 10 Aug 2010, 12:59

Re: Greasemonkey script to display team data on FPL league page

Post by JimminyCricket »

Thanks for the scripts - really useful to see all that info in one place.

sunbather
FISOhead
Posts: 660
Joined: 16 Jan 2014, 16:28
FS Record: Top 60k FPL finish seven years in a row, best result Top 2k

Re: Greasemonkey script to display team data on FPL league page

Post by sunbather »

Wow thanks a lot for this. Happy to buy you a pint some time if we ever cross paths.

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Greasemonkey script to display team data on FPL league page

Post by kidzio »

nickchild wrote:The pink reflects the fact that he used a chip in the current gameweek, as do all the other stats (captain, gameweek points, players games status' etc) It's not possible to see if a user has activated a chip for the NEXT gameweek. This information comes available once a new gameweek begins.

The pink highlight is essentially there to say "this teams current gameweek score came courtesy of a chip"

So in this case, they have played 4 chips in 4 weeks.

Ok, Thanks a lot! And once again, the script is amazing!

Mister Talons
Red & Blue Braces
Posts: 310
Joined: 03 Nov 2009, 12:45

Re: Greasemonkey script to display team data on FPL league page

Post by Mister Talons »

nickchild wrote:
Mister Talons wrote:Love this.

Suggestions for tweaks? A sort facility for the Data View columns would be nice.
Good shout. I'll add it to the other script that adds PPG, PP90, PPH and PPA
Hi nickchild. I reloaded the Data View script but it's not sorting, so I'm guessing it's not done yet?

Plus - another tweak suggestion: an increased font size for the individual squad listings in league tables (left side chevron movement indicator click) would be nice too.

Hope that makes sense. I very much appreciate all your work. Cheers. :D

Mister Talons
Red & Blue Braces
Posts: 310
Joined: 03 Nov 2009, 12:45

Re: Greasemonkey script to display team data on FPL league page

Post by Mister Talons »

Hi nickchild - me again.

A glitch appeared tonight after FPL added bonus points @1945 approx: Live Total Points is not updating and has reverted to the pre-GW total. (Up until then it was working). I tried redownloading the script and reloading my Mini-League, but no joy.

EDIT Checked again at 2229 and it's working again.

User avatar
timao1
Treebeard
Posts: 119
Joined: 20 Aug 2015, 21:51

Re: Greasemonkey script to display team data on FPL league page

Post by timao1 »

Mister Talons wrote:Hi nickchild - me again.

A glitch appeared tonight after FPL added bonus points @1945 approx: Live Total Points is not updating and has reverted to the pre-GW total. (Up until then it was working). I tried redownloading the script and reloading my Mini-League, but no joy.

EDIT Checked again at 2229 and it's working again.
It usually happens whilst league tables are currently being re-calculated.

User avatar
MoSe
Dumbledore
Posts: 9550
Joined: 10 Sep 2014, 12:25
Location: next door S.Siro stadium
FS Record: FISODAS CUP Winner Season 25
FISO H2H Winner: 15/16 Div2 - 16/17 Div1
FISO Mirror: 16/17 PL Winner

Re: Greasemonkey script to display team data on FPL league page

Post by MoSe »

sorry if it had been covered, I only read back up this page

I hadn't been Reloading the stats for a while, I kept showing the few I liked
now I wanted to change, and I noticed the useful "Quick picks: Team Info | Live Data" added after the "All: On | Off"

too bad now no other Toggle is "active" anymore, except those two above
I cannot switch on|off the stats individually

was that intentional?
or a "sidebug"? ;)
or is it just in my browser?

thanks nick!

User avatar
nickchild
FISOhead
Posts: 648
Joined: 27 Jul 2006, 23:51
FS Record: 180th Overall FPL and X-League Winner 2008/09
Contact:

Re: Greasemonkey script to display team data on FPL league page

Post by nickchild »

You should certainly still be able to toggle the options individually. Works OK for me. What browser are you in? Anyone else with the same issue?

User avatar
MoSe
Dumbledore
Posts: 9550
Joined: 10 Sep 2014, 12:25
Location: next door S.Siro stadium
FS Record: FISODAS CUP Winner Season 25
FISO H2H Winner: 15/16 Div2 - 16/17 Div1
FISO Mirror: 16/17 PL Winner

Re: Greasemonkey script to display team data on FPL league page

Post by MoSe »

I use Chrome with Tampermonkey, and always worked sweet, till the Quick Picks got added
(still works perfectly for all the rest, except I can't toggle options individually)

GJAJ2K
Newbie
Posts: 2
Joined: 23 Oct 2015, 10:44

Re: Greasemonkey script to display team data on FPL league page

Post by GJAJ2K »

Hi Nick,

First of all, thanks for the amazing script! Really useful to have all that information in one place.

I have been using the script with Chrome and Tampermonkey and in the past week a number of the columns (TPH, WC and Chips) have stopped populating and the sorting of columns has stopped working as well. Have you or anyone else seen this behaviour? Screenshot below!

If anyone knows how to get this working again please let me know. Have tried re-downloading the script but did not help.

Cheers,
G
fplscript.png
You do not have the required permissions to view the files attached to this post.

User avatar
MoSe
Dumbledore
Posts: 9550
Joined: 10 Sep 2014, 12:25
Location: next door S.Siro stadium
FS Record: FISODAS CUP Winner Season 25
FISO H2H Winner: 15/16 Div2 - 16/17 Div1
FISO Mirror: 16/17 PL Winner

Re: Greasemonkey script to display team data on FPL league page

Post by MoSe »

I'm glad to report, dunno whether there has been any script or TM itself updates in the meanwhile,
I checked again now and it's all back to normal, I can toggle option individually again
:D

User avatar
jeffmcgow
Dumbledore
Posts: 7624
Joined: 13 Oct 2005, 18:44
FS Record: FPL - FISO Mirror League 1st 2015-16 | Sun - Cheap as Chips Conference 1st 2014-15 & 2015-16

Re: Greasemonkey script to display team data on FPL league page

Post by jeffmcgow »

I've been running this successfully on firefox and chrome for a good while. (Windows 7)

I just wanted to report that it also works with the Iceweasel browser on a Raspberry Pi with Raspian Jesse operating system.

User avatar
GobiLux
FISOhead
Posts: 516
Joined: 29 Jul 2013, 10:14
Location: your sister's closet

Re: Greasemonkey script to display team data on FPL league page

Post by GobiLux »

Has worked perfectly on Opera until 2 weeks ago

fusen
Cheetah
Posts: 3
Joined: 31 Dec 2015, 19:15

Re: Greasemonkey script to display team data on FPL league page

Post by fusen »

Line 850

Change this

Code: Select all

		if(config_values["captain"] == 1) {
			arr1 = retval.split('"is_captain": true');
			arr2 = arr1[1].split('<span class="ismElementText ismPitchStat">');
			arr3 = arr2[0].split('JS_ISM_NAME">');
			arr4 = arr3[1].split(' </span>');
			capval = arr4[0].trim();
			arr1 = retval.split('"is_vice_captain": true');
			arr2 = arr1[1].split('<span class="ismElementText ismPitchStat">');
			arr3 = arr2[0].split('JS_ISM_NAME">');
			arr4 = arr3[1].split(' </span>');
			vicecapval = arr4[0].trim();
		}
to

Code: Select all

		if(config_values["captain"] == 1) {
			arr1 = retval.split('"is_captain": true');
			arr2 = arr1[1].split('<span class="ismElementText ismPitchStat">');
			arr3 = arr2[0].split('JS_ISM_NAME">');
			arr4 = arr3[1].split(' </span>');
			capval = arr4[0].trim();
			arr1 = retval.split('"is_vice_captain": true');
			arr2 = arr1[1].split('<span class="ismElementText ismPitchStat">');
			arr3 = arr2[0].split('JS_ISM_NAME">');
			arr4 = arr3[1].split(' </span>');
			vicecapval = arr4[0].trim();
			var myregexp = /"event_points": (\d*), "id": \d*, "sub": \d, "m": \d, "copnr": [\dnull]*, "is_captain": true,/;
			var match = myregexp.exec(retval);
			if (match != null) {
						result = match[1];
			} else {
						result = "";
			}
			capval = capval + " ("+result+")";
		}

if you want the captain's points tally shown in the league list.

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Greasemonkey script to display team data on FPL league page

Post by kidzio »

Hi Nickchild, I was just wondering if your script will be changed to reflect the 2nd wildcard availability? Thanks once again for the great script! Lastly, a happy new year to you!

adhithya
Cheetah
Posts: 4
Joined: 03 Jan 2016, 11:02
FS Record: Top 10K finishes twice- FPL

Re: Greasemonkey script to display team data on FPL league page

Post by adhithya »

Just stumbled upon this wonderful script and its amazing. Thanks a ton :) I have the need and not sure if the feature already exists and am not using it correctly or if possible can it be added?

Once GW20 is over, I want to look at a classic league of 8 members and see their GW20 scores factoring in hits. (Classic league displays scores without hits)

If that is not possible, can the script be tweaked to display the transfers a member made in the last completed GW. (GW 20 in this case) (Currently the script shows transfers the manager has made for the upcoming GW)

I run a tournament with 160 participants and instead of clicking on 160 separate links, checking 20 leagues is easier.

(The leagues can not be h2h, as the participants are added and removed periodically)

Is either of these feasible?

fusen
Cheetah
Posts: 3
Joined: 31 Dec 2015, 19:15

Re: Greasemonkey script to display team data on FPL league page

Post by fusen »

adhithya wrote:Just stumbled upon this wonderful script and its amazing. Thanks a ton :) I have the need and not sure if the feature already exists and am not using it correctly or if possible can it be added?

Once GW20 is over, I want to look at a classic league of 8 members and see their GW20 scores factoring in hits. (Classic league displays scores without hits)

If that is not possible, can the script be tweaked to display the transfers a member made in the last completed GW. (GW 20 in this case) (Currently the script shows transfers the manager has made for the upcoming GW)

I run a tournament with 160 participants and instead of clicking on 160 separate links, checking 20 leagues is easier.

(The leagues can not be h2h, as the participants are added and removed periodically)

Is either of these feasible?
wouldn't the live score column show the correct points taking into account the hits?

User avatar
MoSe
Dumbledore
Posts: 9550
Joined: 10 Sep 2014, 12:25
Location: next door S.Siro stadium
FS Record: FISODAS CUP Winner Season 25
FISO H2H Winner: 15/16 Div2 - 16/17 Div1
FISO Mirror: 16/17 PL Winner

Re: Greasemonkey script to display team data on FPL league page

Post by MoSe »

no, as FPL does, the Gameweek Scores (the one shown in your Gameweek History page under GP) never get hits deducted
Hits are only taken into account when calculating the Overall Points

OP = previous OP + GP - TC

different matter in H2H league, where you don't get displayed your Gameweek Points (H2H Pts are 3-1-0 for W-D-L)
but the Match Scores instead, which do include your TC

adhithya
Cheetah
Posts: 4
Joined: 03 Jan 2016, 11:02
FS Record: Top 10K finishes twice- FPL

Re: Greasemonkey script to display team data on FPL league page

Post by adhithya »

So there is no way to display GW scores in a classic league with hits? This script or any other?

Alternatively is it possible to show last completed GW transfers? Currently the script shows transfers of upcoming GW.

If it were to show completed GW transfers Ill physically check the scores of teams who have made more than 1 transfer for any hits they have taken.

User avatar
MoSe
Dumbledore
Posts: 9550
Joined: 10 Sep 2014, 12:25
Location: next door S.Siro stadium
FS Record: FISODAS CUP Winner Season 25
FISO H2H Winner: 15/16 Div2 - 16/17 Div1
FISO Mirror: 16/17 PL Winner

Re: Greasemonkey script to display team data on FPL league page

Post by MoSe »

what I meant in reply to fusen is that GW scores are not "meant" to include hits

of course nickchild could alter the script, or any dev capable to program in Java could modify it on his own PC (I'm not :mrgreen:), to reflect such need
  • although I presume that he could "add" a feature on request if not too complicated,
    but he wouldn't alter a stat straying from how FPL intended it, unless very widely requested
adhithya wrote:Alternatively is it possible to show last completed GW transfers? Currently the script shows transfers of upcoming GW
I figure it would be possible to report last GW transfers and hits too, I noticed that too but didn't bother to ask, as I managed otherwise...
you just need to convince him to put some effort into the task :wink:

I'm running a sidegame too, with 129 teams from Fiso
viewtopic.php?f=82&t=118334
due to the peculiarity of its format (it has promotions and relegations every 5 GW, so it would be a nightmare to "herd" 40 players into their new FPL leagues every month or so) I've set up an excel file with Web Queries (YES, it took a few hours before the game started)
every GW I update and import each participant GW History as a table, then I take and combine the data from there

Tacalabala, who has long experience here managing sidegames of all formats,
was succesfully using the same method long before I even joined Fiso (I came to the same solution on my own tho 8-) )
he had attached a while ago this season a zip file with his excel AND all the queries (.iqy files),
but I don't think it's still there, you could ask him

adhithya
Cheetah
Posts: 4
Joined: 03 Jan 2016, 11:02
FS Record: Top 10K finishes twice- FPL

Re: Greasemonkey script to display team data on FPL league page

Post by adhithya »

Aah great, right now Im not authorised to view or contact him :D Guess I'll manage manually for a couple of GW, hope and pray nickchild has some free time on his hand to modify the script and in the meanwhile get enough posts to be able to view members/request them in inbox :)

Thanks for the help Mose :)

pfc_ivan
Treebeard
Posts: 153
Joined: 30 Aug 2015, 19:29

Re: Greasemonkey script to display team data on FPL league page

Post by pfc_ivan »

kidzio wrote:Hi Nickchild, I was just wondering if your script will be changed to reflect the 2nd wildcard availability? Thanks once again for the great script! Lastly, a happy new year to you!
Hello all,

I was also wondering about this. As of now, it does not reflect the 2nd wildcard availability.

Great work nonetheless guys!

adhithya
Cheetah
Posts: 4
Joined: 03 Jan 2016, 11:02
FS Record: Top 10K finishes twice- FPL

Re: Greasemonkey script to display team data on FPL league page

Post by adhithya »

Update: Ive fixed my need with a webquery, so dont "need" the script to be modified.

However think it would make for a good feature if you have the time :)

ravenscroftravens
Kevin and Perry
Posts: 17
Joined: 13 Jan 2016, 13:18
FS Record: fairly average

Re: Greasemonkey script to display team data on FPL league page

Post by ravenscroftravens »

Nice one, thanks!

2rs1
Newbie
Posts: 1
Joined: 14 Feb 2016, 20:22

Re: Greasemonkey script to display team data on FPL league page

Post by 2rs1 »

I found this tonight. It is incredibly useful. Thanks a lot!
pfc_ivan wrote:
kidzio wrote:Hi Nickchild, I was just wondering if your script will be changed to reflect the 2nd wildcard availability? Thanks once again for the great script! Lastly, a happy new year to you!
Hello all,

I was also wondering about this. As of now, it does not reflect the 2nd wildcard availability.

Great work nonetheless guys!
I did a quick fix to handle the second wildcard. This will discard wilcards played before GW 20, so it should probably be solved in a better way (by looking at the current gw or something...).
Changed line 626 to read the last wildcard played:

Code: Select all

			arr4 = arr3[arr3.length - 2].split('<td>');
and line 752 to discard wildcards played in 2015;

Code: Select all

if(wcinfo == "No wildcards played" || wildcardGW < 20) {

User avatar
smatsh
Wideboy
Posts: 79
Joined: 03 Dec 2015, 02:51
FS Record: 2238652
Contact:

Re: Greasemonkey script to display team data on FPL league page

Post by smatsh »

Can you add please the player's country ?

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Greasemonkey script to display team data on FPL league page

Post by kidzio »

2rs1 wrote:I found this tonight. It is incredibly useful. Thanks a lot!
pfc_ivan wrote:
kidzio wrote:Hi Nickchild, I was just wondering if your script will be changed to reflect the 2nd wildcard availability? Thanks once again for the great script! Lastly, a happy new year to you!
Hello all,

I was also wondering about this. As of now, it does not reflect the 2nd wildcard availability.

Great work nonetheless guys!
I did a quick fix to handle the second wildcard. This will discard wilcards played before GW 20, so it should probably be solved in a better way (by looking at the current gw or something...).
Changed line 626 to read the last wildcard played:

Code: Select all

			arr4 = arr3[arr3.length - 2].split('<td>');
and line 752 to discard wildcards played in 2015;

Code: Select all

if(wcinfo == "No wildcards played" || wildcardGW < 20) {
it worked! thanks a lot 2rs1! Appreaciated :)

User avatar
jeffmcgow
Dumbledore
Posts: 7624
Joined: 13 Oct 2005, 18:44
FS Record: FPL - FISO Mirror League 1st 2015-16 | Sun - Cheap as Chips Conference 1st 2014-15 & 2015-16

Re: Greasemonkey script to display team data on FPL league page

Post by jeffmcgow »

2rs1 wrote:I found this tonight. It is incredibly useful. Thanks a lot!
pfc_ivan wrote:
kidzio wrote:Hi Nickchild, I was just wondering if your script will be changed to reflect the 2nd wildcard availability? Thanks once again for the great script! Lastly, a happy new year to you!
Hello all,

I was also wondering about this. As of now, it does not reflect the 2nd wildcard availability.

Great work nonetheless guys!
I did a quick fix to handle the second wildcard. This will discard wilcards played before GW 20, so it should probably be solved in a better way (by looking at the current gw or something...).
Changed line 626 to read the last wildcard played:

Code: Select all

			arr4 = arr3[arr3.length - 2].split('<td>');
and line 752 to discard wildcards played in 2015;

Code: Select all

if(wcinfo == "No wildcards played" || wildcardGW < 20) {
Thanks 2rs1, it works a treat. :)

And thanks as always Nick for the script.

View Latest: 1 Day View Your posts
Post Reply

Return to “Fantasy PremierLeague.com (FPL)”