Created
June 23, 2023 13:06
-
-
Save Matoex/dac97fa91d8343cc42f1cd7f380da6be to your computer and use it in GitHub Desktop.
Studon %
This file contains 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
/* | |
Calculates the % of the achieved points on studon accounting for only the rated exercises | |
*/ | |
erreicht = Array.from(document.querySelectorAll(".ilTag")).map(x => x.innerText).map(x=>parseFloat(x.split(" ")[1])).reduce((a,b)=>a+b) | |
maxSumme = Array.from(document.querySelectorAll(".ilExcAssignmentHead")).filter(x=>x.children[1].children.length > 0).map(x=>parseFloat(x.outerText.split("max. ")[1].split(" ")[0])).reduce((a,b)=>a+b) | |
erreicht + "/"+maxSumme+"="+Math.round((erreicht/maxSumme)*1000)/10 + "%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment