Bilibili Evolved V2 Evolved

改善 Bilibili Evolved V2 样式,请在安装 Bilibili Evolved V2 后再下载使用本脚本

// ==UserScript==
// @name               Bilibili Evolved V2 Evolved
// @namespace          改善 Bilibili Evolved V2 样式和功能 by Tinhone
// @description        改善 Bilibili Evolved V2 样式,请在安装 Bilibili Evolved V2 后再下载使用本脚本
// @version            1.0.11
// @author             Tinhone
// @license            GPL-3.0
// @run-at             document-start
// @match              *://*.bilibili.com/*
// @grant              GM_addStyle
// @compatible         firefox V50+
// @compatible         edge V50+
// @compatible         chrome V50+
// @icon               data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAAXNSR0IArs4c6QAAAnxQTFRFAAAAAP//AID/AKr/AL//AMz/ALb/AMb/AKr/ALP/ALn/AL//ALH/ALb/ALv/AKr/AK//ALT/ALj/ALP/ALb/ALH/ALj/ALP/ALb/AK3/ALD/ALL/AK3/AK//ALL/ALT/ALP/ALX/AK7/ALP/ALT/ALD/ALT/ALH/ALP/AK//ALH/ALL/ALH/ALL/AK//ALX/ALT/ALL/ALT/ALL/ALT/ALb/ALL/BLP/BLT/BLH/ALH/BLP/ALT/BLX/BLH/ALT/ALL/ALP/A7T/A7P/ALT/ALH/A7L/A7P/ALD/A7T/A7H/A7L/ALD/ALP/A7H/A7L/ALL/AK//ALP/A7D/ALT/A7H/A7P/ALL/ArP/ArL/ALL/ALP/ALH/ArL/ArD/ArL/ALH/ArH/ArP/ArL/ArH/ALL/ArP/ArH/ArL/ArP/ArH/ArT/ArP/ArH/ArL/ArL/ArP/ArL/ArH/ArL/ArP/ArL/ArP/ArH/ArH/ArL/ArH/ArL/ArL/ArL/ArP/ArP/ArL/ArP/ArH/ArL/ArL/ArP/ArL/ArP/ArL/AbH/AbP/AbH/AbP/AbL/AbL/AbP/AbL/AbL/AbL/AbL/AbL/AbH/AbL/AbL/AbP/AbL/AbL/AbH/AbL/AbP/AbP/AbL/AbL/AbL/AbH/AbL/AbL/AbP/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W8SyQ6REBXh7hWwpy74jJcrBaxCyJSyrJyVWgtckZMtY9i0psRq8nx/h6vj88s9XkVjU19tLc2PkV8cXrt9vtgG4QGJzAMD6W11lVky41dqF1YdMVpbejieR5WD6jd9XZOskV7934Q78LCCRWvixn86VWH0SIutIpAUiqyVW74TIPhLpg0i2xOpK+LpuPDBhIG8d/8cJH1e0EqvngGft/KrMEEcBPVWw+SfzLXj9SRKrNaO4e6ljZ0VhAk3iyeKqevMN4LDUaip6KYWkm75kjf4he9Ej1ZFq6dWJLdkPqno7/opWtzpmS1cxjSsYBXbQuFkn6/TqVNcBl18myrsEwLYxilIvAn+rU714BLhnbB+GR3fbNQCfKaxmKofgMfoDuywfiFZazSwwugFYSimjnVv8+45GxSdk0ZaPSnU0rnDrtvIZcp6Qg+rcrxuF7AWWfaPO/fq4kD2vzqlXBphrMcuOkBKrwNsqZKkuePVGkwL7wXuTBBdZuJjk01nByyVBPQstiSocejCOBGVgTueQPI8fdIJ3jHxoe8EM9XSZOkwmU0dnZ6fomyNa8051nL8JxpXnf4mDatihmZg/oJbhueQv8yZUspnEigahhrHaKJqgpB/K2T6kQPRHnFDozHMURMGnZ68BbgjcbpfD4XCOTeS6B7997quWoytiKYRpKanpGQ3wcr6YrE+mIJ5ITzvGBlySlvR0eNeg/yi0NfCykmTabnDubqLQpnZ591WTdLPNABx7aDLclQT2HRSOqSs+fnuulH3Lt1WlUkTEQ+Y+Vr/GXkzvGcwAAAAASUVORK5CYII=
// ==/UserScript==

