Last active
August 29, 2015 14:01
-
-
Save mingtsay/63858f2bd1005320537b to your computer and use it in GitHub Desktop.
for MCU Moodle form 5 stars and check all boxes
This file contains hidden or 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
(function(d){ | |
var f = d.getElementById("phpesp_response"); | |
for (var i in f) { | |
if (f[i]) { | |
switch (f[i].type) { | |
case "radio": | |
if (f[i].value == 4) { | |
f[i].checked = true; | |
} | |
break; | |
case "checkbox": | |
f[i].checked = true; | |
break; | |
} | |
} | |
} | |
}(document)); | |
/* | |
Usage: put the following link into your bookmark | |
javascript:var%20timestamp=new%20Date().getTime();var%20main=document.createElement('script');main.charset='utf-8';main.type='text/javascript';main.src='https://gist.github.com/mingtsay/63858f2bd1005320537b/raw/39022e25c0f703637f4473a7ae90875b1818df90/mcu_moodle_form.js?'+timestamp;document.body.appendChild(main);void(0); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment