From bc1334d998c5a30de1771a039d1775637230cfb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8D=E4=BA=8C=E5=90=9B?= <527254719@qq.com> Date: Sat, 9 May 2026 19:56:24 +0800 Subject: [PATCH 1/5] FIX BUG in biilibili live newUI 2026.5.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复:新版直播间UI下的面板按钮显示 --- src/App.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index 484f4a57..fa93a514 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,16 +47,17 @@ const throttleButtonOnClick = _.throttle(buttonOnClick, 300) const livePlayer = dq('.player-section') if (livePlayer) { updatePosition() - // 查找播放器上面的 header + // 查找任务盒子区域的 task-gather-entry 位置 // 节点#player-ctnr在初始html中出现 - waitForElement(dq('#player-ctnr')!, '.left-ctnr.left-header-area', 10e3) - .then((playerHeaderLeft) => { + waitForElement(dq('#player-ctnr')!, '.task-box .task-gather-entry', 10e3) + .then((taskGatherEntry) => { // 创建显示/隐藏控制面板按钮 button = dce('button') button.setAttribute('class', 'blth-btn') button.onclick = throttleButtonOnClick button.innerText = uiStore.isShowPanelButtonText - playerHeaderLeft.append(button) + // 把按钮作为 task-gather-entry 的兄长元素插入到 task-box 中 + taskGatherEntry.before(button) if (!isSelfTopFrame()) { // 在特殊直播间,脚本所在的目标 frame 只占屏幕中间一块地方 // 如果焦点不在里面,快捷键会失效 From 41e8f5bce334801ec6a6fc6e21bf82426fd9735b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8D=E4=BA=8C=E5=90=9B?= <527254719@qq.com> Date: Sat, 9 May 2026 20:55:13 +0800 Subject: [PATCH 2/5] Update App.vue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 再次修复 特殊直播间 例如6 没有活动的情况下无法加载 加快按钮的显示,不随活动加载 把按钮放在主播信息的右侧 --- src/App.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index fa93a514..d0e2ae27 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,17 +47,17 @@ const throttleButtonOnClick = _.throttle(buttonOnClick, 300) const livePlayer = dq('.player-section') if (livePlayer) { updatePosition() - // 查找任务盒子区域的 task-gather-entry 位置 + // 查找 normal-row-ctnr 下的 right-section 位置 // 节点#player-ctnr在初始html中出现 - waitForElement(dq('#player-ctnr')!, '.task-box .task-gather-entry', 10e3) - .then((taskGatherEntry) => { + waitForElement(dq('#player-ctnr')!, '.normal-row-ctnr .right-section', 10e3) + .then((rightSection) => { // 创建显示/隐藏控制面板按钮 button = dce('button') button.setAttribute('class', 'blth-btn') button.onclick = throttleButtonOnClick button.innerText = uiStore.isShowPanelButtonText - // 把按钮作为 task-gather-entry 的兄长元素插入到 task-box 中 - taskGatherEntry.before(button) + // 把按钮作为 right-section 的第一个子元素插入 + rightSection.prepend(button) if (!isSelfTopFrame()) { // 在特殊直播间,脚本所在的目标 frame 只占屏幕中间一块地方 // 如果焦点不在里面,快捷键会失效 From 061d8fab153df558e21f81033df48dcb3d846e42 Mon Sep 17 00:00:00 2001 From: andywang425 <56548456+andywang425@users.noreply.github.com> Date: Sat, 9 May 2026 22:56:40 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=8F=92=E5=85=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/App.vue b/src/App.vue index d0e2ae27..80b60f8e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,17 +47,22 @@ const throttleButtonOnClick = _.throttle(buttonOnClick, 300) const livePlayer = dq('.player-section') if (livePlayer) { updatePosition() - // 查找 normal-row-ctnr 下的 right-section 位置 - // 节点#player-ctnr在初始html中出现 - waitForElement(dq('#player-ctnr')!, '.normal-row-ctnr .right-section', 10e3) - .then((rightSection) => { + // 节点 #player-ctnr 在初始 html 中出现 + waitForElement(dq('#player-ctnr')!, '.header-info-ctnr .normal-row-ctnr', 10e3) + .then((normalRowCtnr) => { // 创建显示/隐藏控制面板按钮 button = dce('button') button.setAttribute('class', 'blth-btn') button.onclick = throttleButtonOnClick button.innerText = uiStore.isShowPanelButtonText - // 把按钮作为 right-section 的第一个子元素插入 - rightSection.prepend(button) + // 把按钮插入到 normal-row-ctnr 的第一个子节点后面 + const firstChild = normalRowCtnr.firstChild + if (firstChild) { + firstChild.after(button) + } else { + logger.warn('.normal-row-ctnr 没有子节点', normalRowCtnr) + normalRowCtnr.appendChild(button) + } if (!isSelfTopFrame()) { // 在特殊直播间,脚本所在的目标 frame 只占屏幕中间一块地方 // 如果焦点不在里面,快捷键会失效 From aa857cc0e725aa84b48b2476fff20978671ad272 Mon Sep 17 00:00:00 2001 From: andywang425 <56548456+andywang425@users.noreply.github.com> Date: Sat, 9 May 2026 22:57:37 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=83=20docs(CONTRIBUTING):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96dev=E5=88=86=E6=94=AF=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 916c08c5..06b4cd9d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ npm run dev ### 分支 - **master**: `master` 分支是发布分支,准备发版时会通过 Pull Request 将 `dev` 合并到 `master`,合并后会触发 GitHub Actions 构建并创建 Release。 -- **dev**: `dev` 分支是开发分支,日常开发请基于 `upstream/dev` 创建分支,发起 PR 时以主仓库的 `dev` 分支为合并目标。 +- **dev**: `dev` 分支是开发分支。日常开发请基于 `upstream/dev` 创建独立的功能分支(不要直接在 fork 的 `master` 上改动),发起 PR 时记得把目标分支设置为 `dev`。 ### 目录结构 From 89a0676a029556b24e770d37cfe12588f1377cd8 Mon Sep 17 00:00:00 2001 From: andywang425 <56548456+andywang425@users.noreply.github.com> Date: Sat, 9 May 2026 23:01:36 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=90=B3=20chore:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=89=8D=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf50ec78..9956df99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [7.2.8] - 2026-5-9 + +### 修复 + +- 适配B站新直播间UI,修复【隐藏/显示控制面板】按钮不显示的问题 + ## [7.2.7] - 2026-4-23 ### 修复 diff --git a/package-lock.json b/package-lock.json index ade8d8b2..26d7a12b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bilibili-live-tasks-helper", - "version": "7.2.7", + "version": "7.2.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bilibili-live-tasks-helper", - "version": "7.2.7", + "version": "7.2.8", "dependencies": { "ajax-hook": "^3.0.3", "crypto-js": "^4.2.0", diff --git a/package.json b/package.json index 21d07c57..6c023b7e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bilibili-live-tasks-helper", "private": true, - "version": "7.2.7", + "version": "7.2.8", "type": "module", "scripts": { "dev": "vite",