From bdf7cb7dba35f6387c7c714c556f707c33f786e6 Mon Sep 17 00:00:00 2001 From: the1812 Date: Mon, 12 Feb 2024 23:28:09 +0800 Subject: [PATCH 01/25] Fix empty content (fix #4629) --- src/components/video/xml-utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/video/xml-utils.ts b/src/components/video/xml-utils.ts index 9b5faceae8..713f9d178e 100644 --- a/src/components/video/xml-utils.ts +++ b/src/components/video/xml-utils.ts @@ -7,6 +7,9 @@ const normalizeMap = { } const escapeMap = Object.fromEntries(Object.entries(normalizeMap).map(entry => entry.reverse())) const replace = (content: string, map: Record) => { + if (!content) { + return '' + } for (const [key, value] of Object.entries(map)) { content = content.replace(new RegExp(key, 'g'), value) } From 8f010ecc8ac137dc0915d7a43dc47ff60b695631 Mon Sep 17 00:00:00 2001 From: the1812 Date: Wed, 14 Feb 2024 11:54:45 +0800 Subject: [PATCH 02/25] Add player pause event --- src/components/video/player-agent/base.ts | 66 ++++++++++++----------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/src/components/video/player-agent/base.ts b/src/components/video/player-agent/base.ts index ddd94f41bc..47fbf83602 100644 --- a/src/components/video/player-agent/base.ts +++ b/src/components/video/player-agent/base.ts @@ -33,6 +33,7 @@ export const click = (target: ElementQuery) => { export enum PlayerAgentEventTypes { Play = 'play', + Pause = 'pause', } export abstract class PlayerAgent extends EventTarget @@ -128,59 +129,64 @@ export abstract class PlayerAgent return unsafeWindow.nano } + get nanoTypeMap(): Record { + return { + [PlayerAgentEventTypes.Play]: this.nanoApi.EventType.Player_Play, + [PlayerAgentEventTypes.Pause]: this.nanoApi.EventType.Player_Pause, + } + } + private eventHandlerMap = new Map< EventListenerOrEventListenerObject, { - handler: () => void + handler: EventListener options: boolean | AddEventListenerOptions } >() addEventListener( type: `${PlayerAgentEventTypes}`, - callback: EventListenerOrEventListenerObject, + callback: EventListener, options?: boolean | AddEventListenerOptions, ): void { super.addEventListener(type, callback, options) - switch (type) { - default: { - break - } - case PlayerAgentEventTypes.Play: { - const handler = () => { - this.dispatchEvent(new Event(PlayerAgentEventTypes.Play)) - } - if (typeof options === 'object' && options.once) { - this.nativeApi.once(this.nanoApi.EventType.Player_Initialized, handler) - } else { - this.nativeApi.on(this.nanoApi.EventType.Player_Initialized, handler) - } - this.eventHandlerMap.set(callback, { - handler, - options, - }) + const registerHandler = (nanoType: string) => { + if (typeof options === 'object' && options.once) { + this.nativeApi.once(nanoType, callback) + } else { + this.nativeApi.on(nanoType, callback) } + this.eventHandlerMap.set(callback, { + handler: callback, + options, + }) + } + const nanoType = this.nanoTypeMap[type] + if (!nanoType) { + console.warn('[PlayerAgent] unknown event type', type) + return } + registerHandler(nanoType) } removeEventListener( type: `${PlayerAgentEventTypes}`, - callback: EventListenerOrEventListenerObject, + callback: EventListener, options?: boolean | EventListenerOptions, ): void { super.removeEventListener(type, callback, options) - switch (type) { - default: { - break - } - case PlayerAgentEventTypes.Play: { - const handlerData = this.eventHandlerMap.get(callback) - if (!handlerData || lodash.isEqual(options, handlerData.options)) { - break - } - this.nativeApi.off(this.nanoApi.EventType.Player_Initialized, handlerData.handler) + const unregisterHandler = (nanoType: string) => { + const handlerData = this.eventHandlerMap.get(callback) + if (!handlerData || lodash.isEqual(options, handlerData.options)) { + return } + this.nativeApi.off(nanoType, handlerData.handler) + } + const nanoType = this.nanoTypeMap[type] + if (!nanoType) { + return } + unregisterHandler(nanoType) } /** 获取是否静音 */ From 249e13f63acd321d8f97bb9116c48a37dbc8636f Mon Sep 17 00:00:00 2001 From: the1812 Date: Wed, 14 Feb 2024 14:52:57 +0800 Subject: [PATCH 03/25] Use PlayerAgent to remove cover (fix #4491) --- .../components/video/player/show-cover/index.ts | 14 +++++--------- src/components/video/player-agent/base.ts | 6 ++---- src/components/video/player-agent/index.ts | 2 ++ src/components/video/player-agent/types.ts | 5 +++++ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/registry/lib/components/video/player/show-cover/index.ts b/registry/lib/components/video/player/show-cover/index.ts index cdd0a5b835..c7a060836f 100644 --- a/registry/lib/components/video/player/show-cover/index.ts +++ b/registry/lib/components/video/player/show-cover/index.ts @@ -1,21 +1,17 @@ import { defineComponentMetadata } from '@/components/define' +import { playerAgent, PlayerAgentEventTypes } from '@/components/video/player-agent' import { videoChange, VideoChangeCallback } from '@/core/observer' -import { createHook } from '@/core/utils' import { playerUrls } from '@/core/utils/urls' const entry = async () => { let lastAid: string const removeCover = () => document.documentElement.style.removeProperty('--cover-url') videoChange(() => { - console.debug('isBpxPlayer') - const currentBpxVideo = dq('.bpx-player-video-wrap video') as HTMLVideoElement - if (!currentBpxVideo) { - console.warn('bpx player not found') - return - } - createHook(currentBpxVideo, 'play', () => { + playerAgent.addEventListener(PlayerAgentEventTypes.Pause, () => { + removeCover() + }) + playerAgent.addEventListener(PlayerAgentEventTypes.Play, () => { removeCover() - return true }) }) const showCover: VideoChangeCallback = async ({ aid }) => { diff --git a/src/components/video/player-agent/base.ts b/src/components/video/player-agent/base.ts index 47fbf83602..6638c3032c 100644 --- a/src/components/video/player-agent/base.ts +++ b/src/components/video/player-agent/base.ts @@ -8,6 +8,7 @@ import { PlayerQuery, CustomQuery, CustomQueryProvider, + PlayerAgentEventTypes, } from './types' export const elementQuery = (selector: string): ElementQuery => { @@ -31,10 +32,6 @@ export const click = (target: ElementQuery) => { return button } -export enum PlayerAgentEventTypes { - Play = 'play', - Pause = 'pause', -} export abstract class PlayerAgent extends EventTarget implements EnumEventTarget<`${PlayerAgentEventTypes}`> @@ -149,6 +146,7 @@ export abstract class PlayerAgent callback: EventListener, options?: boolean | AddEventListenerOptions, ): void { + console.log('addEventListener', type, callback, options) super.addEventListener(type, callback, options) const registerHandler = (nanoType: string) => { if (typeof options === 'object' && options.once) { diff --git a/src/components/video/player-agent/index.ts b/src/components/video/player-agent/index.ts index 04c2a314fb..d68b110e63 100644 --- a/src/components/video/player-agent/index.ts +++ b/src/components/video/player-agent/index.ts @@ -2,6 +2,8 @@ import { bangumiUrls, matchCurrentPage } from '@/core/utils/urls' import { BangumiPlayerAgent } from './bangumi-player' import { VideoPlayerBpxAgent } from './video-player' +export * from './types' + export const playerAgent = (() => { if (matchCurrentPage(bangumiUrls)) { return new BangumiPlayerAgent() diff --git a/src/components/video/player-agent/types.ts b/src/components/video/player-agent/types.ts index b91edd5532..4b47de080d 100644 --- a/src/components/video/player-agent/types.ts +++ b/src/components/video/player-agent/types.ts @@ -65,3 +65,8 @@ export interface PlayerQuery extends CustomNestedQuery danmakuTipLayer: QueryResult danmakuSwitch: QueryResult } + +export enum PlayerAgentEventTypes { + Play = 'play', + Pause = 'pause', +} From 74609a19711400346ea110ae52cbc20a9e67f78a Mon Sep 17 00:00:00 2001 From: the1812 Date: Fri, 16 Feb 2024 15:07:54 +0800 Subject: [PATCH 04/25] Remove log --- src/components/video/player-agent/base.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/video/player-agent/base.ts b/src/components/video/player-agent/base.ts index 6638c3032c..6283bb7625 100644 --- a/src/components/video/player-agent/base.ts +++ b/src/components/video/player-agent/base.ts @@ -146,7 +146,6 @@ export abstract class PlayerAgent callback: EventListener, options?: boolean | AddEventListenerOptions, ): void { - console.log('addEventListener', type, callback, options) super.addEventListener(type, callback, options) const registerHandler = (nanoType: string) => { if (typeof options === 'object' && options.once) { From a0f2ff16a7b179cac19b5f4d6d025a3612191399 Mon Sep 17 00:00:00 2001 From: the1812 Date: Tue, 27 Feb 2024 09:02:24 +0800 Subject: [PATCH 05/25] Fix suggest item overflow (fix #4464) --- src/components/bisector/index.ts | 2 +- src/components/launch-bar/ActionItem.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/bisector/index.ts b/src/components/bisector/index.ts index fe5438e4c3..7fda4fffb1 100644 --- a/src/components/bisector/index.ts +++ b/src/components/bisector/index.ts @@ -31,7 +31,7 @@ export const component = defineComponentMetadata({ getActions: async () => [ { name: '开始 / 继续组件二等分', - description: 'Start/Continue component bisection', + description: 'Start / Continue component bisection', icon: 'mdi-view-split-horizontal', action: async () => { const bisector = await import('./api') diff --git a/src/components/launch-bar/ActionItem.vue b/src/components/launch-bar/ActionItem.vue index 962b0cf121..7baa4e5317 100644 --- a/src/components/launch-bar/ActionItem.vue +++ b/src/components/launch-bar/ActionItem.vue @@ -24,7 +24,7 @@
{{ action.displayName || action.name }}
-
+
{{ action.description }}
@@ -111,6 +111,7 @@ export default Vue.extend({ &-description { opacity: 0.5; font-size: smaller; + @include single-line(); } &-delete { opacity: 0.5; From 95498c074cb86c496cf7cc645f30759c57cdd195 Mon Sep 17 00:00:00 2001 From: Waua Date: Mon, 26 Feb 2024 21:28:56 +0800 Subject: [PATCH 06/25] Fix toggleLight --- src/components/video/player-agent/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/video/player-agent/base.ts b/src/components/video/player-agent/base.ts index ddd94f41bc..7d9582b3b3 100644 --- a/src/components/video/player-agent/base.ts +++ b/src/components/video/player-agent/base.ts @@ -97,11 +97,11 @@ export abstract class PlayerAgent } // 关灯状态 && 要开灯 -> 开灯 if (on && isCurrentLightOff) { - this.nativeApi.setLightOff(true) + this.nativeApi.setLightOff(false) return true } if (!on && !isCurrentLightOff) { - this.nativeApi.setLightOff(false) + this.nativeApi.setLightOff(true) return false } return null From b5dfbcc45517b5bb0f4bad89fa373216d86525f3 Mon Sep 17 00:00:00 2001 From: sunfkny <30853461+sunfkny@users.noreply.github.com> Date: Sat, 2 Mar 2024 12:04:12 +0800 Subject: [PATCH 07/25] =?UTF-8?q?[=E7=BB=84=E4=BB=B6-=E7=A6=81=E6=AD=A2?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=8A=A8=E6=80=81=E8=AF=A6=E6=83=85]=20fix:?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E5=B8=A6=E5=9B=BE=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=20`=E6=9F=A5=E7=9C=8B=E5=9B=BE?= =?UTF-8?q?=E7=89=87`=20=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 例如 https://t.bilibili.com/904142297159958549 --- registry/lib/components/feeds/disable-details/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/lib/components/feeds/disable-details/index.ts b/registry/lib/components/feeds/disable-details/index.ts index c90f8112a7..cfc9e9a4be 100644 --- a/registry/lib/components/feeds/disable-details/index.ts +++ b/registry/lib/components/feeds/disable-details/index.ts @@ -32,6 +32,9 @@ const entry = async () => { if (target.hasAttribute('click-title')) { return } + if (target.hasAttribute('data-pics')) { + return + } if ( [ 'bili-rich-text__action', From 312a86827353d129c8789b587baceadb5bbc8c27 Mon Sep 17 00:00:00 2001 From: sunfkny <30853461+sunfkny@users.noreply.github.com> Date: Sat, 2 Mar 2024 20:05:28 +0800 Subject: [PATCH 08/25] =?UTF-8?q?[=E7=BB=84=E4=BB=B6-=E7=BD=91=E5=9D=80?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=B8=85=E7=90=86]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=89=93=E5=BC=80=E5=85=B3=E9=97=AD=E7=9A=84?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=E6=97=B6=E8=B7=B3=E8=BD=AC=E8=87=B3?= =?UTF-8?q?=20https://search.bilibili.com/undefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/the1812/Bilibili-Evolved/issues/4656 --- registry/lib/components/utils/url-params-clean/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/lib/components/utils/url-params-clean/index.ts b/registry/lib/components/utils/url-params-clean/index.ts index be4c69bc2b..50d6d65869 100644 --- a/registry/lib/components/utils/url-params-clean/index.ts +++ b/registry/lib/components/utils/url-params-clean/index.ts @@ -141,6 +141,9 @@ const entry = async () => { url: string, ...restArgs: unknown[] ) { + if (url === undefined || url === null) { + return original.call(this, data, unused, url, ...restArgs) + } const resolvedUrl = (() => { try { return new URL(url, location.origin + location.pathname).toString() From ece8d359d26fa224efb66855e3510f9dfc649f3b Mon Sep 17 00:00:00 2001 From: the1812 Date: Mon, 4 Mar 2024 22:38:52 +0800 Subject: [PATCH 09/25] Update folded content class (fix #4633) --- .../components/feeds/full-content/full-content.scss | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/registry/lib/components/feeds/full-content/full-content.scss b/registry/lib/components/feeds/full-content/full-content.scss index 23a8861c44..2a8cf7be08 100644 --- a/registry/lib/components/feeds/full-content/full-content.scss +++ b/registry/lib/components/feeds/full-content/full-content.scss @@ -1,11 +1,17 @@ -.dyn-card-opus__summary:first-child, +.bili-rich-text__content.folded { + -webkit-line-clamp: unset !important; + display: block !important; + height: auto !important; + max-height: unset !important; + ~ .bili-rich-text__action { + display: none !important; + } +} .card .main-content { - .bili-rich-text__action, .expand-btn, .content-ellipsis { display: none !important; } - .bili-rich-text__content, .content-full { -webkit-line-clamp: unset !important; display: block !important; From 3f47cee1920334215f65eb5e6620dabb399dbf56 Mon Sep 17 00:00:00 2001 From: the1812 Date: Tue, 5 Mar 2024 09:01:35 +0800 Subject: [PATCH 10/25] Fix logo-img size (fix #4480) --- .../utils/image-resolution/resolution.ts | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/registry/lib/components/utils/image-resolution/resolution.ts b/registry/lib/components/utils/image-resolution/resolution.ts index f0ac0e6bcf..0d910a1777 100644 --- a/registry/lib/components/utils/image-resolution/resolution.ts +++ b/registry/lib/components/utils/image-resolution/resolution.ts @@ -2,7 +2,22 @@ import { styledComponentEntry } from '@/components/styled-component' import { Options } from '.' const resizeRegex = /@(\d+)[Ww]_(\d+)[Hh]/ + +/** 排除 */ const excludeSelectors = ['#certify-img1', '#certify-img2'] +/** 需要设置 height */ +const heightSelectors = [ + // 动态头像框必须设高度 + // https://github.com/the1812/Bilibili-Evolved/issues/2030 + '.bili-avatar-img', +] +/** width 和 height 都得设置 */ +const widthAndHeightSelectors = [ + // 首页 Logo + // https://github.com/the1812/Bilibili-Evolved/issues/4480 + '.logo-img', +] + const walk = (rootElement: Node, action: (node: HTMLElement) => void) => { const walker = document.createNodeIterator(rootElement, NodeFilter.SHOW_ELEMENT) let node = walker.nextNode() @@ -43,9 +58,10 @@ export const imageResolution = async (dpi: number, element: HTMLElement) => { return } if (element.getAttribute('width') === null && element.getAttribute('height') === null) { - if (element.classList.contains('bili-avatar-img')) { - // 动态头像框必须设高度 - // https://github.com/the1812/Bilibili-Evolved/issues/2030 + if (widthAndHeightSelectors.some(selector => element.matches(selector))) { + element.setAttribute('height', currentHeight) + element.setAttribute('width', currentWidth) + } else if (heightSelectors.some(selector => element.matches(selector))) { element.setAttribute('height', currentHeight) } else { element.setAttribute('width', currentWidth) From a057b8a67be3fbf8a5fada042f04162cf8fb4800 Mon Sep 17 00:00:00 2001 From: LY <51789698+Young-Lord@users.noreply.github.com> Date: Sat, 2 Mar 2024 14:20:23 +0000 Subject: [PATCH 11/25] Add description on keeping download filename in IDM --- registry/lib/plugins/video/download/idm-output/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/registry/lib/plugins/video/download/idm-output/index.ts b/registry/lib/plugins/video/download/idm-output/index.ts index 8f1f553b7d..b411e5f363 100644 --- a/registry/lib/plugins/video/download/idm-output/index.ts +++ b/registry/lib/plugins/video/download/idm-output/index.ts @@ -7,7 +7,8 @@ import { DownloadVideoOutput } from '../../../../components/video/download/types export const plugin: PluginMetadata = { name: 'downloadVideo.outputs.idm', displayName: '下载视频 - IDM 输出支持', - description: '为下载视频增加 IDM 输出支持.', + description: + '为下载视频增加 IDM 输出支持,建议配合 [ef2.exe](https://github.com/MotooriKashin/ef2) 以简化操作、保留文件名.', setup: ({ addData }) => { addData('downloadVideo.outputs', (outputs: DownloadVideoOutput[]) => { outputs.push({ From 4488ab71e936ba6fd92b92d48e29b45cd98041d9 Mon Sep 17 00:00:00 2001 From: the1812 Date: Wed, 6 Mar 2024 10:18:00 +0800 Subject: [PATCH 12/25] Fix space adaptor broken after search (fix #4458) --- src/components/feeds/api/manager/adaptor.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/feeds/api/manager/adaptor.ts b/src/components/feeds/api/manager/adaptor.ts index f5deaa3d6d..9a0cd80a74 100644 --- a/src/components/feeds/api/manager/adaptor.ts +++ b/src/components/feeds/api/manager/adaptor.ts @@ -71,15 +71,12 @@ addData(ListAdaptorKey, (adaptors: FeedsCardsListAdaptor[]) => { if (vm.observer) { return vm.observer } - const newListPromise = select( - '.feed-card .content, .bili-dyn-list__items', - ) as Promise + const newListPromise = select('.bili-dyn-list__items') as Promise vm.observer = (async () => { - // const newList = await vm.listElement as HTMLElement const newList = await newListPromise if (newList !== (await vm.listElement)) { if (vm.listElement) { - await stop() + stop() } vm.listElement = newListPromise start() @@ -91,7 +88,7 @@ addData(ListAdaptorKey, (adaptors: FeedsCardsListAdaptor[]) => { return vm.observer } childListSubtree(container, async () => { - if (dq('.feed-card .content, .bili-dyn-list__items')) { + if (dq('.bili-dyn-list__items')) { start() } else { stop() From f7c9743e60feedf5592ea6ffdfdf75e12561c898 Mon Sep 17 00:00:00 2001 From: the1812 Date: Wed, 6 Mar 2024 10:23:46 +0800 Subject: [PATCH 13/25] Fix speed container selectors (fix #4571) --- .../video/player/common/speed/context.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/registry/lib/components/video/player/common/speed/context.ts b/registry/lib/components/video/player/common/speed/context.ts index 9523b314d2..4f22a026fb 100644 --- a/registry/lib/components/video/player/common/speed/context.ts +++ b/registry/lib/components/video/player/common/speed/context.ts @@ -17,22 +17,22 @@ import { convertToXPath, formatSpeedText, parseSpeedText, useShare } from './uti export const PLAYER_AGENT = playerAgent.provideCustomQuery({ video: { - speedMenuList: '.bilibili-player-video-btn-speed-menu,.bpx-player-ctrl-playbackrate-menu', + speedMenuList: '.bilibili-player-video-btn-speed-menu, .bpx-player-ctrl-playbackrate-menu', speedMenuItem: - '.bilibili-player-video-btn-speed-menu-list,.bpx-player-ctrl-playbackrate-menu-item', - speedNameBtn: '.bilibili-player-video-btn-speed-name,.bpx-player-ctrl-playbackrate-result', - speedContainer: '.bilibili-player-video-btn-speed,.bpx-player-ctrl-playbackrate', - active: '.bilibili-player-active,.bpx-state-active', - show: '.bilibili-player-speed-show,.bpx-state-show', + '.bilibili-player-video-btn-speed-menu-list, .bpx-player-ctrl-playbackrate-menu-item', + speedNameBtn: '.bilibili-player-video-btn-speed-name, .bpx-player-ctrl-playbackrate-result', + speedContainer: '.bilibili-player-video-btn-speed, .bpx-player-ctrl-playbackrate', + active: '.bilibili-player-active, .bpx-state-active', + show: '.bilibili-player-speed-show, .bpx-state-show', }, bangumi: { - speedMenuList: '.squirtle-speed-select-list', - speedMenuItem: '.squirtle-select-item', - speedNameBtn: '.squirtle-speed-select-result', - speedContainer: '.squirtle-speed-wrap', - active: '.active', + speedMenuList: '.squirtle-speed-select-list, .bpx-player-ctrl-playbackrate-menu', + speedMenuItem: '.squirtle-select-item, .bpx-player-ctrl-playbackrate-menu-item', + speedNameBtn: '.squirtle-speed-select-result, .bpx-player-ctrl-playbackrate-result', + speedContainer: '.squirtle-speed-wrap, .bpx-player-ctrl-playbackrate', + active: '.active, .bpx-state-active', // bangumi 那边没有这种 class, 随便填一个就行了 - show: '.bilibili-player-speed-show', + show: '.bilibili-player-speed-show, .bpx-state-show', }, }) From e72b6906a144492f211d38e13fa4c405a0e2006b Mon Sep 17 00:00:00 2001 From: the1812 Date: Wed, 6 Mar 2024 22:23:15 +0800 Subject: [PATCH 14/25] Fix z-index --- registry/lib/components/feeds/fold-comments/fold-comment.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/lib/components/feeds/fold-comments/fold-comment.scss b/registry/lib/components/feeds/fold-comments/fold-comment.scss index bebfe6a51c..543fa36230 100644 --- a/registry/lib/components/feeds/fold-comments/fold-comment.scss +++ b/registry/lib/components/feeds/fold-comments/fold-comment.scss @@ -37,6 +37,6 @@ .at-panel, .emoji-panel, .reply-operation .operation-list { - z-index: 111; + z-index: 111 !important; } } From 2bd0a3303ec0fd148eed1da23ef5d68f58580d6f Mon Sep 17 00:00:00 2001 From: the1812 Date: Wed, 6 Mar 2024 22:23:40 +0800 Subject: [PATCH 15/25] Update dark styles for new reply area (fix #4605) --- .../style/dark-mode/dark-slice-17.scss | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/registry/lib/components/style/dark-mode/dark-slice-17.scss b/registry/lib/components/style/dark-mode/dark-slice-17.scss index cd1c98c7d1..6616510202 100644 --- a/registry/lib/components/style/dark-mode/dark-slice-17.scss +++ b/registry/lib/components/style/dark-mode/dark-slice-17.scss @@ -413,6 +413,10 @@ .reply-box-textarea::-webkit-input-placeholder { @include color('8'); } + .reply-box-warp { + @include background-color('2'); + @include border-color('5'); + } .fixed-reply-box { .reply-box { @include background-color('2'); @@ -457,14 +461,29 @@ } } } + .image-btn { + .image-icon path { + @include fill('a'); + } + &:hover { + .image-icon path { + @include fill('e'); + } + } + } + .image-btn, .emoji-btn, .at-btn { @include border-color('4'); + @include background-color('3'); @include color('a'); &:hover { @include color('e'); } } + .reply-loading { + @include color('a'); + } .emoji-panel { @include border-color('8884'); @include color('e'); From 7919710d8bc8cd4ccde39f65ee47097995029aa8 Mon Sep 17 00:00:00 2001 From: the1812 Date: Fri, 8 Mar 2024 08:52:50 +0800 Subject: [PATCH 16/25] Update dark styles --- .../style/dark-mode/dark-slice-16.scss | 23 +++++++ .../style/dark-mode/dark-slice-18.scss | 61 ++++++++++++------- .../style/dark-mode/dark-variables.scss | 1 + 3 files changed, 64 insertions(+), 21 deletions(-) diff --git a/registry/lib/components/style/dark-mode/dark-slice-16.scss b/registry/lib/components/style/dark-mode/dark-slice-16.scss index f93b022d7d..b6e390e135 100644 --- a/registry/lib/components/style/dark-mode/dark-slice-16.scss +++ b/registry/lib/components/style/dark-mode/dark-slice-16.scss @@ -473,6 +473,29 @@ @include color('e'); } } + ~ .bili-tabs { + .bili-tabs__header { + @include background-color('4'); + @include border-color('5'); + } + .bili-tabs__nav__item { + @include color('e'); + &.is-active, + &:hover { + @include theme-color(); + } + } + // .bili-tabs__content { + // .comment-wrap { + // @include background-color(); + // } + // } + } +} +.reaction-list { + .reaction-item { + box-shadow: inset 0 -.5px 0 0 #666 !important; + } } .bili-dyn-forward { &__item { diff --git a/registry/lib/components/style/dark-mode/dark-slice-18.scss b/registry/lib/components/style/dark-mode/dark-slice-18.scss index 36a51d06b5..f9b74aff4f 100644 --- a/registry/lib/components/style/dark-mode/dark-slice-18.scss +++ b/registry/lib/components/style/dark-mode/dark-slice-18.scss @@ -508,27 +508,28 @@ } } } - .side-toolbar { - &__box, - &__btn { - @include background-color('3'); - &.backtop span::before { - @include to-white(); - } +} +.side-toolbar { + &__box, + &__btn { + @include background-color('3'); + &.backtop span::before { + @include to-white(); } - &__action { + } + &__action { + &, + & svg { + @include color('e'); + } + &:hover, + &.is-active { &, + .side-toolbar__action__text, & svg { - @include color('e'); - } - &:hover, - &.is-active { - &, - & svg { - @include theme-color(); - path { - @include theme-fill(); - } + @include theme-color(); + path { + @include theme-fill(); } } } @@ -697,9 +698,7 @@ @include set-color('border-top-color', '4'); } #{contains('mediainfo_mediaRight')} { - #{contains('mediainfo_media_desc_section')} - #{contains('mediainfo_display_area')} - #{contains('mediainfo_ellipsis')} { + #{contains('mediainfo_media_desc_section')} #{contains('mediainfo_display_area')} #{contains('mediainfo_ellipsis')} { background: linear-gradient(90deg, hsla(0, 0%, 100%, 0), #222 20%, #222); @include theme-color(); } @@ -795,3 +794,23 @@ } } } +#bili-header-container { + @include background-color('2'); +} +.bili-button { + &.primary { + &.plain { + @include background-color(); + } + } +} +.vui_button { + &.blue { + @include theme-background-color(); + @include border-color(); + @include foreground-color(); + &:hover { + @include theme-background-color('80'); + } + } +} diff --git a/registry/lib/components/style/dark-mode/dark-variables.scss b/registry/lib/components/style/dark-mode/dark-variables.scss index e61199682f..4266527265 100644 --- a/registry/lib/components/style/dark-mode/dark-variables.scss +++ b/registry/lib/components/style/dark-mode/dark-variables.scss @@ -190,6 +190,7 @@ } html:root { --brand_blue: var(--theme-color); + --brand_blue_hover: var(--theme-color-80); --brand_blue_thin: var(--theme-color-10); --text_link: var(--theme-color); } From e9ff5ba0ed3d5285822ce7f910e1b144a1c83c54 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 09:07:10 +0800 Subject: [PATCH 17/25] Update dark styles for search list (fix #4354) --- .../style/dark-mode/dark-slice-16.scss | 5 +- .../style/dark-mode/dark-slice-18.scss | 52 +++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/registry/lib/components/style/dark-mode/dark-slice-16.scss b/registry/lib/components/style/dark-mode/dark-slice-16.scss index b6e390e135..d8d3b7b436 100644 --- a/registry/lib/components/style/dark-mode/dark-slice-16.scss +++ b/registry/lib/components/style/dark-mode/dark-slice-16.scss @@ -473,6 +473,9 @@ @include color('e'); } } +} +.bili-dyn-item, +.bili-opus-view { ~ .bili-tabs { .bili-tabs__header { @include background-color('4'); @@ -494,7 +497,7 @@ } .reaction-list { .reaction-item { - box-shadow: inset 0 -.5px 0 0 #666 !important; + box-shadow: inset 0 -0.5px 0 0 #666 !important; } } .bili-dyn-forward { diff --git a/registry/lib/components/style/dark-mode/dark-slice-18.scss b/registry/lib/components/style/dark-mode/dark-slice-18.scss index f9b74aff4f..40368809a2 100644 --- a/registry/lib/components/style/dark-mode/dark-slice-18.scss +++ b/registry/lib/components/style/dark-mode/dark-slice-18.scss @@ -495,6 +495,16 @@ @include theme-color(); } } + .opus-module-topic { + @include theme-color(); + } + .opus-more__btn { + @include color('a'); + &:hover { + @include color('e'); + @include background-color('3'); + } + } .opus-tabs { .bili-tabs { &__header { @@ -814,3 +824,45 @@ } } } +.be-shielding::after, +.shielding::after { + @include color('e'); + @include background-color(); +} +.activity-game-list-item { + .activity-card { + @include background-color(); + .activity-card-content-head-title { + @include color('e'); + } + .activity-card-content-head-desc { + @include color('a'); + } + } +} +.activity-game-list .game-card { + .game-card-content-head-title { + @include color('e'); + .tag { + @include color('a'); + @include border-color('a'); + } + } + .game-card-content-head-text { + @include color('a'); + } +} +.bangumi-pgc-list { + .media-card { + .media-card-content-head-title { + @include color('e'); + } + .media-card-content-head-cv, + .media-card-content-head-label { + @include color('a'); + } + .media-card-content-head-desc { + @include color('8'); + } + } +} \ No newline at end of file From c561a1e8e9c070e75d54f98313c80921b87946a4 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 09:55:17 +0800 Subject: [PATCH 18/25] Disable custom navbar on mooc page (#4610) --- registry/lib/components/style/custom-navbar/urls.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/registry/lib/components/style/custom-navbar/urls.ts b/registry/lib/components/style/custom-navbar/urls.ts index a8caf12f6d..77e622f2d0 100644 --- a/registry/lib/components/style/custom-navbar/urls.ts +++ b/registry/lib/components/style/custom-navbar/urls.ts @@ -22,4 +22,5 @@ export const urlExclude = [ // '//www.bilibili.com/blackboard/', '//member.bilibili.com/v2', '//game.bilibili.com/', + '//www.bilibili.com/mooc/', ] From 64acf4b931bf7eaf7d45a8502064c5348a8100e0 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 09:55:35 +0800 Subject: [PATCH 19/25] Fix header offset for v3 (#4610) --- registry/lib/components/style/hide/banner/banner.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/lib/components/style/hide/banner/banner.scss b/registry/lib/components/style/hide/banner/banner.scss index 53caf6f4d0..50805bad3e 100644 --- a/registry/lib/components/style/hide/banner/banner.scss +++ b/registry/lib/components/style/hide/banner/banner.scss @@ -7,6 +7,9 @@ #biliMainHeader { min-height: unset !important; } +.header-v3 .z-top-container { + min-height: 160px !important; +} .bili-header { padding-top: 50px !important; min-height: 0 !important; From e692e423502f262cd9781cdf1b64008d9bfb5ab2 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 09:58:23 +0800 Subject: [PATCH 20/25] Remove unused layout (#4610) --- .../components/utils/remove-promotions/remove-promotions.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/lib/components/utils/remove-promotions/remove-promotions.scss b/registry/lib/components/utils/remove-promotions/remove-promotions.scss index b6bc077dca..eb076b350f 100644 --- a/registry/lib/components/utils/remove-promotions/remove-promotions.scss +++ b/registry/lib/components/utils/remove-promotions/remove-promotions.scss @@ -81,9 +81,12 @@ body.dark .blocked-ads.new { pointer-events: none !important; opacity: 0 !important; } +.recommended-container_floor-aside .container > *, body:not(.preserve-feed-goods) .bili-dyn-content__orig__additional:has(.dyn-goods) { margin: 0 !important; } +.feed-card:has(.bili-video-card a[href*='cm.bilibili.com']), +.bili-video-card.is-rcmd:has(a[href*='cm.bilibili.com']), .bili-video-card__wrap:has(a[href*='cm.bilibili.com']) { display: none !important; } From c83863f6db8432de5675c4eb714d514c9e1d2af3 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 10:33:43 +0800 Subject: [PATCH 21/25] Remove feedback popup (fix #4610) --- .../lib/components/video/player/remove-popup/remove-popup.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/registry/lib/components/video/player/remove-popup/remove-popup.scss b/registry/lib/components/video/player/remove-popup/remove-popup.scss index 72f643a70d..67deb331c7 100644 --- a/registry/lib/components/video/player/remove-popup/remove-popup.scss +++ b/registry/lib/components/video/player/remove-popup/remove-popup.scss @@ -39,7 +39,8 @@ body { .bilibili-player-score, .bpx-player-popup-dm-close, .bpx-player-score-summary-wrap, - .bpx-player-score { + .bpx-player-score, + .bili-qoeFeedback { display: none !important; } } From 97b479d026fa127c73bfec6a1bc1e866428f1279 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 20:43:13 +0800 Subject: [PATCH 22/25] Update changelog --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3c998e91..df40c0e8df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,54 @@ # 更新日志 +## v2.8.9-preview +`2024-03-09` + +包含 [v2.8.9](https://github.com/the1812/Bilibili-Evolved/releases/tag/v2.8.9) 的所有更新内容. + +✨新增 +- `下载视频 - WASM 混流输出` 支持更持久的缓存方式. (PR #4667 by [WakelessSloth56](https://github.com/WakelessSloth56)) +- `外置稍后再看` 和 `启用快速收藏` 增加了 `显示方式` 选项, 出现无法自动适配的排版问题时可以尝试手动调整此设置. (#4532) +- 新增插件 `动态过滤器 - 移除商品带货动态`. (#4425) +> 移除动态里的商品带货动态 (UP主的推荐 · 来自 XX), 装有 `动态过滤器` 时生效. + +- 新增组件 `动态图片平铺展示`. (#4645) +> 将动态中左右切换式的图片改回传统的平铺展示. (在动态详情中可能稍有延迟) + +- 更换了 `自定义顶栏` 的动态提醒数字来源. (#4427) + + +## v2.8.9 +`2024-03-09` + +✨新增 +- `下载视频 - IDM 输出支持` 补充了保留文件名相关内容的描述. (PR #4664 by [LY](https://github.com/Young-Lord)) +- 夜间模式更新对以下区域的支持: + - 新版评论区输入框 (#4605) + - 动态详情页 + - 搜索页面 (#4354) +- `删除广告` 现在可以在新版首页中将删除后的空位移除. (#4610) +- `删除视频弹窗` 支持屏蔽 "请评价视频播放效果" 等小弹窗, 归属于投票类. (#4610) + +🐛修复 +- 修复 XML 弹幕下载遇到空弹幕时报错. (#4629) +- 修复播放前显示封面在中途暂停仍会出现. (#4491) +- 修复 `自定义顶栏` 的搜索结果描述溢出. (#4464) +- 修复自动关灯无效. (PR #4659 by [Waua](https://github.com/FoundTheWOUT), #4631) +- 修复 `网址参数清理` 导致搜索页出现 `https://search.bilibili.com/undefined`. (PR #4663 by [sunfkny](https://github.com/sunfkny), #4656) +- 修复 `禁止跳转动态详情` 导致动态中的查看图片按钮失效. (PR #4662 by [sunfkny](https://github.com/sunfkny)) +- 修复 `展开动态内容` 对部分用户失效. (#4633) +- 修复 `高分辨率图片` 导致旧版首页 logo 比例出错. (#4480) +- 修复个人空间中搜索过动态后再返回导致常规动态里的相关功能失效. (#4458) +- 修复番剧区的 `扩展倍速` 失效. (#4571) +- 修复 `快速收起评论` 遮挡评论的表情等弹窗. +- 修复 `自定义顶栏` 导致网课分区内容错位. (#4610) +- 修复 `隐藏顶部横幅` 导致部分分区页面内容错位. (#4610) + +☕开发者相关 +- PlayerAgent 支持监听 `pause` 事件. +- `forEachFeedsCard` 现在不会在非动态页面执行. + ## v2.8.8 / v2.8.8-preview `2024-01-18` From 70f8479045a706d1591a935f3abc8180b9fe451a Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 20:43:33 +0800 Subject: [PATCH 23/25] Update version number --- src/client/common.meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/common.meta.json b/src/client/common.meta.json index 9188e34dac..52ad430b1e 100644 --- a/src/client/common.meta.json +++ b/src/client/common.meta.json @@ -1,5 +1,5 @@ { - "version": "2.8.8", + "version": "2.8.9", "author": "Grant Howard, Coulomb-G", "copyright": "[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)", "license": "MIT", From d677f84b963c3745c0bf678a44e50eb1a3b9a5a9 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 20:50:15 +0800 Subject: [PATCH 24/25] Update donate history --- doc/donate.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/donate.md b/doc/donate.md index 6fefffe143..ff8b07885e 100644 --- a/doc/donate.md +++ b/doc/donate.md @@ -6,7 +6,7 @@ ## 爱发电 - + 爱发电 @@ -29,6 +29,14 @@ https://afdian.net/@the1812?tab=sponsor | 时间 | 用户名 | 单号后4位 | 金额 | | ------------------- | --------------------- | --------- | ------- | +| 2024.03.01 16:12:34 | 5*B | 0619 | ¥2.33 | +| 2024.02.29 08:53:14 | M*z | 8723 | ¥2.33 | +| 2024.02.20 14:47:10 | 匿名 | 4111 | ¥5.00 | +| 2024.01.31 01:19:43 | *易 | 6909 | ¥2.33 | +| 2024.01.29 21:03:27 | 匿名 | 0302 | ¥2.33 | +| 2024.01.29 21:02:54 | 匿名 | 6268 | ¥2.33 | +| 2024.01.29 21:01:19 | 匿名 | 9601 | ¥2.33 | +| 2024.01.19 01:11:57 | 远去之蓝 | 7860 | ¥5.00 | | 2024.01.12 22:02:24 | 简式谐_LastofNESTS | 5700 | ¥22.33 | | 2024.01.02 16:44:38 | O*h | 5101 | ¥10.00 | | 2023.12.18 21:46:53 | *京 | 1206 | ¥20.00 | From 1c57de2433c8de143e54c78fb23e55879ce1c6be Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 9 Mar 2024 20:51:48 +0800 Subject: [PATCH 25/25] Update docs --- doc/features/features.json | 2 +- doc/features/features.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/features/features.json b/doc/features/features.json index a4d29fea2d..b44660d96a 100644 --- a/doc/features/features.json +++ b/doc/features/features.json @@ -1052,7 +1052,7 @@ "type": "plugin", "name": "downloadVideo.outputs.idm", "displayName": "下载视频 - IDM 输出支持", - "description": "为下载视频增加 IDM 输出支持.", + "description": "为下载视频增加 IDM 输出支持,建议配合 [ef2.exe](https://github.com/MotooriKashin/ef2) 以简化操作、保留文件名.", "fullRelativePath": "../../registry/dist/plugins/video/download/idm-output.js", "fullAbsolutePath": "registry/dist/plugins/video/download/idm-output.js" }, diff --git a/doc/features/features.md b/doc/features/features.md index fe278556b7..60a92f28fd 100644 --- a/doc/features/features.md +++ b/doc/features/features.md @@ -1423,7 +1423,7 @@ by FoundTheWOUT **GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/video/download/idm-output.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/video/download/idm-output.js) -为下载视频增加 IDM 输出支持. +为下载视频增加 IDM 输出支持,建议配合 [ef2.exe](https://github.com/MotooriKashin/ef2) 以简化操作、保留文件名. ### [下载视频 - 手动输入](../../registry/dist/plugins/video/download/manual-input.js) `downloadVideo.inputs.manual`