RWMFM

RWMFM v.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         RWMFM
// @version      1
// @author       Komoszek
// @match        http://www.wykop.pl/*
// @grant        none
// @description  RWMFM v.2
// @namespace https://greasyfork.org/users/11957
// ==/UserScript==

(function (){
    document.getElementsByClassName("clearfix")[2].innerHTML= "<li><style>#rwm > img{margin-top:3px;height:24px;width:30px; }#rwm:hover > img{-webkit-filter: opacity(0.86)}</style><a href=\"http://www.rwmfm.pl/sluchaj.html\" target=\"_blank\" id=\"rwm\" title=\"Słuchaj radia\"><img src=\"http://i.imgur.com/OpArfsi.png\"  alt=\"Słuchaj radia\"></a></li>" + document.getElementsByClassName("clearfix")[2].innerHTML

mouseOverIcon();
     
function mouseOverIcon(){
$("#rwm").bind('mouseenter mouseleave',function(a) {

            $(this).unbind('mouseenter mouseleave');
        main();
        setTimeout(mouseOverIcon,15000)
});
}

function main() {
    var jsonp_url = 'http://analitykrynkusteam.x25.pl/radio.php';
            $.getJSON(jsonp_url, function(data) {
           document.getElementById("rwm").title= 'Aktualny utwór: ' + data.song + '\n';
                document.getElementById("rwm").title+= 'Prezenter: ' + data.prezenter + '\n';
                document.getElementById("rwm").title+= 'Audycja: ' + data.audycja;
            });
}
})();