SHARE
TWEET

Autologin VT (modificado por Kings Meadow)

a guest Mar 20th, 2016 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Autologin
  3. // @namespace    http://forum.jogos.uol.com.br/
  4. // @version      1.1
  5. // @description  Loga automaticamente no Fórum UOL Jogos.
  6. // @author       VT
  7. // @match        http://forum.jogos.uol.com.br/
  8. // @include      http://forum.jogos.uol.com.br/*
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. if (!isUserLogged()) {
  13.     var user = 'usuario';
  14.     var pass = 'senha';
  15.  
  16.     document.getElementById('user').value = user;
  17.     document.getElementById('pass').value = pass;
  18.  
  19.     document.getElementsByClassName('submit-login-input')[0].click();
  20. } else {
  21.     console.log("Usuário já está logado.");
  22.     document.title = '[' + (document.getElementsByClassName('top-user')[0]).childNodes[1].innerHTML.trim() + '] ' + document.title;
  23. }
  24.  
  25. function isUserLogged() {
  26.     return document.getElementsByClassName('top-user')[0];
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top