BiliBili屏蔽广告与无用板块

自定义去除你想要去除的首页模块!正在整个脚本推翻重写,只画了页面,暂无实际功能

// ==UserScript==
// @name         BiliBili屏蔽广告与无用板块
// @namespace    http://mikochen.cn
// @version      1.0-dev
// @description  自定义去除你想要去除的首页模块!正在整个脚本推翻重写,只画了页面,暂无实际功能
// @author       miko-chen
// @match        https://www.bilibili.com/
// @grant        none
// @require      https://cdn.jsdelivr.net/npm/jquery@2.2.3/dist/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';

    $(function(){


        //原有右侧导航栏内容
        let sortableArrays = $(".item.sortable");
        //sortableArrays.remove();
        //左侧内容区各模块标题
        let proxyBox = $(".proxy-box div div div header .l-con .name");
        //获取排序按钮
        let sort = $(".elevator .list-box .sort")
        //sort.css("margin-top","30px");
        //添加删除模块按钮
        sort.before($("<div class='item removeMoudles' style='color:red;margin-top: 5px;'></div>").text("删除模块"))


        //创建删除模块面板
        let removePanel = $("<div class='removePanel'></div>")
        removePanel.css({

            "position":"absolute",
            "width":"82px",
            "top":"0px",
            "right":"70px",
            "background":"#fafafa",
            "border":"1px solid ##e7e7e7",
            "border-radius":"10px",
            "line-height":"24px"
        });
        //插入左侧内容区标题
        let newSortableNum = proxyBox.length;
        for(let i = 0 ; i < newSortableNum ; i++){
            let sa = $("<div class='item sortable'></div>").text(proxyBox[i].innerHTML)
            sa.css({
                "text-align":"center",
                "width":"80px",
                "margin-left":"1px",
                "cursor":"pointer",
                "margin-bottom":"2px",
                "border-radius":"10px",
                "background":"white"
            })
            sa.hover(()=>{
                sa.css({"background":"#00a1d6","color":"white"})
            },()=>{
                sa.css({"background":"white","color":"black"})
            })
            sa.append($("<div class='item removeMoudleX' style='float:right;color:red;display:inline-block'></div>").text("×"))
            removePanel.append(sa)
        }
        //将面板加入右侧导航栏
        $("#elevator").append(removePanel);


        let dd=0;
        $(".removePanel").css("display","none")
        //排序按钮事件
        $(".removeMoudles").click(function(){
            if(removePanel.css("display")=="none"){
                $(".removePanel").css("display","block")
            }else{
                $(".removePanel").css("display","none");
            }
        });



    })





})();