Lolzteam Radio

Слушай радио прямо на Lolzteam

目前為 2023-01-10 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Lolzteam Radio
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Слушай радио прямо на Lolzteam
// @author       https://lolz.live/gokent
// @match        https://lolz.live/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lolz.live
// @grant        none
// ==/UserScript==

(function(){
    let new_field = document.createElement('div');
    let button = document.createElement('button');
    let selectList = document.createElement('select');
    let audio = document.createElement('audio');
    let selected_radio = 'Европа Плюс';
    var radios = ['Европа Плюс', 'Авторадио', 'Хит FM', 'Русское радио', 'Дорожное радио', 'DFM'];

    audio.id = 'radio-audio';
    selectList.id = 'select-radio';
    button.innerHTML = 'Play';
    button.className = 'radio-player';
    button.setAttribute('status', 'stop');

    selectList.style.width = '130px';
    button.style.width = '41px';

    selectList.style.padding = '6px';
    button.style.padding = '6px';

    selectList.style.background = '#2d2d2d';
    button.style.background = '#2d2d2d';

    button.style.color = '#d6d6d6';
    selectList.style.color = '#d6d6d6';

    button.style.border = 'none';
    selectList.style.border = 'none';

    selectList.style.fontWeight = 'bold';
    button.style.fontWeight = 'bold';

    button.style.marginLeft = '5px';

    button.style.borderRadius = '6px';
    selectList.style.borderRadius = '6px';
    selectList.style.outline = '0';

    selectList.style.cursor = 'pointer';
    button.style.cursor = 'pointer';

    new_field.appendChild(selectList);
    new_field.appendChild(button);
    new_field.appendChild(audio);

    for (var i = 0; i < radios.length; i++) {
        var option = document.createElement('option');
        option.value = radios[i];
        option.text = radios[i];
        option.id = 'list-radio';
        selectList.appendChild(option);
    }

    let field = document.querySelector('.secondaryContent');
    field.append(new_field);

    let listOnchange = document.querySelector('#select-radio').onchange = function(event){
        selected_radio = event.target.value;
    }

    let radio_play = document.querySelector('.radio-player').onclick = start_radio;

    function start_radio(){
        docx = document.querySelector('.radio-player')
        attr = docx.getAttribute('status');
        if (attr == 'stop'){
            var get_audio = document.querySelector('#radio-audio');

            if (selected_radio == 'Европа Плюс'){
                get_audio.src = 'https://europaplus.hostingradio.ru:8014/europaplus320.mp3?5b8b3595';
                get_audio.play();
            }

            else if (selected_radio == 'Авторадио'){
                get_audio.src = 'https://ic7.101.ru:8000/v3_1?f474e85';
                get_audio.play();
            }

            else if (selected_radio == 'Хит FM'){
                get_audio.src = 'https://hitfm.hostingradio.ru/hitfm128.mp3?6823dbe';
                get_audio.play();
            }

            else if (selected_radio == 'Русское радио'){
                get_audio.src = 'https://rusradio.hostingradio.ru/rusradio96.aacp?e88b';
                get_audio.play();
            }

            else if (selected_radio == 'Дорожное радио'){
                get_audio.src = 'https://dorognoe.hostingradio.ru:8000/dorognoe?747b3618';
                get_audio.play();
            }

            else if (selected_radio == 'DFM'){
                get_audio.src = 'https://dfm.hostingradio.ru/dfm96.aacp?2f85ca10';
                get_audio.play();
            }

            docx.innerHTML = 'Stop';
            docx.setAttribute('status', 'play');
            selectList.disabled = true;
            selectList.style.cursor = 'default';
        }

        else {
            var get_audio = document.querySelector('#radio-audio');
            get_audio.pause();
            get_audio.currentTime = 0;
            get_audio.removeAttribute('src');
            docx.innerHTML = 'Play';
            docx.setAttribute('status', 'stop');
            selectList.disabled = false;
            selectList.style.cursor = 'pointer';
        }
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址