Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Auto Otohits
- // @namespace Th3-822.tk/AutoOtohits
- // @include http://otohits.net/*
- // @include http://www.otohits.net/*
- // @version 1
- // @grant none
- // ==/UserScript==
- // Ingles
- document.cookie = 'WW=lang=en';
- function emularClick(elemento) {
- var ret = true, eventos = ['mousedown', 'click', 'mouseup'];
- for (var i = 0; i < 3; i++) ret = elemento.dispatchEvent(new MouseEvent(eventos[i], {'view': unsafeWindow, 'bubbles': true, 'cancelable': true})) && ret;
- return ret;
- }
- if (document.location.pathname.toLowerCase() == '/account/login') {
- var fEmail = document.getElementById('Email'), fPassword = document.getElementById('Password'), fReturnUrl = document.getElementById('ReturnUrl');
- if (fEmail && fPassword && !document.querySelector('.validation-summary-errors')) {
- fEmail.value = 'oljb17@gmail.com'; // Correo
- fPassword.value = '04168617195'; // Contrasena
- if (fReturnUrl) fReturnUrl.value = '/account/wfautosurf';
- parent = fEmail.parentElement;
- while (parent = parent.parentElement) {
- if (parent.tagName.toLowerCase() == 'form') {
- setTimeout(function() {parent.submit();}, 5000);
- break;
- }
- }
- } else if (document.body.innerText == 'The page cannot be displayed because an internal server error has occurred.') {
- // Error, recargar
- setTimeout(function() {document.location.href = document.location.href;}, 5000);
- }
- } else if (document.location.pathname.toLowerCase() == '/account/wfautosurf') {
- var bIniciar = document.getElementById('Start');
- if (bIniciar) {
- setTimeout(function() {emularClick(bIniciar);}, 10000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement