Last active
August 29, 2015 14:02
-
-
Save z-------------/6bfb05682869edff9e43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name ARR Grade Changer | |
| // @namespace http://zacharyguard.co.nf/ | |
| // @version 0.1 | |
| // @description Changes all of your grades below B to a B | |
| // @include https://*.tg.esf.edu.hk/src/module/arr_parent/* | |
| // @copyright 2014+, Zachary Guard | |
| // ==/UserScript== | |
| var tds = document.querySelectorAll("td:not(.arr_indi_borderR)"); | |
| for(i=5;i<tds.length;i++){ | |
| if (tds[i-5].textContent.indexOf("Science") == -1 && document.body.innerHTML.indexOf("Biology") == -1) { | |
| if (tds[i].textContent.charAt(0) > "B" && tds[i].textContent.replace(/\s/g,"").length <= 2 && tds[i].textContent.replace(/\s/g,"").length != 0) { | |
| tds[i].textContent = "B"; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment