This is a browser script (or extension, in a broader sense) to simplify the calculation of CAP when considering S/U declaration. More specifically, it enables users to toggle S/U options and see the post-S/U CAP instantly on the same page. It mainly targets NUS undergraduates, while other systems based on Oracle PeopleSoft may also work.
The following two methods are identical, except that the first has to be done again after the browser tab is closed.
Just copy all the contents of the js file, paste into the browser console, and press Enter.
It actually depends on the browser. In many cases, just download the zipped source and install unpacked extension. (Most browsers have at least some developer mode for that.) I really cannot be bothered to package and maintain for all the different browsers
It is tested with Firefox 84.0 under Ubuntu 18.04. Theoretically, it should also be working in browsers that basically conforms to the API for browser extensions, including Google Chrome, Mozilla Firefox, Microsoft Edge, etc.
Feel free to open an issue!
Note that this project conforms to the Airbnb JavaScript Style Guide with the exception of mutating property of function parameter.