luciencd / spoiless-chrome-extension

The front-end and controller part of the spoiless project. Node.js, Angular.js.
0 stars 0 forks source link

Created Interface to act as root user #2

Open luciencd opened 7 years ago

luciencd commented 7 years ago

USER CONFIG TOP PART I have just created an interface to test my backend service as a root user. Since all api keys are accepted, this will work and be fine for the time being to do tests, run experiments and so on.

Currently, this interface contains a user_id input, a place to check all series and add them to your list, checkboxes to activate or deactivate the spoiler guard, and a way to remove the spoiler from your list.

Need to make it so that the JSON representation of the user configuration (what series he wants spoiler-free, or not and so on) on the front-end angular side matches the database data.

Essentially, for every atomic operation (add,remove,show,hide), modify the JSON (in angular this automatically changes the DOM) and call the REST api in parallel. Don't wait for the API to complete, as it may take longer-than-instant time.

I need somebody to create an alternate view which would do everything that is currently possible in index.html and html/popup.js, but in a user friendly, nice looking way that could fit in a chrome extension.

Then, when I implement api_key checking in the backend, I can run unit tests using the angular.js controller, and I can give it a special key and user_id that will do these tests every time we reset the database after redeployment.

ML TEXT BOX BOTTOM PART Finally, there is a text-box which should be the first place where the machine learning model will input and output data.

Inputs: It will be able to take in plain text or html data representing a reddit comment. (http GET request to ML API service) Outputs: a JSON object of the form: {"Probabilities":[ {"series_id":12, "seriesName":"Game of Thrones", "probability":0.66}, {"series_id":14, "seriesName":"Vikings", "probability":0.03} .... ]}

This JSON object represents whether there are spoilers inside a comment, and what they are. Once we have this JSON object, the client-side code can look at the user config data and easily tell whether there is a spoiler the user wants to avoid.

Of course, there is no current way of getting these inputs and outputs automatically in such a way that the loaded website will hide correct reddit comments, but its a step forward. That is what I want someone else to figure out!