(function() {
    'use strict'
    GM_addStyle(`
        /* Bilibili Evolved 顶栏更新 */
        :root{ /* 减小高度 */
            --navbar-height: 36px !important;
        }
        div.custom-navbar-items>div.custom-navbar-item>.notify-count{ /* 美化一级元素上的消息数量提示 */
            font-size: 7pt !important;
            line-height: 10px !important;
        }
        div.custom-navbar-items>div.custom-navbar-item>.main-content{ /* 美化一级元素字体大小 */
            font-size: 9pt !important;
        }
        div.custom-navbar-items>div.custom-navbar-item.active>.main-content{ /* 美化当页面为对应一级元素时的字体大小 */
            font-size: 9.5pt !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=search] div.launch-bar{ /* 美化搜索框 */
            border-radius: 4px !important;
            height: 22px !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=search] div.launch-bar i.be-icon.be-iconfont-right-arrow{ /* 美化搜索框右箭头图标 */
            --size: 15px !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo] div.user-face-container{ /* 缩小头像大小 */
            height: calc(var(--navbar-height) - 12px) !important;
            width: calc(var(--navbar-height) - 12px) !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo] div.user-face-container img.user-face { /* 头像框偏移适配-头像 */
            transform: initial !important;
            z-index: initial !important;
            opacity: initial !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo] div.user-face-container img.user-pendant { /* 头像框偏移适配-头像框 */
            transform: translate(-50%, -50%) !important;
            left: 50% !important;
            top: 50% !important;
            z-index: initial !important;
            opacity: 0 !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo]:hover div.user-face-container { /* 头像框偏移适配-头像和头像框 */
            transform: scale(2) translateY(10px);
            z-index: 100;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo]:hover div.user-face-container img.user-face { /* 头像框偏移适配-头像 */
            transform: initial !important;
            z-index: initial !important;
            opacity: initial !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo]:hover div.user-face-container img.user-pendant { /* 头像框偏移适配-头像框 */
            transform: translate(-50%, -50%) !important;
            z-index: initial !important;
            opacity: 1 !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=userInfo] div.user-info-panel>div.logged-in>a.name { /* 缩小昵称和头像间隔 */
            margin: calc(var(--navbar-height) * 0.5 + 37px) 0 0 0;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=messages] div.messages-popup>div.message-entry>a::after{ /* 美化"消息"二级菜单的消息数量提示 */
            padding: 3px 8px !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=upload] div.navbar-upload>div.navbar-upload-name{ /* 美化"投稿"字体大小 */
            font-size: 9.5pt !important;
        }
        div.custom-navbar-items>div.custom-navbar-item[data-name=upload] div.navbar-upload>i.be-icon.be-iconfont-upload{ /* 美化"投稿"图标大小 */
            --size: 15px !important;
        }

        /* Bilibili Evolved 侧栏更新 */
        .settings-panel-popup .settings-panel .component-detail-panel{
            height: calc(100% + 1px) !important;
            border-radius: 0px 8px 8px 0px !important;
        }
        html body div.be-settings div.be-popup.settings-panel-popup div.settings-panel div.settings-panel-content div.be-popup.component-detail-panel.open div.component-detail div.component-detail-description{
            padding-bottom: 64px !important;
        }
        html body div.be-settings div.be-popup.widgets-panel-popup div.widgets-panel div.widget-items div.be-button:not(div.be-check-box){ /* 功能栏按钮 */
            border-radius: 8px !important;
            padding: 8px 12px 8px 8px !important;
            box-shadow: none !important;
            border: 2px solid rgba(136, 136, 136, 0.2) !important;
            outline: 0px solid var(--theme-color-20) !important;
            transition: 0.2s ease-out;
        }
        html body div.be-settings div.be-popup.widgets-panel-popup div.widgets-panel div.widget-items div.be-button:not(div.be-check-box):active:focus-within{ /* 功能栏按钮 */
            box-shadow: none !important;
            border: 2px solid var(--theme-color)!important;
            outline: 3px solid var(--theme-color-20) !important;
        }
        html body div.be-settings div.be-popup.widgets-panel-popup div.widgets-panel div.widget-items div.be-button:not(div.be-check-box):hover{ /* 功能栏按钮 */
            box-shadow: none !important;
            border: 2px solid var(--theme-color) !important;
        }
        html body div.be-settings div.be-popup.widgets-panel-popup div.widgets-panel div.widget-items div.bvid-convert.widget-item{
            border-radius: 8px !important;
            padding: 8px 8px 8px 11px !important;
            line-height: 20px !important;
            box-shadow: none !important;
            border: 2px solid rgba(136, 136, 136, 0.2) !important;
        }
        html body div.be-settings div.be-popup.widgets-panel-popup .widgets-panel .widget-items .multiple-widgets{
            gap: 10px !important;
        }
        html body div.be-settings div.be-popup.widgets-panel-popup .widgets-panel .widget-items{
            gap: 10px !important;
        }

        /* 旧版评论区更新 */
        div.bb-comment div.bili-avatar-pendent-dom>img.bili-avatar-img{ /* 禁止评论区里的头像框动画 */
            -webkit-animation: none !important;
            -moz-animation: none !important;
            animation: none !important;
        }
        div.bb-comment div.info>span.reply.btn-hover{ /* 美化[回复]按钮 */
            height: 16px !important;
            padding-top: 2px !important;
            padding-bottom: 2px !important;
        }
        div.bb-comment div.reply-notice{ /* 禁止顶部横幅 */
            display: none !important;
        }
        div.bb-comment div.comment-send-lite{ /* 隐藏底部回复栏 */
            display: none !important;
        }

        /* 新版评论区更新 */
        div.bili-comment div.reply-notice{ /* 禁止顶部横幅 */
            display: none !important;
        }
        div.bili-comment>div.comment-container>div.reply-warp>div.fixed-reply-box{ /* 隐藏底部回复栏 */
            display: none !important;
        }

        /* 旧版动态首页更新 */
        div.bili-dyn-version-control>div.bili-dyn-version-control__reminding{ /* 隐藏在新版入口旁边闪烁的提示 */
            display: none !important;
        }

        /* 旧版动态更新 */
        html>body>div#app>div.content{ /* 增加动态卡片宽度 */
            width: 930px !important;
        }
        html>body>div#app>div.content div.bili-dyn-item__body>div.bili-dyn-content{ /* 增加动态卡片宽度 */
            width: 830px !important;
        }
        html>body>div#app>div.content div.bili-dyn-item__body div.bili-dyn-content__orig__major{ /* 增加动态卡片中包含的转发动态宽度 */
            width: 818px !important;
        }
        html>body>div#app>div.content div.bili-dyn-item__body div.bili-dyn-content__orig__additional{ /* 增加动态卡片中包含的转发动态宽度 */
            width: 818px !important;
        }
        html>body>div#app>div.content div.bili-dyn-content__orig>div.bili-dyn-content__orig__desc{ /* 改为适合的鼠标指针样式 */
            cursor: auto !important;
        }

        /* 新版动态更新 */
        html>body>div#app>div.opus-detail{ /* 增加动态卡片宽度 */
            width: 930px !important;
        }
        html>body>div#app>div.opus-detail>div.right-sidebar-wrap{ /* 增加右侧边栏 margin 距离 */
            margin-left: 942px !important;
        }
    `)
})()