Skip to content

Instantly share code, notes, and snippets.

@ythecombinator
Last active October 16, 2015 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ythecombinator/48d6763a8abc5e477a27 to your computer and use it in GitHub Desktop.
Save ythecombinator/48d6763a8abc5e477a27 to your computer and use it in GitHub Desktop.
I won't fill in all those fuckin' forms from QAcadêmico.
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();

It's as easy as 1,2,3!

  1. Open your browser's console (Control + Shift + J)
  2. Type script from fuck_acadêmico.js
  3. Go to the next subject
@haskellcamargo
Copy link

I suggest you to list all the ids and names and map over them to apply a function to do the work.

@haskellcamargo
Copy link

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