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
djskope
Red & Blue Braces
Posts: 499
Joined: 07 Jan 2015, 11:54

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

Post by djskope »

Hi.. has anybody got this working with the new site?

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 »

nickchild the author is a resident fisoer, so I figure he's the one to update his very useful scripts
otoh they worked on the league standings page, which don't exist yet,
and added PPG-like stats on the List view of your team, and that's premature too

I trust he'll set on to update them sometimes,
but I figure he's busier now with his own Price Prediction & Other Tools site
http://www.fplstatistics.co.uk/Home/ComingSoon

User avatar
djskope
Red & Blue Braces
Posts: 499
Joined: 07 Jan 2015, 11:54

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

Post by djskope »

Many thanks MoSe and to Nickchild if he can get it working again

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 »

Pardon me but isn't fplstatistics done by nigeljdean? This is what I gathered from the thread crack the code 2014/15. I may be wrong though.

I am a big fan of the script that nickchild did last year. Great help to me. Hopefully there will be something similar this season.


Sent from my iPhone using Tapatalk

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 »

you're right, forgive me I mixed up the two usernames :oops: aging is bad ;)

well, from his profile nickchild was last active on Fiso in november, hopefully he'll peek here again for the new season

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 »

hi guys

will certainly look to update this for the new season. just made my team v1.0...

looking at the site i think it will need quite a bit of tweaking and won't be ready for GW1 i'm afraid

going to have to invest in a new pair of sunglasses if i plan on looking at the site for hours on end 8-)

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 »

Thank you so much for doing this, nickchild. Don't worry, take your time. This is something extra you are doing for the community after all.


Sent from my iPhone using Tapatalk

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 »

second thatImage
and welcome back after the long hiatus :D

for infos about the new site changes, you might like to contact Mav3rick too who for his site has already done some scripting / coding on it
viewtopic.php?f=18&t=121295
maybe you can have some synergy and spare some effort :mrgreen:

and I might lend you my Arnie's T-800 sunglasses 8-) as a 5AS Terminator

p83
Cheetah
Posts: 3
Joined: 13 Aug 2016, 14:19

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

Post by p83 »

nickchild wrote:hi guys

will certainly look to update this for the new season. just made my team v1.0...

looking at the site i think it will need quite a bit of tweaking and won't be ready for GW1 i'm afraid

going to have to invest in a new pair of sunglasses if i plan on looking at the site for hours on end 8-)
Hello nickchild,

This script you wrote was a godsend in my first season of FPL last year so thank you so much for creating it.
Do you keep the script saved on a git repository?

If so I am willing to contribute and submit pull requests to help you update the script as fast as possible.

If not then I at least owe you a beer.

User avatar
SuperGrover
Grumpy Old Man
Posts: 1540
Joined: 12 Sep 2012, 15:38
Location: Chicago, USA

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

Post by SuperGrover »

p83 wrote:
nickchild wrote:hi guys

will certainly look to update this for the new season. just made my team v1.0...

looking at the site i think it will need quite a bit of tweaking and won't be ready for GW1 i'm afraid

going to have to invest in a new pair of sunglasses if i plan on looking at the site for hours on end 8-)
Hello nickchild,

This script you wrote was a godsend in my first season of FPL last year so thank you so much for creating it.
Do you keep the script saved on a git repository?

If so I am willing to contribute and submit pull requests to help you update the script as fast as possible.

If not then I at least owe you a beer.
Same here. Not sure what this is written in but sure I could figure it out. Open to help as needed.

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 »

will look to get on the update this week...

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 »

nickchild wrote:will look to get on the update this week...
Hello nickchild,
It will possible to add the players countries ??
Thank you very much for your amazing work.

User avatar
Mav3rick
FISO Jedi Knight
Posts: 20858
Joined: 20 Jul 2009, 20:35
FS Record: FPL: 1082, 1201, 1800, 10203

The stats are dark and full of errors.

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

Post by Mav3rick »

nickchild wrote:will look to get on the update this week...
As you may have noticed, the "buy price" has disappeared from the transfer details page, which makes it hard to know if you are going to profit from or can absorb an impending price drop. The buy price is actually available when you're logged in to FPL, you just need to get the data from here:

https://fantasy.premierleague.com/drf/transfers

Parse the JSON and get the "purchase_price". If you can't cross check the player id, then I think it's simply an ordered list of players from left to right, GKs first, then defenders, mids and forwards.

Do you think that there is anyway that you could enhance your tampermonkey/greasemonkey script to grab that data and display it on the transfer page? I've looked at doing it for myself, but it would better as part of your script I think as then everyone could benefit from it.

User avatar
Mav3rick
FISO Jedi Knight
Posts: 20858
Joined: 20 Jul 2009, 20:35
FS Record: FPL: 1082, 1201, 1800, 10203

The stats are dark and full of errors.

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

Post by Mav3rick »

nickchild wrote:will look to get on the update this week...
I'm sure you can do this better, but I just added this into a tampermonkey script to show the purchase and sale price:

Code: Select all

