Skip to content

Instantly share code, notes, and snippets.

@dwouca
dwouca / average_without_first_3
Last active July 20, 2019 03:10
Bookmarklet that calculates cyber start essentials (cyber discovery) average exam score without the first 3 (for these scores don't count)
javascript:(function(){total=0;n=0;for(let i = 1; i<document.getElementsByClassName("progress").length-4;i++){try{x=(parseInt(document.getElementsByClassName("progress")[i+3].childNodes[1].childNodes[3].childNodes[1].textContent.replace("%", "")));total+=x;n+=1}catch{}};alert(total/n)})()
@dwouca
dwouca / average
Created May 20, 2018 20:55
Bookmarklet that calculates the average score for exams in cyber start essentials.
javascript:(function(){total=0;n=0;for(let i = 1; i<document.getElementsByClassName("progress").length-1;i++){try{x=(parseInt(document.getElementsByClassName("progress")[i].childNodes[1].childNodes[3].childNodes[1].textContent.replace("%", "")));total+=x;n+=1}catch{}};alert(total/n)})()