mehulmpt / ps-extender

Extends functionality of PSD interface by adding controls for swapping rows quickly using the generated tools by the script
MIT License
33 stars 19 forks source link

Refactor embedded iframe #5

Closed mehulmpt closed 1 year ago

mehulmpt commented 4 years ago

Let's get rid of iframe and pull data directly from the internal API directly. This is the JSON (kinda) endpoint. This would help us cache the result too, for faster UX

http://psd.bits-pilani.ac.in/Student/ViewActiveStationProblemBankData.aspx/getPBdetail
mehulmpt commented 4 years ago

@VidhuArnav would you like to take a look here?

VidhuArnav commented 4 years ago

Thats why I marked that commit as a temporary measure, I am not that good developer yet plus the ps2 deadline is close on 4th so I have to look into my own preferences. During the ps I can work on this in my free time since I will have the credentials during the ps for the site. I was thinking of parsing it as a DOM object post import from problem bank so that it can be used to match attribute to get the modal directly for those PS whose is available source of idea here. then its as easy as appending the innerhtml when attributes match.

Again as I mentioned I can work on this later this month. One more side-note though, the iframe method allows iframe to persist which I find is better solution than a popup which can be disturbing or closedown when clicked elsewhere in the window. This way as students make/sort stations, they can have everything opened in the same page simultaneously,(of course thats at the expense of load on ram as each iframe loads, thats why I labelled the button appropriately). Screenshot (116)

VidhuArnav commented 4 years ago

Btw has the webstore version been updated or you are thinking of updating it once the iframe implementation is removed?