hax.co.id Renew Simplified

Simplify the renew process for hax.co.id

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        hax.co.id Renew Simplified
// @name:zh-CN  hax.co.id 续期助手
// @namespace   http://tampermonkey.net/
// @version     1.0
// @description Simplify the renew process for hax.co.id
// @description:zh-cn   简化hax.co.id续期操作
// @author      SemiZhang
// @match       https://hax.co.id/vps-renew/
// @icon        https://www.google.com/s2/favicons?sz=64&domain=co.id
// @grant       none
// @license     AGPL License
// ==/UserScript==

(function() {
    'use strict';

    // Fill text input
    document.getElementById('web_address').value='hax.co.id';
    // Check agreement checkbox
    document.getElementsByName('agreement')[0].checked=true;
    // Ready to fill captcha
    document.getElementById('captcha').focus();
    // Submit when press 'Enter' after filling captcha
    document.getElementById('captcha').onkeydown=function(e){
        var keyNum=window.event ? e.keyCode :e.which;
        if(keyNum==13){
            document.getElementsByName('submit_button')[0].click();
        }
    };
})();