Skip to content

Instantly share code, notes, and snippets.

@edysegura
Last active July 11, 2017 03:44
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 edysegura/87d9e08495e9237dd20bac66104ae621 to your computer and use it in GitHub Desktop.
Save edysegura/87d9e08495e9237dd20bac66104ae621 to your computer and use it in GitHub Desktop.
[TRICK] A simple script to fill out univas form
// ==UserScript==
// @name Univas Fill and Save
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://m.univas.edu.br/sistemas/Cad_Planos_Ensino_1.asp
// @grant none
// ==/UserScript==
(function() {
'use strict';
function univasFill() {
$('[name=_pecadata').val(++window.name); //remember to set this variable
$('[name=_pecanupr]').val(4);
$('[name=_pecpprof1')[0].checked = true;
$('[type=submit]').click();
}
var button = document.createElement('button');
button.innerHTML = "Fill and Save";
button.className = "btn btn-lg btn-default";
button.addEventListener('click', univasFill);
$('center:first').append(button);
})();
(function univasFill() {
$('[name=_pecadata').val(++window.name) //remember to set this variable
$('[name=_pecanupr]').val(4)
$('[name=_pecpprof1')[0].checked = true
$('[type=submit]').click()
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment