Last active
August 29, 2015 14:11
-
-
Save ajiepangestu/da9956ec73b2e0176af3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 wifi.id auto login | |
// @namespace https://gist.github.com/ajiepangestu | |
// @description wifi.id auto login | |
// @include http://welcome.indonesiawifi.net/wifi.id/* | |
// @version v1 | |
// @grant none | |
// ==/UserScript== | |
//Username & Password @Wifi.id// | |
var username = '1111111111'; // Username SPIN Wifi.id | |
var password = '2222222222'; // Password SPIN Wifi.id | |
//Login type @wifi.id kamu, valid value: SPIN, INTEL, SPEEDY, FLEXI// | |
var logintype = 'SPIN'; | |
//STOP// | |
if (username == '1111111111') | |
{ | |
alert('Username dan Password @wifi.id belum ditetapkan,\n silahkan ubah terlebih dahulu scriptnya'); | |
return false; | |
} | |
else if (window.location.href.match('welcome.indonesiawifi.net/wifi.id/default_olo1/')) | |
{ | |
if (logintype == 'SPIN') | |
{ | |
window.location = window.location.href.replace('default_olo1', 'spin'); | |
} | |
if (logintype == 'INTEL') | |
{ | |
window.location = window.location.href.replace('default_olo1', 'intel'); | |
} | |
if (logintype == 'SPEEDY') | |
{ | |
window.location = window.location.href.replace('default_olo1', 'speedy'); | |
} | |
if (logintype == 'FLEXI') | |
{ | |
window.location = window.location.href.replace('default_olo1', 'flexizone'); | |
} | |
} | |
else if (window.location.href.match('welcome.indonesiawifi.net/wifi.id/spin/')) | |
{ | |
document.getElementById('username-login').value = username; | |
document.getElementById('pass-login').value = password; | |
setTimeout(function () | |
{ | |
document.getElementsByClassName('imgbtn')[0].click(); | |
}, 100); | |
} | |
else if (window.location.href.match('welcome.indonesiawifi.net/wifi.id/intel/')) | |
{ | |
document.getElementById('inputUserName').value = username; | |
document.getElementById('inputPassword').value = password; | |
setTimeout(function () | |
{ | |
document.getElementById('button').click(); | |
}, 100); | |
} | |
else if (window.location.href.match('welcome.indonesiawifi.net/wifi.id/speedy/')) | |
{ | |
document.getElementById('user_id').value = username; | |
document.getElementById('pass_id').value = password; | |
setTimeout(function () | |
{ | |
$('#login-form').submit(); | |
//document.forms['login-form'].submit(); | |
}, 100); | |
} | |
else if (window.location.href.match('welcome.indonesiawifi.net/wifi.id/flexizone/')) | |
{ | |
document.getElementById('username').value = username; | |
document.getElementById('password').value = password; | |
setTimeout(function () | |
{ | |
document.getElementById('submit').click(); | |
}, 100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment