Skip to content

Instantly share code, notes, and snippets.

View Matoex's full-sized avatar

Matthias B. Matoex

  • near Nürnberg - Germany
View GitHub Profile
@Matoex
Matoex / prozent.js
Created June 23, 2023 13:06
Studon %
/*
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 + "%"
@Matoex
Matoex / prozent.js
Created December 30, 2021 16:00
Studon Punkte und Prozent berechnen
/*
Berechnet die erreichte und maximale Punktzahl (daraus auch die %) einer Übungsseite in Studon der FAU
Den Code einfach mit F12 im richtigen Tab in die Browserkonsole einfügen und enter drücken, das Ergebnis erscheint in der Konsole.
*/
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[0].alt != "Nicht bewertet").map(x=>parseFloat(x.outerText.split("max. ")[1].split(" ")[0])).reduce((a,b)=>a+b)
console.log(erreicht + "/"+maxSumme+"="+Math.round((erreicht/maxSumme)*1000)/10 + "%")
@Matoex
Matoex / paste_into_console.js
Last active May 15, 2021 23:20
Fragenkatalog: Sanitätsdienst Grundausbildung Auflösungsbutton
/*
Gemacht für: Sanarena (von Andreas THUMSER) Fragenkatalog: Sanitätsdienst Grundausbildung
Auflösugnsbutton von Matthias Bretting und Tobias Geßler
http://www.san-erlangen.de/VirtuelleSanArena-Erlangen-Html5/html/Topic6122a44e1a304db980e3cf9b3107e410.html
Wie nutzen?
Drücke F12
Füge den Code in die Console ein (STRG C,STRG V)