Bilibili Evolved V2 Evolved

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

  1. // ==UserScript==
  2. // @name Bilibili Evolved V2 Evolved
  3. // @namespace A user script about something
  4. // @description 增强 Bilibili Evolved V2 样式,请在安装 Bilibili Evolved V2 后再下载使用本脚本
  5. // @version 1.1.1
  6. // @author Tinhone
  7. // @license MIT
  8. // @run-at document-start
  9. // @match *://*.bilibili.com/*
  10. // @grant GM_addStyle
  11. // @grant GM_setValue
  12. // @grant GM_getValue
  13. // @grant GM_registerMenuCommand
  14. // @compatible firefox V50+
  15. // @compatible edge V50+
  16. // @compatible chrome V50+
  17. // @icon data:image/png;base64,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
  18. // ==/UserScript==
  19.  
  20. (function () {
  21. 'use strict'
  22.  
  23. GM_addStyle(`
  24. /********** Bilibili Evolved 顶栏更新 **********/
  25.  
  26. /* 减小高度 */
  27. :root {
  28. --navbar-height: 36px !important;
  29. }
  30.  
  31. /* 原版顶栏高度适配,#biliMainHeader 重复是为了 CSS 优先级 */
  32. body > #biliMainHeader#biliMainHeader,
  33. #app > #biliMainHeader#biliMainHeader {
  34. height: initial !important;
  35. max-height: initial !important;
  36. min-height: var(--navbar-height) !important;
  37. }
  38.  
  39. /* 美化一级元素上的消息数量提示 */
  40. .custom-navbar-items > .custom-navbar-item > .notify-count {
  41. font-size: 7pt !important;
  42. line-height: 10px !important;
  43. }
  44.  
  45. /* 美化一级元素字体大小 */
  46. .custom-navbar-items > .custom-navbar-item > .main-content {
  47. font-size: 9pt !important;
  48. }
  49.  
  50. /* 美化当页面为对应一级元素时的字体大小 */
  51. .custom-navbar-items > .custom-navbar-item.active > .main-content {
  52. font-size: 9.5pt !important;
  53. }
  54.  
  55. /* 美化搜索框 */
  56. .custom-navbar-items > .custom-navbar-item[data-name=search] .launch-bar {
  57. border-radius: 4px !important;
  58. height: 23px !important;
  59. }
  60.  
  61. /* 美化搜索框右箭头图标 */
  62. .custom-navbar-items > .custom-navbar-item[data-name=search] .launch-bar .be-icon.be-iconfont-right-arrow {
  63. --size: 15px !important;
  64. }
  65.  
  66. /* 缩小头像大小,调整头像动画 */
  67. .custom-navbar-items > .custom-navbar-item[data-name=userInfo] .user-face-container {
  68. height: calc(var(--navbar-height) - 12px);
  69. width: calc(var(--navbar-height) - 12px);
  70. transition: transform 230ms cubic-bezier(0, 0.3, 0.3, 0.95) 0.2s;
  71. z-index: 100;
  72. }
  73.  
  74. /* 头像框偏移适配-头像 */
  75. .custom-navbar-items > .custom-navbar-item[data-name=userInfo] .user-face-container .user-face {
  76. transform: initial;
  77. z-index: initial;
  78. opacity: initial;
  79. }
  80.  
  81. /* 头像框偏移适配-头像框 */
  82. .custom-navbar-items > .custom-navbar-item[data-name=userInfo] .user-face-container .user-pendant {
  83. transform: translate(-50%, -50%);
  84. left: 50%;
  85. top: 50%;
  86. z-index: initial;
  87. opacity: 0;
  88. }
  89.  
  90. /* 头像框偏移适配-头像和头像框 */
  91. .custom-navbar-items > .custom-navbar-item[data-name=userInfo]:hover .user-face-container {
  92. transform: scale(2) translateY(10px);
  93. }
  94.  
  95. /* 头像框偏移适配-头像 */
  96. .custom-navbar-items > .custom-navbar-item[data-name=userInfo]:hover .user-face-container .user-face {
  97. transform: initial;
  98. z-index: initial;
  99. opacity: initial;
  100. }
  101.  
  102. /* 头像框偏移适配-头像框 */
  103. .custom-navbar-items > .custom-navbar-item[data-name=userInfo]:hover .user-face-container .user-pendant {
  104. transform: translate(-50%, -50%);
  105. z-index: initial;
  106. opacity: 1;
  107. }
  108.  
  109. /* 缩小昵称和头像间隔 */
  110. .custom-navbar-items > .custom-navbar-item[data-name=userInfo] .user-info-panel > .logged-in > .name {
  111. margin: calc(var(--navbar-height) * 0.5 + 37px) 0 0 0 !important;
  112. }
  113.  
  114. /* 美化“消息”二级菜单的消息数量提示 */
  115. .custom-navbar-items > .custom-navbar-item[data-name=messages] .messages-popup > .message-entry > a::after {
  116. padding: 3px 8px !important;
  117. }
  118.  
  119. /* 美化“投稿”字体大小 */
  120. .custom-navbar-items > .custom-navbar-item[data-name=upload] .navbar-upload > .navbar-upload-name {
  121. font-size: 9.5pt !important;
  122. }
  123.  
  124. /* 美化“投稿”图标大小 */
  125. .custom-navbar-items > .custom-navbar-item[data-name=upload] .navbar-upload > .be-icon.be-iconfont-upload {
  126. --size: 15px !important;
  127. }
  128.  
  129. /* 告知浏览器变化 */
  130. .custom-navbar-items:hover > .custom-navbar-item {
  131. will-change: background-color !important;
  132. }
  133.  
  134. /* 告知浏览器变化 */
  135. .custom-navbar-items:hover > .custom-navbar-item > .popup-container {
  136. will-change: top !important;
  137. }
  138.  
  139. /* 告知浏览器变化 */
  140. .custom-navbar-items:hover > .custom-navbar-item > .popup-container > .popup.no-padding {
  141. will-change: opacity !important;
  142. }
  143.  
  144. /* 告知浏览器变化 */
  145. .custom-navbar-items:hover > .custom-navbar-item .launch-bar {
  146. will-change: opacity !important;
  147. }
  148.  
  149. /* 告知浏览器变化 */
  150. .custom-navbar-items:hover > .custom-navbar-item .launch-bar-suggest-list {
  151. will-change: opacity, transform !important;
  152. }
  153.  
  154.  
  155. /********** Bilibili Evolved 侧栏更新 **********/
  156.  
  157. /* 组件详情面板 */
  158. .be-settings > .settings-panel-popup > .settings-panel .component-detail-panel {
  159. height: calc(100% + 1px) !important;
  160. border-radius: 0px 8px 8px 0px !important;
  161. }
  162.  
  163. .be-settings > .settings-panel-popup > .settings-panel .component-detail > .component-detail-description {
  164. padding-bottom: 64px !important;
  165. }
  166.  
  167. /* 功能栏按钮 */
  168. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items .be-button:not(.be-check-box) {
  169. border-radius: 8px !important;
  170. padding: 8px 12px 8px 8px !important;
  171. box-shadow: none !important;
  172. border: 2px solid rgba(136, 136, 136, 0.2) !important;
  173. outline: 0px solid var(--theme-color-20) !important;
  174. transition: 0.2s all ease-out !important;
  175. }
  176.  
  177. /* 功能栏按钮 */
  178. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items .be-button:not(.be-check-box):active:focus-within {
  179. box-shadow: none !important;
  180. border: 2px solid var(--theme-color) !important;
  181. outline: 3px solid var(--theme-color-20) !important;
  182. }
  183.  
  184. /* 功能栏按钮 */
  185. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items .be-button:not(.be-check-box):hover {
  186. box-shadow: none !important;
  187. border: 2px solid var(--theme-color) !important;
  188. }
  189.  
  190. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items .bvid-convert.widget-item {
  191. border-radius: 8px !important;
  192. padding: 8px 8px 8px 11px !important;
  193. line-height: 20px !important;
  194. box-shadow: none !important;
  195. border: 2px solid rgba(136, 136, 136, 0.2) !important;
  196. }
  197.  
  198. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items .be-dev-client.widget-item {
  199. border-radius: 8px !important;
  200. padding: 8px 8px 8px 11px !important;
  201. line-height: 20px !important;
  202. box-shadow: none !important;
  203. border: 2px solid rgba(136, 136, 136, 0.2) !important;
  204. }
  205.  
  206. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items .multiple-widgets {
  207. gap: 10px !important;
  208. }
  209.  
  210. .be-settings > .widgets-panel-popup > .widgets-panel .widget-items {
  211. gap: 10px !important;
  212. }
  213.  
  214.  
  215. /********** 旧版评论区更新 **********/
  216.  
  217. /* 禁止评论区里的头像框动画 */
  218. .bb-comment .bili-avatar-pendent-dom > .bili-avatar-img {
  219. -webkit-animation: none !important;
  220. -moz-animation: none !important;
  221. -o-animation: none !important;
  222. animation: none !important;
  223. }
  224.  
  225. /* 美化[回复]按钮 */
  226. .bb-comment .info > .reply.btn-hover {
  227. height: 16px !important;
  228. padding-top: 2px !important;
  229. padding-bottom: 2px !important;
  230. }
  231.  
  232. /* 禁止顶部横幅 */
  233. .bb-comment .reply-notice {
  234. display: none !important;
  235. }
  236.  
  237. /* 隐藏底部回复栏 */
  238. .bb-comment .comment-send-lite {
  239. display: none !important;
  240. }
  241.  
  242.  
  243. /********** 新版评论区更新 **********/
  244.  
  245. /* 禁止顶部横幅 */
  246. .bili-comment .reply-notice {
  247. display: none !important;
  248. }
  249.  
  250. /* 隐藏底部回复栏 */
  251. .bili-comment > .comment-container > .reply-warp > .fixed-reply-box {
  252. display: none !important;
  253. }
  254.  
  255.  
  256. /********** 旧版动态首页更新 **********/
  257.  
  258. /* 隐藏在新版入口旁边闪烁的提示 */
  259. .bili-dyn-version-control > .bili-dyn-version-control__reminding {
  260. display: none !important;
  261. }
  262.  
  263.  
  264. /********** 旧版动态更新 **********/
  265.  
  266. /* 增加动态卡片宽度 */
  267. #app > .content {
  268. width: 930px !important;
  269. }
  270.  
  271. /* 增加动态卡片宽度 */
  272. #app > .content .bili-dyn-item__body > .bili-dyn-content {
  273. width: 830px !important;
  274. }
  275.  
  276. /* 增加动态卡片中包含的转发动态宽度 */
  277. #app > .content .bili-dyn-item__body .bili-dyn-content__orig__major {
  278. width: 818px !important;
  279. }
  280.  
  281. /* 增加动态卡片中包含的转发动态宽度 */
  282. #app > .content .bili-dyn-item__body .bili-dyn-content__orig__additional {
  283. width: 818px !important;
  284. }
  285.  
  286. /* 改为适合的鼠标指针样式 */
  287. #app > .content .bili-dyn-content__orig > .bili-dyn-content__orig__desc {
  288. cursor: auto !important;
  289. }
  290.  
  291.  
  292. /********** 新版动态更新 **********/
  293.  
  294. /* 增加动态卡片宽度 */
  295. #app > .opus-detail {
  296. width: 930px !important;
  297. }
  298.  
  299. /* 增加右侧边栏 margin 距离 */
  300. #app > .opus-detail > .right-sidebar-wrap {
  301. margin-left: 942px !important;
  302. }
  303.  
  304.  
  305. /********** 消息中心更新 **********/
  306.  
  307. /* 面板高度适配 */
  308. #message-navbar ~ .container {
  309. --animation-start: 300ms ease-out;
  310. --animation-end: 100ms ease-in;
  311. height: calc(100vh - var(--navbar-height)) !important;
  312. margin-top: var(--navbar-height) !important;
  313. }
  314.  
  315. /* 面板高度适配 */
  316. #message-navbar ~ .container > #link-message-container > .container {
  317. height: 100% !important;
  318. }
  319.  
  320. /* 面板右侧高度适配,height 随便填一个是 px 的值,剩下交给 flex-grow */
  321. #message-navbar ~ .container > #link-message-container .space-right-bottom.ps {
  322. height: 0px !important;
  323. flex-grow: 1 !important;
  324. }
  325.  
  326. /* 面板右侧高度适配 */
  327. #message-navbar ~ .container > #link-message-container .space-right-bottom.ps > .router-view > .d {
  328. --space-right-top-height: 42px;
  329. --padding: 10px;
  330. height: calc(100vh - var(--navbar-height) - var(--space-right-top-height) - var(--padding) * 3) !important;
  331. }
  332.  
  333. /* 面板左侧消息提醒优化 */
  334. #message-navbar ~ .container > #link-message-container .space-right-bottom.ps > .router-view > .d .list-item > .notify {
  335. background-color: var(--theme-color) !important;
  336. }
  337.  
  338. /* 面板左侧消息提醒数字优化 */
  339. #message-navbar ~ .container > #link-message-container .space-right-bottom.ps > .router-view > .d .list-item > .notify-number {
  340. padding: 1px 7px !important;
  341. font-size: 8px !important;
  342. line-height: 10px !important;
  343. border-radius: 5px !important;
  344. width: initial !important;
  345. height: initial !important;
  346. right: 9px !important;
  347. }
  348.  
  349. /* 面板左侧消息提醒圆点优化 */
  350. #message-navbar ~ .container > #link-message-container .space-right-bottom.ps > .router-view > .d .list-item > .notify-dot {
  351. width: 7px !important;
  352. height: 7px !important;
  353. top: 22px !important;
  354. right: 10px !important;
  355. }
  356.  
  357.  
  358. /* 面板左侧优化 */
  359. #message-navbar ~ .container > #link-message-container .side-bar > .list {
  360. display: flex !important;
  361. flex-direction: column !important;
  362. align-items: center !important;
  363. padding-left: 0 !important;
  364. }
  365.  
  366. /* 面板左侧优化 */
  367. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item {
  368. width: 100% !important;
  369. justify-content: center !important;
  370. transition: color var(--animation-end) !important;
  371. }
  372.  
  373. /* 面板左侧优化 */
  374. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item::before {
  375. display: none !important;
  376. }
  377.  
  378. /* 面板左侧优化 */
  379. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item > a {
  380. display: flex !important;
  381. width: 100% !important;
  382. height: 100% !important;
  383. flex: initial !important;
  384. -webkit-box-flex: initial !important;
  385. -ms-flex: initial !important;
  386. flex-direction: row !important;
  387. gap: 5px !important;
  388. padding-left: 0 !important;
  389. line-height: 12px !important;
  390. align-items: center !important;
  391. justify-content: center !important;
  392. transition: inherit;
  393. }
  394.  
  395. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item:hover,
  396. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item.active,
  397. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item:hover > a,
  398. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item.active > a {
  399. cursor: pointer;
  400. color: var(--theme-color) !important;
  401. transition: color var(--animation-start) !important;
  402. }
  403.  
  404. /* 面板左侧消息提醒优化 */
  405. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item > a > .notify {
  406. display: inline-block !important;
  407. position: static !important;
  408. margin-right: -4px !important;
  409. background-color: var(--theme-color) !important;
  410. margin-top: 1px !important;
  411. top: 0 !important;
  412. right: 0 !important;
  413. }
  414.  
  415. /* 面板左侧消息提醒数字优化 */
  416. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item > a > .notify-number {
  417. padding: 1px 8px !important;
  418. font-size: 10px !important;
  419. line-height: 12px !important;
  420. border-radius: 6px !important;
  421. width: initial !important;
  422. height: initial !important;
  423. }
  424.  
  425. /* 面板左侧消息提醒圆点优化 */
  426. #message-navbar ~ .container > #link-message-container .side-bar > .list > .item > a > .notify-dot {
  427. width: 7px !important;
  428. height: 7px !important;
  429. }
  430.  
  431. #message-navbar ~ .container > #link-message-container .side-bar > .divided-line {
  432. display: none !important;
  433. }
  434.  
  435. /* 面板左侧“消息设置”优化 */
  436. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item {
  437. flex-direction: column !important;
  438. margin-top: 18px !important;
  439. padding-left: 0 !important;
  440. transition: color var(--animation-end) !important;
  441. }
  442.  
  443. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item > a {
  444. width: 100% !important;
  445. text-align: center !important;
  446. transition: inherit !important;
  447. }
  448.  
  449. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item:hover,
  450. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item.active,
  451. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item:hover > a,
  452. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item.active > a {
  453. cursor: pointer !important;
  454. color: var(--theme-color) !important;
  455. transition: color var(--animation-start) !important;
  456. }
  457.  
  458. /* 面板左侧“消息中心”“消息设置”图标优化 */
  459. #message-navbar ~ .container > #link-message-container .side-bar > .title > .air-craft,
  460. #message-navbar ~ .container > #link-message-container .side-bar > .setting.item > a > .setting-icon {
  461. margin-right: 8px !important;
  462. }
  463. `)
  464.  
  465. if (GM_getValue('isAdjustFreshHome') === undefined) {
  466. GM_setValue('isAdjustFreshHome', false)
  467. }
  468.  
  469. if (GM_getValue('isAdjustFreshHome') && window.location.href === 'https://www.bilibili.com/') {
  470. const callback = (mutationList, observer) => {
  471. for (let i = mutationList.length - 1; i >= 0; --i) {
  472. const mutation = mutationList[i]
  473. if (mutation.target.nodeName !== 'BODY') {
  474. continue
  475. }
  476. Object.defineProperty(mutation.target, 'scrollHeight', {
  477. value: 100000,
  478. writable: false,
  479. });
  480. observer.disconnect()
  481. break
  482. }
  483. }
  484.  
  485. const target = document.childNodes[1]
  486.  
  487. const options = {
  488. subtree: true,
  489. childList: true,
  490. }
  491.  
  492. const theObserver = new MutationObserver(callback)
  493. theObserver.observe(target, options)
  494. }
  495.  
  496. const deleteOld = () => {
  497. window.alert('请删除那个没有菜单选项的同名老脚本,原因是可能会导致功能冲突')
  498. }
  499. const openBilibiliEvolvedHomePage = () => {
  500. window.open('https://github.com/the1812/Bilibili-Evolved', '_blank')
  501. }
  502.  
  503. GM_registerMenuCommand('请删除那个没有菜单选项的同名老脚本,原因是可能会导致功能冲突', deleteOld)
  504. GM_registerMenuCommand('访问 Bilibili Evolved 仓库主页', openBilibiliEvolvedHomePage)
  505. })()

QingJ © 2025

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