You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the code in the main_page function, a headache can be
caused from the amount of jQuery code that has to be traversed. In
continuation of solving this problem, I have moved some of the code into
more descriptive functions.
The showCurrentGPA function is more descriptive than random jQuery.
The showfirstSemGPA function is also more descriptive than a fetch for
the HTML and a lot of HTML parsing and then finally displaying the GPA.
The getFirstSemCourses function is *hopefully* more descriptive than
fetch("https://powerschool.sas.edu.sg/guardian/termgrades.html").
There's probably a better function name for this.
By moving some of the code into the main_page function, it hopefully
creates better readability of the main_page function.
Signed-off-by: Lucas Sta Maria <[email protected]>
if((attendance_href=$grade_rows.eq($grade_rows.length-1)?.find('a[href*="attendancedates"]')?.[0]?.href)){// Check that attendance_href exists and if it does, run the next line.
0 commit comments