arthurd2

LibSamy

Apr 9th, 2020
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Adiciona Link de Boleto
  3. // @version      0.1
  4. // @description  Verificar se a lista de contratos estão de acordo e puxa-los
  5. // @author       Guilherme Geronimo
  6. // @match        file:///home/arthur/caixa.html
  7. // @match1       http://ciweb4.extranet.caixa/ciweb2.0/Recebimento/V034721501/
  8. // @grant        none
  9. // @require      http://code.jquery.com/jquery-3.4.1.min.js
  10. // ==/UserScript==
  11.  
  12.  
  13.  
  14. $(document).ready(function(){
  15.   alert("agora vai");
  16.   atualizar_link();
  17. });
  18.  
  19. //$("#opcCON").mouseup(function() {atualizar_link();});
  20.  
  21. //$("#TxtCONIDENTIFICACAO").onfocusout = function(){atualizar_link();};
  22.  
  23. function atualizar_link(){
  24.     var label = document.getElementsByTagName("label")[3];
  25.     if( label === undefined ){ return true;}else{alert('fodeo');}
  26.     var campos = label.innerHTML.split(':')[3];
  27.     var contrato = campos.replace(/\D/g,'');
  28.     alert(contrato);
  29.     var url = '<a href="http://siga.caixa/sistema/siga/hab_boleto_incorp.asp?contrato='+contrato+'"> : Link para o Boleto</a>' ;
  30.     label.innerHTML = ". :::" + contrato + url + " ::: .";
  31. }
Advertisement
Add Comment
Please, Sign In to add comment