Appends total average to PupilPath, and includes a grade changer feature (visual only)
目前為
A userscript which calculates and shows your total average and more...
Average Calculation is done using this code, written by cqfllp.
var links=document.querySelectorAll('tr[style="cursor: pointer"]');
var text="";
var num=0;
var count=0;
for(var i=0;i<links.length;i++){
var str = links[i].innerText;
text=str.split('MP1: ')[1];
text=parseFloat(text);
text = text || 0;
if (text==0){
}else{
num+=parseFloat(text);
count++;
}
}
var avg=num/count;
alert("Total Average: "+Math.ceil(avg*100)/100);