Greasy Fork is available in English.

QQ音乐播放器美化

美化QQ音乐播放页面

// ==UserScript==
// @name         QQ音乐播放器美化
// @version      0.1.8
// @description  美化QQ音乐播放页面
// @author       Mikkpotatoes
// @match        https://y.qq.com/*
// @icon         https://y.qq.com/favicon.ico
// @grant        none
// @namespace https://greasyfork.org/users/805106
// ==/UserScript==

var lrcc = false;
var hideMouse;
var bodybg = {
    background: null,
    album: null
};

function hidePlayer() {
    let player = document.querySelector("#app");
    if (document.querySelector(".player-action").classList.contains("hide-player")) {
        player.style.top = "calc(100vh - 64px)";
        document.querySelector(".player__ft").classList.add("bar-mode");
        document.querySelector(".player-bar").classList.add("show-bar");
        document.querySelector("#content").style.height = "";
        document.querySelector(".lyric-bar").style.bottom = "";
        document.querySelector(".lyric-bar").style.opacity = "";
        let cl = document.querySelector(".player-action").classList;
        cl.add("show-player");
        cl.remove("hide-player");
    } else {
        player.style.top = "";
        document.querySelector(".player__ft").classList.remove("bar-mode");
        document.querySelector(".player-bar").classList.remove("show-bar");
        document.querySelector("#content").style.height = "0";
        document.querySelector(".lyric-bar").style.bottom = "100%";
        document.querySelector(".lyric-bar").style.opacity = "0";
        let cl = document.querySelector(".player-action").classList;
        cl.remove("show-player");
        cl.add("hide-player");
    }
}

function hidePlayList(s) {
    let cl = document.querySelector(".btn_play_list").classList;
    if (cl.contains("play_list_open")) {
        // document.querySelector(".mod_songlist_toolbar").style.bottom = "-280px";
        // document.querySelector(".sb_main").style.bottom = "-700px";
        document.querySelector(".songlist-box").style.transform = "translate(0, calc(100% + 140px))";
        setTimeout(() => {
            document.querySelector(".songlist-overlay").style.display = "none";
        }, 1000);
        cl.remove("play_list_open");
    } else {
        // if(s == true) {
        // document.querySelector(".mod_songlist_toolbar").style.bottom = "";
        // document.querySelector(".sb_main").style.bottom = "";
        document.querySelector(".songlist-overlay").style.display = "";
        setTimeout(() => {
            document.querySelector(".songlist-box").style.transform = "";
        }, 10);
        cl.add("play_list_open");
        // }
    }
}

function setLrc(_e, v) {
    v = v == undefined ? lrcc : v;
    if (v) {
        // console.log("exted!");
        return;
    }
    if (!document.querySelector("audio").paused) {
        lrcc = true
        setTimeout(setLrc, 50, _e, v);
    } else {
        lrcc = false;
    }

    let lrc = document.querySelector(".lyric-bar>p");
    if (lrc == null) {
        lrc = document.createElement("p");
        document.querySelector(".lyric-bar").append(lrc);
    }
    if (document.querySelector(".on")) lrc.innerHTML = document.querySelector(".on").innerHTML;
}

function getSongListData() {
    return JSON.parse(localStorage.playSongData).value;
}

function getPlayingSong() {
    let data = getSongListData();
    return data.songList[data.index]
}

function playNextSong(next) {
    let st = document.querySelector("#content").contentWindow.localStorage;
    let data = getSongListData();
    // let oldval = getSongListData();
    let index = data.index;
    if (next) {
        data.index = index < data.songList.length - 1 ? index + 1 : 0;
    } else {
        data.index = index > 0 ? index - 1 : data.songList.length - 1;
    }
    data.time = (new Date()).getTime();
    st.playSongData = JSON.stringify({
        value: data
    });
}

function updateMediaInfo() {
    navigator.mediaSession.metadata = new MediaMetadata({
        title: getPlayingSong().name,
        artist: (() => {
            let singer = "";
            getPlayingSong().singer.forEach(v => {
                singer = singer == "" ? "" : singer + " / "
                singer += v.name
            });
            return singer;
        })(),
        album: getPlayingSong().album.name,
        artwork: [{
            src: document.querySelector(".song_info__pic").src
        }]
    });
}

function imgLsr() {
    let e = document.querySelector(".song_info__pic");
    let cb = document.querySelector(".cover-blur");
    if (!cb) {
        cb = document.createElement("style");
        cb.classList.add("cover-blur");
        document.head.append(cb);
    }
    if (document.querySelector(".bar-cover")) {
        document.querySelector(".bar-cover").src = e.src;
    }
    cb.innerHTML = ".song_info__cover::after{background: url(" + e.src + ") no-repeat}"
};

function escapChar() {
    let i = document.createElement("i");
    document.querySelectorAll("#qrc_ctn>p").forEach(e => {
        i.innerHTML = e.childNodes[0].nodeValue;
        e.childNodes[0].nodeValue = i.innerText;
    });
}

function setDown() {
    fetch(document.querySelector("audio").src.replace(/^http/, "https"))
        .then((data) => {
            return data.blob()
        })
        .then((e) => {
            let dbtn = document.querySelector(".download");
            dbtn.href = window.URL.createObjectURL(e);
            dbtn.download = document.querySelector(".player_music__info").innerText;
        });
}

function fullScreen() {
    if (!document.querySelector(".player-action").classList.contains("hide-player")) hidePlayer();
    document.body.requestFullscreen();
}

(function () {
    'use strict';

    if (location.pathname == "/n/ryqq/player") {
        window.addEventListener("load", () => {
            let player = document.querySelector("#app");
            // Create play list button & set click event.
            let bps = document.querySelector(".btn_big_only");
            let bp = document.createElement("a");

            bp.classList.add("play_list_open", "btn_play_list");
            bps.after(bp);
            bps.remove();
            bp.innerHTML = "";
            let cl = bp.classList;
            cl.remove("btn_big_only");
            cl.add("btn_play_list");
            bp.addEventListener("click", hidePlayList)

            // Move play list element into a now element & set dismiss on click blank area
            let slover = document.createElement("div");
            slover.classList.add("songlist-overlay")
            let slbox = document.createElement("div");
            slbox.classList.add("songlist-box");
            slover.append(slbox);
            slbox.append(document.querySelector(".mod_songlist_toolbar"));
            slbox.append(document.querySelector(".sb_main"));
            document.querySelector("#app").append(slover);
            slover.addEventListener("click", e => {
                if (e.target.classList.contains("songlist-overlay")) hidePlayList();
            });

            let rg = document.createElement("div");
            rg.classList.add("song-action")
            rg.innerHTML = '···<div class="ring-btn full-screen" title="全屏"></div><a class="ring-btn download" title="下载"></a><div class="ring-btn settings" title="设置"></div>';
            document.body.append(rg);

            rg.addEventListener("mouseenter", e => e.target.classList.remove("btn-hide"));
            rg.addEventListener("mouseleave", e => e.target.classList.add("btn-hide"));
            document.querySelector(".full-screen").addEventListener("click", fullScreen);

            hidePlayList();
            // Load custom style sheet
            let s = document.createElement("style");
            s.innerHTML = '.player_login__guide{display:none}.mod_song_info{left:50%;width:100%;font-size:32px;line-height:56px;display:flex;flex-direction:row;align-items:center;max-width:1440px;transform:translate(-50%,0)}.song_info__cover:after{width:calc(100% - 16px);height:calc(100% - 16px);background-size:contain!important;z-index:-1;filter:blur(24px);top:24px}.song_info__pic{width:100%;height:100%;border-radius:8px}.song_info__album,.song_info__name,.song_info__singer{height:auto;font-size:24px;font-weight:700}.song_info__lyric{flex:1 0;height:100%;min-height:100%}.song_info__lyric,.song_info__lyric_box{position:unset}.song_info__lyric_box{margin-right:-20px}.song_info__lyric_inner{line-height:42px;font-weight:700;text-align:left;margin-top:50%}.song_info__lyric .on{color:#fff;opacity:1}.mod_songlist_toolbar{margin-left:0}.sb_viewport{height:420px;padding:0 0 0 24px;flex:1}.mod_only_lyric{font-size:32px;line-height:64px;font-weight:700}.player__bd{top:96px}.player_music{margin:0 316px 0 208px}@media (min-height:710px) and (max-height:900px){.song_info__lyric{top:unset}.song_info__lyric_box{height:auto;margin-top:-20%}}@media (min-height:1000px) and (max-height:1100px){.song_info__lyric_box{top:unset;margin-top:-20%;height:auto}}@supports (-webkit-appearance:none){.mod_songlist,.sb_overview{margin-right:-18px}}.btn_big_like{right:190px}.btn_big_down{display:none}.btn_big_style_list,.btn_big_style_order,.btn_big_style_random,.btn_big_style_single{top:2px;right:243px}.btn_play_list{top:3px;right:137px;width:26px;height:26px;background-position:0 -282px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAEx0lEQVR4nO3d3VHcSBQGUEIghAnBGawyWGewG4IzWGewzsBkwmQAGZgMTAbfPmhYUzZqA2p1T4/OqdILUEhz+34ltf7m6goAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARpTkQ5Jbi+UMlw+983GVZAqcp6l3PgSEcyYgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUCAgUNA/IAAAAAAAAAAAAAAAAAAAAAAAAADABUpy7P3axdfoXSd2KgICyyIgsCwCAssiILAsAgLLIiCwLAICyyIgsCwCAssiILAsAgLLIiCwLAICyyIgsCx7CUiS6yR/WC5qua6Qgd/1TY2AHLdeanzQqcIH5bxMqxvj932zOiBbb2MVEZBLNDXoGwFhWFODvhEQhjU16BsBYVhTg74REIY1NegbAWFYU4O+ERCGNTXoGwFhWFODvhE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+p+H3p8PqjgF5VPWne26P/0Pewwu1yksf2d+xv3pWs7zOcvDs59/zjynEQoAAAAAAAAAAAAAAAAAAAAAAAAA6vkPWUB8Iq0SK6MAAAAASUVORK5CYII=);background-size:100%;position:absolute}.play_list_open{opacity:1}.mod_btn_comment{display:none}.song_info__lyric_inner>p{max-width:350px;padding:12px 16px;border-radius:12px;opacity:.5}.song_info__lyric_inner>p:hover{background:rgba(255 255 255 / 25%)}.song_info__info{flex:1 0}.list_current .mod_playlist_text .playlist__title,.list_hover .mod_playlist_text .playlist__title{width:30.8986%}.mod_playlist_text .list_current .list_menu,.mod_playlist_text .list_hover .list_menu{position:static;float:left}.mod_playlist_text .playlist__time{position:absolute;right:10px;width:133px;top:0;color:#999}.mod_playlist_text .playlist__time span{position:relative;float:left;font-size:13px}.mod_songlist_toolbar{margin-bottom:0;padding:16px 24px}.song_info__cover{width:320px;height:320px}@media (min-height:900px) and (max-height:1000px){.song_info__lyric_box{height:auto}}.mod_songlist{display:flex;flex-direction:column;max-height:100%;overflow:hidden}.sb_overview{height:100%!important}ul.songlist__list{overflow-y:auto}@keyframes opacity{0%{opacity:0}100%{opacity:1}}@keyframes bar-out{0%{opacity:1;top:18px}50%{opacity:0;top:50%}90%{opacity:.5;top:unset}100%{opacity:1;top:unset}}.player-bar{justify-content:left;align-items:center;padding-left:3%;display:flex;height:64px;background:#fff;position:fixed;opacity:0;transition:.5s ease-out;width:100%;left:0}.show-bar{opacity:1;animation:1s 1 opacity ease-in}.bar-cover{width:48px;height:48px;box-shadow:0 2px 6px -1px rgba(0 0 0 / 50%);border-radius:5px}.bar-mode{z-index:16;top:18px;filter:brightness(0);animation:opacity 1s 1 ease-in}.mod_player{z-index:10}.lyric-bar{color:#333;text-align:center;font-size:17px;z-index:10;position:absolute;min-height:36px;overflow:hidden;width:100%;bottom:64px;background:#fff;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;border-top:solid 1px #eee;transition:1s ease-in-out;max-height:48px;padding-bottom:4px}.lyric-bar>p{transition:.5s ease-out}@keyframes btn-up{0%{top:calc(100vh - 48px);transform:rotate(180deg);filter:brightness(0)}100%{top:18px;transform:rotate(0);filter:brightness(1)}}@keyframes btn-down{0%{top:18px;transform:rotate(0);filter:brightness(1)}100%{top:calc(100vh - 48px);transform:rotate(180deg);filter:brightness(0)}}.player-action{width:36px;height:36px;border-radius:8px;display:block;position:fixed;right:16px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAFZklEQVR4nO3dz4tVdRjH8asipoJpaokVBgWFVFQLW0REtIgW1iJsEUEURWVBQUG7Cvq5iwhaDNUiDAwDMyihmihcZJBELhKSEoqKJgJDRCT13eLMBRVnvNc553nO95z36x+43+d5/Mw49577fAcDSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkjQFYDWwEngE2A7cBS7LP1VfAhcCdJ83j1uwz9RJwP/AtM/sIuCX7nH0xHYY9M8ziCPABcE32OTsPWAl8N0swTvcuMD/73F0FrAP2jzGPl7PP3FnABWMOY+gz4Lzs83cNsB74+xzm8Xb22TsJ+OIchjE0aUjqA1wB/DWHeTyRXUOnAA/PYRgnh2RRdi2lAy4D/pjjLA4Da7Jr6YwaBjL0aXYtJQMuBQ7UNIs3suvpBGBDTQMZ2gkszK6rNMAa4Jca5/B7dk2dQPUWYt0MyRiAVcBPDczhouzaige82MBgAD7Orq0EVO8e7m1oBtdl11c84LmGhgOwA1iQXWNbAUsZ73Onca3PrrF4wCMNDghge3aNbUQVjt0N935ldp3FA65teEjgb5JTAIuArxvu+f7sOjsD+LnhYQF8mF1nWwCfB/T7tew6OwPYFDAwgG30+NktYAHwSUCf/wWWZ9fbKcD7AYODnoYEmA9sD+rxpux6Own4MmiAW7NrjUbcDyA/QW8K1R+Pk0GD3AbMy645AvBeUE+3ZNfaecSGZAsdDwkwEdTL3vzASU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YII=) no-repeat center 1px;background-size:100%;cursor:pointer;z-index:1001;transition:.2s}.hide-player{top:18px}.show-player{transform:rotate(180deg);filter:brightness(0);top:calc(100vh - 48px)}.player-action:hover{background-color:rgba(255 255 255 / 20%)}#player{box-shadow:0 0 5px -1px rgba(0 0 0 / 50%);position:fixed;top:0;width:100%;height:100%;z-index:1000;border:none;transition:1s ease-in}.popup_guide{display:none}.show-player{animation:btn-down 1s 1 ease-in-out both}.hide-player{animation:btn-up 1s 1 running ease-in-out both}#content{width:100%;margin-bottom:100px;height:calc(100% - 100px);background-color:#fff;position:fixed;z-index:10;overflow:hidden;border:none;top:0;transition:1s ease-in-out}#app{top:0;left:0;z-index:11;position:fixed;width:100%;background-color:inherit;transition:1s ease-in-out;box-shadow:0 0 6px -1px rgba(0 0 0 / 50%);overflow:hidden}.mod_songlist_toolbar>*{filter:brightness(.4)!important}.mod_songlist_toolbar>*{filter:brightness(.4)!important}.sb_overview *{color:#000!important}.sb_overview .list_menu__item,.sb_overview .songlist__checkbox,.sb_overview .songlist__delete{filter:brightness(.2)}.hide-mouse{width:100%;height:100%;position:absolute;top:0;left:0;cursor:none;z-index:10}.list_menu__down{display:none}.sprite.songlist__edit{filter:brightness(.2)}.songlist__item--playing>.songlist__number{filter:brightness(.2)}.songlist-overlay{width:100%;height:100%;position:fixed;left:0;top:0;z-index:10}.songlist-box{width:880px;background:rgba(255 255 255 / 72%);backdrop-filter:blur(24px);border-radius:12px;position:absolute;bottom:136px;right:72px;height:560px;display:flex;flex-direction:column;transition:1s ease-in-out}.song-action{background:linear-gradient(135deg,#81fbb8 10%,#28c76f 100%);display:flex;width:48px;height:48px;/*! left: 100%; */position:fixed;z-index:100;right:0;top:50%;border-radius:50%;color:#fff;font-size:48px;font-weight:700;letter-spacing:-2px;padding-top:5px;box-sizing:border-box;align-items:center;justify-content:center;cursor:pointer;transform:translate(75%,-50%);box-shadow:0 0 6px 1px rgba(255 255 255 / 25%);opacity:.5;transition:.2s ease-in-out;--action:0}.song-action:hover{transform:translate(-4px,-50%);opacity:1;--action:1}.ring-btn{position:absolute;width:36px;height:36px;border-radius:50%;border:solid 1px #28c76f;outline:solid 2px #fff;opacity:var(--action);transition:.3s .1s ease-in-out;margin-top:-5px}.ring-btn:hover{box-shadow:-1px 1px 6px 2px rgba(255 255 255 / 60%)}.full-screen{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAEbUlEQVR4nO3dMYokdRTH8c4F001MhGGq2EuMJxDBGXBZRA9gVU2g0cqCmXdZRA9gsFFVBQZ6AidZVlYURTDVYAweD4PV+Xe96eLzgXeA/lV/qc76cAAAAAAAAAAAAAAAAAAAAAAAAACAf9Mtw+Nunr7u5/GmX6a/9nDdOlyW77oOl9U7NLt5vLn9jlw/qt51M7cPcHxZPr5ATuq6eXzRLdO71fse1fk8Pa0eWiCnfd0yfV698VH0y/hR9bgC2cedr+OH1Ts3dbYOb3bL9Fv1sEcPZJ6uqrfu5umqeoej77xMPz/44dM3qrduppunz6pH3eTBeYNsd/P0SfXWzfTLuJQPKpBdXTeP31Zv3Uy3jL9XD7rNQ/MTa8P7qXrrZu7BmNsE4g2y6VVv3Uz1kJsF4g0ikP+jekiB7POqt26mekiB7POqt26mekiB7POqt26mekiB7POqt26mekiB7POqt26mekiB7POqt27m7l+88VW/jM/v/c3DRfnW83BRvsNr3O0zFcjhcGgSyLPqz0Bb3Tw+E8g/BEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJBEImkEAgZAIJ+uX6nbvc2To8rP4MtHW2Dg/v+r2o/gwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADACfAHOmT+QCfwF2xk/oItEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkEAiZQAKBkAkkaBDIq34Zn9/7m4eL8q3n4aJ8h9e422cqkMPhcPdATuW6ebqq3rqbp6vqHba66q2bqR5SIPu86q2bqR5SIPu86q2bqR5SIPu86q2bqR5SIPu86q2bqR5SIPu86q2bqR5SIPu86q2bqR5ys0DW4bJ6624dLqt3EMh/1M/jr9VjbhKIN8iW90v11s10y/j9PRj0+IF4g2x443fVWzfTLdOX9YNuEIg3yHa3Tl9Ub93M2Tq81S3Tn+WjCmQfN49/vL1OD6q3bqpfrj8uH/bYgfiJtcmdr+MH1Tsfxfk8Pa0eVyCnfd0yPqne+Kj6dXq/X8aX1UML5LSum8cX5/P1e9X7bqZbhsfdPH7Tz+NN9fgCubf3Y79MX/Xz9aPqXQEAAAAAAAAAAAAAAAAAAAAAAAC4p/4GbsstE5pG500AAAAASUVORK5CYII=) center no-repeat;right:24px;top:calc(-100% + 10px);background-size:72%}.ring-btn.download{top:10px;right:calc(100% + 8px);background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAIfUlEQVR4nO3dsY9cRx3A8aVDEcUhmigS0ZKwO2OgWCSofUQRSUUsmSARGjsFcmzvbx6mSnURsoKAxvwFcUsqulQoluBm1mvDEaFI0HCuaILkiyIRERIvxdm+0/ky3ntv5s3sb78fadrTzO7v6zd3e9YNBgAAAAAAAAAAAAAAAAAAAAAAAABaGc2byWjeTErvA6iGmcl5G9y7NrjF4WW8+4MJ05+U3h9QxNe3p8+a4N47GsajS24/O7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/q41ihrNm0mKp4cNcqP0WR4yXq6lKJ5I1lu6OCq7kaT5kdxBJDbIVjX3R2Q33Gk2bJCtdHG4RRXfoB9mgttLd7gHobi3bJAtM5OXrJ+eZulZZiYv2SBbNri30obhFia4vdI9PCLVNYvF6rqMl2ule3hEih/3slhpVjMs3cOx0ny4w2J1WRV/6DyaN5PyLxBrvVelT48H+F6EVWpV+b3HUcOdZsN6uVP6xWKt2fJyZ2U+GuCqxep7rdwHzDY050q/aKx1Wc250vPeivHTpvyLx9K8jJ82pee8EyJh5VorH8cDXLdY6deKXqs+z2jeTPjpFqvz8nJn5b4hX9b+/xTjcxJWu2W8XFuZH+V2sf97W/xaCmvZJder/4Q8BxuaofFyLfWvyrNWf5ng9vZvG2sYxnFsaDb3X5Du/32XtapLbtyPYrP0PFZv/xrWbLL0r7X4vgIAAAAAAAAAAAAAAAAAAAAAAAC9+D9LSihyqzoBkQAAAABJRU5ErkJggg==) center no-repeat;background-size:72%}.settings{top:calc(100% + 10px);right:24px;background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAMF0lEQVR4nO2dwVUjOxBFHQIheDO0lpPBOINPBpAAamVgZ8BkYDKADMyqxZmNycBkABnwF62eAWODW1KVqtTvnqPNn/mDHq6yuqSn6tkMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACoCOPdwni3KD0PAERhvJsb366Nb9/CWBvv5qXnBUBxjLfLpmtf3iXHm/HtW//f7LL0/AAownnnLoxvd/uJcWDszjt3UXq+ALDw44/7aXy7OSEx9sfmxx/3s/T8ASBhvnVne3VG1Gi69ma+dWel9QCQjebRtofqjIQkeWkebVtaFwBJ9Nu2J9UZsWOHbWGgjrBtG1NnxI4NtoWBePo6wy4ZE2Nv2CXqEyAS4+1lzjojpT4x3l6W/n0AMJvN+jqj6dpt6cQ4kChb1CegGMa7edO1d6UT4YREuUN9AtgY6gwJj1MjH7tQnwBajLeXhnbblnrsUJ+A7ITzjA1t8N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A5b/WBb0fi4wGlD1/j7mQyw1X8m6xtxj47Kbei1wWVbkVyfcNjQYQ9RDpetXtJjBWzoYBRTstXDhg6iqdlWDxs6yAaXbYXjDIDDhg57yEThsNVTdYPksofAhj5xNNrqYUMH7HDYVkyirR42dFCc885dSLPVc9nQYQ8BJyPBVo8uhUA0JW31sKEDNXB0gxxs9Vw2dGzbguxw2OpJR3+ecVX69wgqhq9bfcbVCTZ0wA2TbSU9OWAPASVhstVHrBqwoQNBMNnqT3ycQp0BBMJhq/96oM4ACmDqBvk+MWAPAfogt9XDhg5qILetHjZ0UB25bCuwoYOqibfVo0shmBAn2+phQwdT5phtBTZ0AAKfu0GiSyEAnxjs7qXnAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5OR/4y1hM1QUtO8AAAAASUVORK5CYII=) center no-repeat;background-size:72%;filter:grayscale(1);cursor:not-allowed;z-index:-1}.btn-hide>.ring-btn{top:5px!important;right:5px!important;opacity:0}';
            document.head.append(s);
            // Create music action bar
            let bar = document.createElement("div");
            bar.classList.add("player-bar");
            bar.innerHTML = '<img class="bar-cover">';
            document.querySelector(".mod_player").append(bar);

            imgLsr();

            let index = document.createElement("iframe");
            index.src = "/";
            index.setAttribute("id", "content");
            player.before(index);

            let pa = document.createElement("span");
            pa.classList.add("player-action", "show-player");
            document.body.append(pa);
            pa.addEventListener("click", hidePlayer);
            document.querySelector(".player-bar").classList.add("show-bar");
            let lrc_bar = document.createElement("div");
            lrc_bar.classList.add("lyric-bar");
            player.before(lrc_bar);
            let hm = document.createElement("div");
            hm.classList.add("hide-mouse");
            player.append(hm);
            hidePlayer();

            player.addEventListener("mousemove", () => {
                window.clearTimeout(hideMouse);
                document.querySelector(".hide-mouse").style.display = "none";
                hideMouse = setTimeout(() => {
                    document.querySelector(".hide-mouse").style.display = "";
                }, 5000);
            });

            // Switch transalte button and escape sercial char
            document.querySelector(".mod_song_info").addEventListener("click", e => {
                if (e.target.classList.contains("btn_lang")) setTimeout(escapChar, 10);
            });

            document.querySelector("audio").addEventListener("play", () => {
                setLrc();
                imgLsr();
                updateMediaInfo();
                escapChar();
                setDown();

                setTimeout(() => {
                    if (getPlayingSong().album.id != bodybg.id) {
                        let bg = document.body.style.backgroundColor;
                        bodybg.background = bg == bodybg.background ? "" : bg.replace(/rgba\((.+), (\d+|\d\+.\d+)\)/, "rgb($1)");
                        bodybg.album = getPlayingSong().album.id;
                        document.body.style.backgroundColor = bodybg.background;
                    }
                }, 100)
                document.title = document.querySelector(".player_music__info").innerText;
            });
        });

        // setLrc();

        if ('mediaSession' in navigator) {
            navigator.mediaSession.setActionHandler('play', () => document.querySelector("audio").play());
            navigator.mediaSession.setActionHandler('pause', () => document.querySelector("audio").pause());
            navigator.mediaSession.setActionHandler('seekbackward', () => {
                document.querySelector("audio").currentTime += 10;
            });
            navigator.mediaSession.setActionHandler('seekforward', () => {
                document.querySelector("audio").currentTime -= 10;
            });
            navigator.mediaSession.setActionHandler('previoustrack', () => {
                playNextSong(false);
            });
            navigator.mediaSession.setActionHandler('nexttrack', () => {
                playNextSong(true);
            });
        };
    } else {
        let s = document.createElement("style");
        s.innerHTML = 'li.top_nav__item:nth-child(3),.footer,.popup_guide,.btn_bottom_feedback,.btn_bottom_player {display: none;}';
        document.head.append(s);
    }
    // Your code here...
})();