Gateway Mods

This script adds some functions to speed up HP operations

当前为 2015-01-18 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Gateway Mods
// @namespace    http://www.hacker-project.com/
// @version      0.1
// @description  This script adds some functions to speed up HP operations
// @author       Kevin Mitnick
// @match        http://www.hacker-project.com/*
// @grant        none
// ==/UserScript==

function setup() {
    // Setup jQuery
    var jQueryScript = document.createElement("script");
    jQueryScript.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js");
    document.head.appendChild(jQueryScript);
    
    if (window.location == "http://www.hacker-project.com/index.php?action=gate&a2=files") {
        var table = document.getElementsByName("frm_files")[0].getElementsByTagName("table")[0];
        for (var numberOfRows = table.rows.length, i = 3; i<(numberOfRows-3)*3; i+=3) {
            var tr = table.getElementsByTagName("tbody")[0].getElementsByTagName("tr")[i];
            var tds = tr.getElementsByTagName("td");
            var fileType = tds[9].innerHTML;
            var version = parseFloat(tds[11].innerHTML);
            
            if (fileType == "Firewall Protect") {
                tds[11].innerHTML += ("<br/><p class='p1'> "+Math.ceil(version*500)+" MHz CPU, "+Math.ceil(version*30000)+" kb RAM</p>");
            }
            else if (fileType == "Firewall Bypass") {
            	tds[11].innerHTML += ("<br/><p class='p1'> "+Math.ceil(version*800)+" MHz CPU, "+Math.ceil(version*70000)+" kb RAM</p>");
            }
            else if (fileType == "Password Protect") {
            	tds[11].innerHTML += ("<br/><p class='p1'> "+Math.ceil(version*1000)+" MHz CPU, "+Math.ceil(version*50000)+" kb RAM</p>");
            }
            else if (fileType == "Password Break") {
            	tds[11].innerHTML += ("<br/><p class='p1'> "+Math.ceil(version*2000)+" MHz CPU, "+Math.ceil(version*125000)+" kb RAM</p>");
            }
        }
    }
}
setup();