Bahamut Auto Verification Code

巴哈姆特自動填寫回文驗證碼。

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name	Bahamut Auto Verification Code
// @description	巴哈姆特自動填寫回文驗證碼。
// @include	http://forum.gamer.com.tw/C.php*
// @include	http://forum.gamer.com.tw/post1.php*
// @include     https://user.gamer.com.tw/login.php
// @match	http://forum.gamer.com.tw/C.php*
// @match	http://forum.gamer.com.tw/post1.php*
// @match       https://user.gamer.com.tw/login.php
// @homepageURL	http://userscripts.org/scripts/show/141665
// @author	nsps5606
// @version	1.0.6
// @date	2012-10-06
// @namespace https://greasyfork.org/users/7425
// ==/UserScript==

(function () {

  var htm = document.body.innerHTML;
  var url = document.URL;

  if(new RegExp("forum.gamer.com.tw/C.php").test(url))
  {
    var start = htm.lastIndexOf("\u767C\u6587\u9A57\u8B49\u78BC\uFF1A");
    if(start != -1)
    {
      var pw = htm.substring(start+12, start+16);
      var pwd2 = document.getElementsByName("pwd2")[0].value = pw;
    }
  }
  else if(new RegExp("forum.gamer.com.tw/post1.php").test(url))
  {
    var start = htm.lastIndexOf("BH-tcolor4");
    if(start != -1)
    {
      var pw = htm.substring(start+20, start+24);
      var pwd2 = document.getElementsByName("pwd2")[0].value = pw;
    }
  }
  else if(new RegExp("user.gamer.com.tw/login.php").test(url))
  {
    document.getElementsByName("autoLogin")[0].checked = true;
  }
  

})();