GM_xmlhttpRequest({
     method: "GET",
     url: "https://fantasy.premierleague.com/drf/transfers",
     onload: function(xhr) {
      var data = eval("(" + xhr.responseText + ")");
      var priceColumnList = document.querySelectorAll("table.ism-table--squad tbody tr td:nth-child(3)");
      var priceFormat = "<span title='Purchase Price'><strong>PP:</strong> @0</span><br/><br/><span title='Sale Price'><strong>SP:</strong> @1</span>";
      for (var i = 0; i < priceColumnList.length; i++) {
          priceColumnList[i].innerHTML = priceFormat.replace("@0", (data.picks[i].purchase_price/10).toFixed(1)).replace("@1", (data.picks[i].selling_price/10).toFixed(1));
      }
    }
Image

User avatar
snakzz
Grumpy Old Man
Posts: 3613
Joined: 03 Oct 2012, 08:56

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

Post by snakzz »

Does any scripts work atm?

Looks like none of mine does :S

User avatar
BBG
Cheetah
Posts: 3
Joined: 17 Aug 2016, 08:58
FS Record: 3 Times Top5k finish in FPL

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

Post by BBG »

Mav3rick wrote:
nickchild wrote:will look to get on the update this week...
I'm sure you can do this better, but I just added this into a tampermonkey script to show the purchase and sale price:

Code: Select all

GM_xmlhttpRequest({
     method: "GET",
     url: "https://fantasy.premierleague.com/drf/transfers",
     onload: function(xhr) {
      var data = eval("(" + xhr.responseText + ")");
      var priceColumnList = document.querySelectorAll("table.ism-table--squad tbody tr td:nth-child(3)");
      var priceFormat = "<span title='Purchase Price'><strong>PP:</strong> @0</span><br/><br/><span title='Sale Price'><strong>SP:</strong> @1</span>";
      for (var i = 0; i < priceColumnList.length; i++) {
          priceColumnList[i].innerHTML = priceFormat.replace("@0", (data.picks[i].purchase_price/10).toFixed(1)).replace("@1", (data.picks[i].selling_price/10).toFixed(1));
      }
    }
Image
Didn't work. Help Please!

User avatar
FPLCasual
Kevin and Perry
Posts: 19
Joined: 21 Feb 2016, 01:37

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

Post by FPLCasual »

Looks like they have added back CP, SP and PP now.

User avatar
Taff Murray
Grumpy Old Man
Posts: 1584
Joined: 23 Jul 2011, 17:19
Location: No.1 At the end of the bar
FS Record: FISO 5AS FA Cup Winner 2016/17, FISO 5AS Champions League Winner 2018/19 Best FPL Pos 11/12 - 9959th

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

Post by Taff Murray »

Are there any plugins worth having for Google Chrome?

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 »

Looks like I can access all the data required but will need to wait until the game is 'active' again before I can be sure. Hoping to find some time this weekend...

User avatar
hander
Kevin and Perry
Posts: 36
Joined: 24 Sep 2010, 23:08

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

Post by hander »

Another grateful anticipator here. Your script really does net me more points over the season. Thank you.

While we're on the subject: I've seen some people's RMT include a coloured bar below the player - looks like form or future fixutre difficulties (traffic light system)). Anyone know whether this is an app or a plugin? Or?

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 »

It's a plugin script posted in some topic here, but can't just find it again in which topic from mobile...

User avatar
Fuzzy
Grumpy Old Man
Posts: 1700
Joined: 24 Jul 2010, 10:28
Location: on a different wavelength
FS Record: meh

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

Post by Fuzzy »

@hander;

Try this -

https://chrome.google.com/webstore/deta ... dcjcklcglm

(Doing this from the phone, so hopefully the link copies across properly)

User avatar
hander
Kevin and Perry
Posts: 36
Joined: 24 Sep 2010, 23:08

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

Post by hander »

Fuzzy wrote:
https://chrome.google.com/webstore/deta ... dcjcklcglm

(Doing this from the phone, so hopefully the link copies across properly)
Thanks! That's perfect.

ps Good luck to Nick on fixing script. You have some grateful people out here who all owe you several drinks.

User avatar
From4corners
FISO Jedi Knight
Posts: 20109
Joined: 24 Aug 2009, 22:32
Location: London

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

Post by From4corners »

Keeping my eyes peeled on this thread as well, much appreciated!!!

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 »

First update is now complete. Should be able to simply update the previous script if you don't have auto updates on.

All the data is there apart from wildcard and chip info.

All functionality is there apart from sorting and full squad list summary.

Should be enough to keep you going for now...

Let me know if it doesn't update/run on the league pages/has bugs/etc

efcdave1982
Newbie
Posts: 2
Joined: 19 Aug 2016, 23:20

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

Post by efcdave1982 »

As far as I can tell it does seem to be working for me? Script is running and has been updated

t88
Treebeard
Posts: 261
Joined: 01 Dec 2010, 23:05

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

Post by t88 »

works great... thanks so much nickchild!!

efcdave1982
Newbie
Posts: 2
Joined: 19 Aug 2016, 23:20

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

Post by efcdave1982 »

As far as I can tell it doesn't seem to be working for my leagues - worked fine last year. Script is updated, have even closed Chrome and started again but to no avail :(

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 »

first bug was captain points not doubling. have fixed now and allowed for vice captain points to double if non-playing captain. let me know if you find any that look wrong...

User avatar
nufctoon
Grumpy Old Man
Posts: 1248
Joined: 08 Aug 2014, 13:28

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

Post by nufctoon »

Great job nickchild! Works perfectly although there were two weird looking team values in my ML: 99.89999999999999 and 100.10000000000001.

View Latest: 1 Day View Your posts
Post Reply

Return to “Fantasy PremierLeague.com (FPL)”