Simulationsbutton im Profil

Erzeugt in jedem Profil einen Simulations-Spiel-Button

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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>";
		}
}