Gateway Mods

This script adds some functions to speed up HP operations

Stan na 18-01-2015. Zobacz najnowsza wersja.

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

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

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