Skip to content

Instantly share code, notes, and snippets.

@z-------------
Last active August 29, 2015 14:02
Show Gist options
  • Save z-------------/6bfb05682869edff9e43 to your computer and use it in GitHub Desktop.
Save z-------------/6bfb05682869edff9e43 to your computer and use it in GitHub Desktop.
// ==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