Last active
October 16, 2015 20:05
-
-
Save ythecombinator/48d6763a8abc5e477a27 to your computer and use it in GitHub Desktop.
I won't fill in all those fuckin' forms from QAcadêmico.
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
document.getElementById("R_1781").checked = true; | |
document.getElementById("R_1790").checked = true; | |
document.getElementById("R_1795").checked = true; | |
document.getElementById("R_1800").checked = true; | |
document.getElementById("R_1805").checked = true; | |
document.getElementById("R_1810").checked = true; | |
document.getElementById("R_1815").checked = true; | |
document.getElementsByName("P_593")[0].value = "FUCK THE SYSTEM (╯°□°)╯"; | |
document.getElementsByName("P_594")[0].value = "FUCK THE SYSTEM (╯°□°)╯"; | |
document.getElementsByName("P_595")[0].value = "FUCK THE SYSTEM (╯°□°)╯"; | |
document.getElementById("Enviar").click(); |
var ids = [1781, 1790, 1795, 1800, 1805, 1810, 1815];
var names = [593, 594, 595];
var check = function(id) {
var maybeDOM = document.getElementById("R_" + id.toString());
maybeDOM && maybeDOM.checked = "checked";
};
var fill = function(id) {
var maybeDOM = document.getElementsByName("P_" + id.toString());
maybeDOM[0] && maybeDOM[0].value = "FUCK THE SYSTEM (╯°□°)╯";
};
ids.forEach(check);
names.forEach(fill);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suggest you to list all the ids and names and map over them to apply a function to do the work.