Last active
February 18, 2022 17:59
-
-
Save fellypsantos/c10515c430a8e1ac6ad7c19c17ed93e4 to your computer and use it in GitHub Desktop.
Script para desabilitar expiração de sessão do CadSUSWeb, assim o operador fica sempre logado aumentando a produtividade pois não terá de fazer logins demorados consantemente.
This file contains 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
// ==UserScript== | |
// @name CADSUS Web - Sessão Ilimitada | |
// @namespace cadsusweb#[email protected] | |
// @version 1.0 | |
// @description Mantém sessão cadsusweb ativada até que o navegador seja fechado. | |
// @author [email protected] | |
// @match https://cadastro.saude.gov.br/novocartao/restrito/usuarioConsulta.jsp* | |
// @match https://cadastro.saude.gov.br/novocartao/restrito/usuarioCadastro.jsp* | |
// @downloadURL https://gist.github.com/fellypsantos/c10515c430a8e1ac6ad7c19c17ed93e4/raw/68ad0c130b195aeedddfa674f8252214e67997aa/CadSUSWebNoExpire.user.js | |
// @updateURL https://gist.github.com/fellypsantos/c10515c430a8e1ac6ad7c19c17ed93e4/raw/68ad0c130b195aeedddfa674f8252214e67997aa/CadSUSWebNoExpire.user.js | |
// @icon https://www.google.com/s2/favicons?domain=gov.br | |
// @grant none | |
// ==/UserScript== | |
var timeoutDialog; | |
window.$.idleTimeout( | |
timeoutDialog, | |
"div.ui-dialog-buttonpane button:first", | |
{ | |
titleMessage: "", | |
idleAfter: 9999, | |
pollingInterval: 9999, | |
keepAliveURL: window.context + "restrito/manterSessaoAtiva.form", | |
serverResponseEquals: "OK", | |
onTimeout: () => {}, | |
onIdle: () => {}, | |
onCountdown: () => {}, | |
} | |
); | |
setInterval(() => { | |
window.$.ajax('https://cadastro.saude.gov.br/novocartao/restrito/manterSessaoAtiva.form') | |
.then(response => {console.log('manterSessaoAtiva: ', response)}); | |
}, 30*1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment