pamungkas3 / wifi.id auto login by bengak

// ==UserScript==izinkan copas
// @name        wifi.id auto login by bengak
// @namespace   cekpr.com
// @description wifi.id auto login by bengak
// @include     http://halo.wifi.id/wifi/login/*
// @version     2
// @grant       none
// ==/UserScript==

/////////////////////////////////////////////////////////////////////////////////////////////////
//// memodifikasi script ini bebas dengan catatan tidak menghilangkan credit aslinya, trims. ////
////////////////////////////////////////////////////////////////////////////////////////////////


//////// edit Username & Password @Wifi.id dibawah ini  /////////
var username = '89302024060';  // Username SPIN Wifi.id
var password = '22761962376817';  // Password SPIN Wifi.id

/////// edit Login type @wifi.id kamu, valid value: SPIN, INTEL, SPEEDY, FLEXI //////
var logintype = 'SPIN';

/////// STOP, kebawah jgn edit lagi kecuali ente tau //////////

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('http://halo.wifi.id/wifi/login/?gw_address*'))
{
  if (logintype == 'SPIN')
  {
    window.location = window.location.href.replace('?gw_address', 'spin_speedy/?gw_address');
  }
  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('http://halo.wifi.id/wifi/login/spin_speedy*'))
{
  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);
}


/////////////////////////////////////////////////////////////////////////////////////////////////
//// memodifikasi script ini bebas dengan catatan tidak menghilangkan credit aslinya, trims. ////
////////////////////////////////////////////////////////////////////////////////////////////////