Fanansehen

Zeigt das Fanansehen auf der Fussballcup-Startseite an.

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       Fanansehen
// @include  https://fussballcup.de/*
// @version    0.1.5
// @connect      <value>
// @description  Zeigt das Fanansehen auf der Fussballcup-Startseite an.
// @copyright  Klaid, 2013 - edited by mot33, 2018
// @grant       GM_xmlhttpRequest
// @namespace https://greasyfork.org/users/83290
// ==/UserScript==
window.setTimeout(function() { change(); }, 2500);
window.setInterval(function() { change(); }, 5000);
function change()
{
    	if(!document.getElementById("ansehen"))
        {
    		document.getElementById("clubinfocard").innerHTML += "<div id='ansehen'></div>";
		}
    
        GM_xmlhttpRequest({
        method: "GET",
        url: "https://fussballcup.de/index.php?w=301&area=user&module=publicrelations&action=index#/index.php?w=301&area=user&module=publicrelations&action=index&_=*",
        headers: {"Content-Type": "application/x-www-form-urlencoded"},
         onload: function(responseDetails){
            var inhalt = responseDetails.responseText;
            var position = inhalt.indexOf('Fanansehen');
            var ansehen_site = inhalt.substr(position, 50);
            ansehen = ansehen_site.match(/[0-9]{1,10}/);
            if(ansehen >= 90 && ansehen < 98)
            {
             	ansehen = "<font color='yellow'>"+ String(ansehen) +"&#37;</font>";   
            }
            else if(ansehen < 90)
            {
                ansehen = "<font color='red'>"+ String(ansehen) +"&#37;</font>"; 
            }
            else
            {
                ansehen = String(ansehen) +"&#37;";
            }
            document.getElementById("ansehen").innerHTML = "<b style='font-size: 13px; margin-left: 6px'>Fanansehen: "+ String(ansehen) +"</b>";
        }	
      });
}