Bahamut Auto Verification Code

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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;
  }
  

})();