HP BlackSkin

Changes some of the icons / colors of HP

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         HP BlackSkin
// @namespace    http://www.hacker-project.com/
// @version      0.3
// @description  Changes some of the icons / colors of HP
// @author       You
// @match        http://www.hacker-project.com/*
// @match        http://hacker-project.com/*
// @grant        none
// ==/UserScript==

function setup() {
    document.getElementsByTagName("img")[0].setAttribute("src", "http://i.imgur.com/f4Uw6VE.png");
    var classChng = [
        
        ["p", 
         ["color", "lightgray"]
        ],
        
        ["def", 
         ["color", "white"]
        ],
        
        ["yellow", 
         ["color", "white"]
        ],
        
        ["emi6", 
         ["background-color", "#black"], 
         ["border", "1px solid lightgrey"]
        ],
        
        ["p1", 
         ["color", "gray"]
        ],
        
        ["green", 
         ["color", "lightgrey"]
        ],
        
        ["g", 
         ["color", "lightgrey"]
        ],
        
        ["sel2", 
         ["color", "white"], 
         ["background", "black"]
        ],
        
        ["bred", 
         ["background", "black"]
        ],
        
        ["pbig", 
         ["color", "white"]
        ],
        
        ["sm2", 
         ["color", "white"]
        ],
        
        ["bblue", 
         ["color", "#000099"]
        ],
        
        ["lblue",
         ["color", "lightgray"]
        ],
        
        ["logText",
         ["border", "1px solid white"]
        ]
        
    ];
    change(classChng, 0);
    var tagChange = [
    
        ["a", 
         ["color", "white"]
        ],
        
        ["small", 
         ["color", "gray"]
        ],
        
        ["td", 
         ["color", "white"],
         ["background", "black"]
        ]
        
    ];
    change(tagChange, 1);
}
function change(chng, det) {
    for (var clsi = 0; clsi < chng.length; clsi++) {
        var clso = chng[clsi];
        var cls = clso[0];
        for (var pairi = 1; pairi < clso.length; pairi++) {
            var pair = clso[pairi];
            var sc = pair[0];
            var ss = pair[1];
            var elArray;
            if (det===0) elArray = document.getElementsByClassName(cls);
            else elArray = document.getElementsByTagName(cls);
            for (var eli = 0; eli < elArray.length; eli++) {
                var append = elArray[eli].getAttribute("style");
                if (append===null) append = "";
                if (append.substring(append.length-1, append.length) != ";" && append !== "") append += ";";
                elArray[eli].setAttribute("style", append+" "+sc+": "+ss+";");
            }
        }
    }
}
setup();