Skip to content

Instantly share code, notes, and snippets.

@marcelotmelo
Created August 11, 2015 13:39
Show Gist options
  • Save marcelotmelo/b8d56100a1dfc4205a78 to your computer and use it in GitHub Desktop.
Save marcelotmelo/b8d56100a1dfc4205a78 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @version 0.4.6
// @name CA - Atualizar Demanda
// @namespace http://www.mec.gov.br/
// @author marcelotmelo (https://github.com/marcelotmelo)
// @updateURL https://github.com/marcelotmelo/tampermonkey/raw/master/ca-atualizar-demanda.user.js
// @description Atualiza a demanda do CA
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @include http://operacoesti.mec.gov.br*/CAisd/pdmweb.exe?SID=*+FID=*+OP=SHOW_DETAIL+FACTORY=*
// @match http://operacoesti.mec.gov.br*/CAisd/pdmweb.exe?SID=*+FID=*+OP=SHOW_DETAIL+FACTORY=*
// @grant GM_addStyle
// @grant GM_getResourceText
// @copyright 2013+, You
// ==/UserScript==
//Avoid conflicts
this.$ = this.jQuery = jQuery.noConflict(true);
function refreshBugPage() {
document.location.reload();
}
var refreshButton = document.createElement("input");
refreshButton.type = "button";
refreshButton.value = "Atualizar";
refreshButton.onclick = refreshBugPage;
$(document).ready(
function() {
$('.tablecenter tbody tr td', $("frame[name='product']").contentDocument).first().before($('<td>').append($(refreshButton)).append($('</td>')));
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment