Greasy Fork

Rainbow-Feeling OVER 9000!

Noch mehr Rainbow-Feeling auf MyDealz!

当前为 2015-07-14 提交的版本,查看 最新版本

// ==UserScript==
// @name       Rainbow-Feeling OVER 9000!
// @version    0.23
// @description  Noch mehr Rainbow-Feeling auf MyDealz!
// @match      http://www.mydealz.de/*
// @author     leovie
// @namespace https://greasyfork.org/users/13302
// ==/UserScript==

aut = document.getElementsByClassName("thread-author link text--bold space--after-3")[0];
if (aut.href == "http://www.mydealz.de/profile/Rainbowdash")
	{
        haupt = document.getElementsByClassName("section-sub text--word-wrap")[0];
        haupt.innerHTML = "<p>" + haupt.innerHTML + "</p>";
        haupt.innerHTML = haupt.innerHTML.replace(/<br>/g, "</p><p>");
        haupt.innerHTML = haupt.innerHTML.replace(/<p><\/p>/g, "");
        ps = haupt.getElementsByTagName("p");
        // P-Elemente einfaerben
        colors = ["red", "orange", "green", "turquoise", "indigo", "magenta"];
        for (i=0; i<ps.length; i++)
	        {
		        ps[i].style.color = colors[i%6];
	        }
	    // Kommentare einfaerben + Schriftfarbe weiss
	    e = document.getElementsByClassName("comments-item comments-item--active section--divided section--padded--narrow");
        for (i=0; i<e.length; i++)
            {
                e[i].style.backgroundColor = colors[i%6]; 
                e[i].style.color = "white";
            }
        // Links grau
        e = document.getElementsByClassName("bbcode_url");
        for (i=0; i<e.length; i++)
            {
                e[i].style.color="grey";
                e[i].style.textDecoration = "underline";
            }
        // Menu-Footer weiss einfaerben
        e = document.getElementsByClassName("comments-footer space--top-3 space--bottom-3 text--bold");
        for (i=0; i<e.length; i++)
            {
                e[i].style.backgroundColor = "white";
            }
        // Edit-Text weiss -> Schriftfarbe weiss
        e = document.getElementsByClassName("reasons");
        for (i=0; i<e.length; i++)
            {
                e[i].style.color = "white";
            }
	}