Advertisement
Guest User

Untitled

a guest
Sep 24th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Changer "Username" et "Password"
  2. // ==UserScript==
  3. // @name         Autovote domro.online
  4. // @namespace    http://domro.online/?module=account&action=login
  5. // @version      0.1
  6. // @description  Un script pour voter automatiquement domro.online
  7. // @author       Congelateur
  8. // @match        http://domro.online/*
  9. // @match        https://www.rotopserv.net/*
  10. // @grant        none
  11. // ==/UserScript==
  12.  
  13. function clickButton(val)
  14. {
  15.     var buttons = document.getElementsByTagName('input');
  16.     for(var i = 0; i < buttons.length; i++)
  17.     {
  18.        if(buttons[i].type == 'submit' && buttons[i].value == val)
  19.        {
  20.            buttons[i].click();
  21.            break; //this will exit for loop, but if you want to click every button with the value button then comment this line
  22.        }
  23.     }
  24. }
  25.  
  26. (function() {
  27.     if(window.location.href.indexOf("?module=account&action=login") > -1)
  28.             setInterval( function(){
  29.             document.getElementById("login_username").setAttribute("value","Pseudo");
  30.             document.getElementById("login_password").setAttribute("value","Mdp");
  31.             clickButton('Log In');
  32.             },500);
  33.     else
  34.  
  35.     {
  36.         setInterval( function(){
  37.                     window.location.replace("http://domro.online/index.php?module=voteforpoints&action=vote&sid=1");
  38.             },5000);
  39.     }
  40. })
  41. ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement