Greasy Fork is available in English.

清酒踏月(开心音乐)播放器美化

去掉广告和无用按钮,仅保留歌单和搜索

Από την 26/12/2020. Δείτε την τελευταία έκδοση.

// ==UserScript==
// @name         清酒踏月(开心音乐)播放器美化
// @namespace    http://tampermonkey.net/
// @version      0.4.4
// @description  去掉广告和无用按钮,仅保留歌单和搜索
// @author       AN drew
// @match        *://music.lkxin.cn/*
// @match        *://www.kxmusic.cn/*
// @match        *://newapi.lkxin.cn/1pc.html
// @grant        GM_addStyle
// @require      https://lib.baomitu.com/jquery/3.4.1/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';

    $("a").each(function(){
        if($(this).attr("title")!=undefined && ($(this).attr("title").indexOf("上一首") > -1 || $(this).attr("title").indexOf("暂停/继续") > -1 || $(this).attr("title").indexOf("下一首") > -1 || $(this).attr("title").indexOf("循环控制") > -1 || $(this).attr("title").indexOf("静音") > -1 ))
            return true;
        else if($(this).parent().prop("tagName")=="li")
            return true;
        else
            $(this).attr("style","display:none")
    })

    $("span").each(function(){

        if($(this).attr("title")!=undefined && ($(this).attr("title").indexOf("音乐播放列表") > -1 || $(this).attr("title").indexOf("正在播放列表") > -1 || $(this).attr("title").indexOf("点击搜索音乐") > -1 || $(this).attr("title").indexOf("更多") > -1))
            return true;
        else if($(this).attr("class")=="music-album" || $(this).attr("class")=="auth-name" || $(this).attr("class")=="music-name" || $(this).attr("class")=="list-num" || $(this).attr("class")=="list-mobile-menu" || $(this).attr("class")=="music-name-cult")
            return true;
        else
            $(this).attr("style","display:none")
    })

    $(".dropdown-toggle").css({"display":"block","color":"white"})
    $(".dropdown-toggle").text("快捷键")
    $(".dropdown-toggle").attr("title","快捷键")
    $(".dropdown").parent().attr("title","快捷键")

    $(".layui-layer-shade").hide()
    $("#layui-layer1").hide()
    $("#messageBoardContainer").hide();

    GM_addStyle('.btn{z-index:100}');

    for(var i=0; i<7; i++)
        $(".dropdown-menu").children().first().remove()
    $(".dropdown-menu").find("a").each(function(){
        $(this).attr("style","display:block")
        if($(this).text().indexOf("电脑操作快捷键")>-1)
           $(this).css({"text-align":"center","background":"#f5f5f5"})
    })

    setInterval(function(){
        $(".logo").remove()
        $(".marquee").remove()
        $(".mask").remove()
        $(".pcd_ad").remove()
        $(".mbd_ad").remove()
        $("#blur-img").remove()
        $('.btn[data-action="what"]').hide();
    },1)

})();