WojtekTB / UCSD-Schedule-Visualizer

Chrome extension that creates a timetable of your WebReg classes and shows you where the class you are hovering over would fit in your schedule.
MIT License
5 stars 3 forks source link

Migrating class time look up to use webreg api #9

Open WojtekTB opened 2 years ago

WojtekTB commented 2 years ago

Currently we get hovered class' info by looking at the table row element and reading its innerHTML which is not great because it is not consistent and it makes it tough to figure out which rows belong together since in HTML they all look pretty much identical. A solution to this would be to only get the basic section info and somehow correlate it with the info we get from the WebReg API.

I was not able to find any documentation for it since it is probably not meant to be used by anything other than the website itself, but I think we should be just able to make fetch requests similar to what the website is sending whenever you search for particular classes: image image

The response payload contains begin and end times, and other info we might want to display.

Still need to think about how the correlation between a particular section and the api response payload should go. Ideas welcomed.