Simulationsbutton im Profil

Erzeugt in jedem Profil einen Simulations-Spiel-Button

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       Simulationsbutton im Profil
// @include  https://fussballcup.de/*
// @version    0.1.2
// @description  Erzeugt in jedem Profil einen Simulations-Spiel-Button
// @copyright  Klaid, 2013
// @connect <value>
// @namespace https://greasyfork.org/users/83290
// ==/UserScript==

window.setTimeout(function() { changes() }, 2500);
window.setInterval(function() { changes() }, 5000);
function changes()
{
    	if(!document.getElementById("simuspiel"))
        {
            var user_id = document.getElementsByClassName("button button-container-friendly-invite-button")[0].firstElementChild.getAttribute("href");
			user_id = user_id.substring(user_id.indexOf('invite=')+7, user_id.indexOf('&calendar'));
    		document.getElementsByClassName("profile-actions")[0].innerHTML += "<a href='#/index.php?w=301&area=user&module=simulation&action=index&squad=" + user_id + "' class='button' id='simuspiel'><span>Simulationsspiel</span></a>";
		}
}