Last active
May 12, 2019 02:59
-
-
Save met4000/7f43059f55f654cc20ff73ef57dce481 to your computer and use it in GitHub Desktop.
Duke-of-Ed hours counting bookmarklet
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
for(var el=document.getElementsByClassName("_177ZgO_Z8JZy-fXhmTlSfO"),t=0,a=0;a<el.length;a++){var h=/(\d+)h (\d+)min/.exec(el[a].getElementsByClassName("_1DFESbLyOveW60ihEafsZr")[1].children[0].innerHTML);t+=parseInt(h[1])+parseInt(h[2])/60}alert(t+" hours done, averaging "+parseInt(t/parseInt(/Completed (\d+) h/.exec(document.getElementsByClassName("qa1iBqTdHVMA1IjYvmNIs")[0].innerText)[1])*1e4)/1e4+" per week"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment