Gateway Mods

This script adds some functions to speed up HP operations

Fra 18.01.2015. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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();