Simulationsbutton im Profil

Erzeugt in jedem Profil einen Simulations-Spiel-Button

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

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