https://github.com/amosbastian/fpl-plus
After more than three weeks of not working on the extension I am now back and ready to start applying the finishing touches before releasing it properly! There are a couple of other projects that have to do with FPL that I'm also working on simultaneously, so I've decided to create a task request for FPL Plus so everything (hopefully) gets done sooner
The task
Currently the user can log in to FPL Plus by using their user ID, but I want to change it so users can log in with their email and password. Why? Because when logging in with a user ID the user doesn't have access to all the information that they would when logging in with their email and password. For example, you can only see your current team when logging in with this, because otherwise other people could copy your transfers. There are even websites out there that are used to predict which transfers veteran players have made so other people can use this information (crazy, right?).
https://github.com/amosbastian/fpl/blob/master/fpl/fpl.py#L181-L210
I've already implemented something similar for my Python library, but since I'm new to JavaScript I'm having trouble implementing it for the popup. In the above image you can see how I implemented this, and hopefully it will be useful for figuring out how to implement it in JavaScript.
Components
Like I said, I'm not completely sure how this would be implemented in JavaScript (saving the session etc.), but whatever it turns out to be, it should be implemented in login.js in the login()
function. It is possible that implementing the login functionality using an email and password will break other parts of the popup, but I will fix that myself if that's the case (unless whoever takes on this task wants to do that as well). Unfortunately there are no unit tests yet, so you will have to test if it works yourself (we can talk about this via Discord or something).
Deadline
I would like to see this completed before February, although I think it should only take < 1 hour if you know what you are doing.
Communication
You can contact me either on Discord (Amos#4622), GitHub or under this post.
Usage & installation
FPL Plus is currently not available on the Chrome store, so you must install it locally and then unpack the extension manually, or download the release from here.
- Clone the repository
- Install Node.js
- Run
npm install
to install dependencies - Run
npm run build
to watch code changes and build the unpacked extension - Navigate to chrome://extensions/, activate developer mode, click "load unpacked" and select the
build/
folder
Once I have added a couple more features I will try and add compatibility with other browsers like Firefox and add it to their respective stores for easy installation. I have no idea how difficult that is, but time will tell.
I'll send the author rewards generated by this task request to whoever solves it!
TL;DR: implement functionality for logging in with email and password in login.js before February.