Skip to content

Commit

Permalink
update: live page ctrl panel items
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Jun 21, 2024
1 parent 3d0fd37 commit 24bc7b4
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 14 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## 3.7.3

- 新增:直播页 隐藏弹幕栏 倒计时互动
- 新增:直播页 隐藏倒计时互动
- 新增:直播页 隐藏发送框粉丝勋章
- 优化:直播页 隐藏互动功能默认开启
- 优化:直播页 隐藏互动功能改为默认开启
- 优化:直播页 隐藏发送框相关功能样式
- 优化:代码typo更正

## 3.7.2
Expand Down
97 changes: 86 additions & 11 deletions src/rules/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,22 @@ if (isPageLiveRoom()) {
new CheckboxItem({
itemID: 'live-page-rank-list-vm',
description: '隐藏 高能榜/大航海 (需刷新)',
itemCSS: `#rank-list-vm {display: none !important;}
#aside-area-vm {overflow: hidden;}
.chat-history-panel {height: calc(100% - 145px) !important; padding-top: 8px;}`,
// calc中强调单位,必须使用0px否则fallback
itemCSS: `
#rank-list-vm {
display: none !important;
}
.chat-history-panel {
--rank-list-height: 0px;
height: calc(100% - var(--rank-list-height, 178px) - var(--chat-control-panel-height, 145px)) !important;
}
#chat-control-panel-vm {
height: var(--chat-control-panel-height, 145px) !important;
}
#aside-area-vm {
overflow: hidden;
}
`,
}),
// 隐藏 系统提示, 默认开启
new CheckboxItem({
Expand Down Expand Up @@ -466,23 +479,85 @@ if (isPageLiveRoom()) {
description: '隐藏 发送框 粉丝勋章',
itemCSS: `.medal-section {display: none !important;}`,
}),
// 隐藏 发送框 发送按钮
new CheckboxItem({
itemID: 'live-page-chat-input-ctnr-send-btn',
description: '隐藏 发送框 发送按钮 (回车发送)',
itemCSS: `
:root {
--ctrlh1: calc(145px - 36px);
--chat-control-panel-height: min(min(var(--ctrlh1, 145px), var(--ctrlh2, 145px)), var(--ctrlh3, 145px));
}
.bottom-actions {
display: none !important;
}
.chat-history-panel {
height: calc(100% - var(--rank-list-height, 178px) - var(--chat-control-panel-height, 145px)) !important;
}
#chat-control-panel-vm {
height: var(--chat-control-panel-height, 145px) !important;
}
#aside-area-vm {
overflow: hidden;
}
.chat-history-panel .danmaku-at-prompt {
bottom: calc(var(--chat-control-panel-height) + 3px);
}
`,
}),
// 隐藏 发送框
new CheckboxItem({
itemID: 'live-page-chat-input-ctnr',
description: '隐藏 发送框',
itemCSS: `#chat-control-panel-vm .chat-input-ctnr, #chat-control-panel-vm .bottom-actions {display: none !important;}
.chat-control-panel {height: unset !important;}
.chat-history-panel {height: calc(100% - 45px) !important; padding-top: 8px;}
.chat-history-panel .danmaku-at-prompt {bottom: 50px !important;}`,
itemCSS: `
:root {
--ctrlh2: calc(145px - 105px);
--chat-control-panel-height: min(min(var(--ctrlh1, 145px), var(--ctrlh2, 145px)), var(--ctrlh3, 145px));
}
#chat-control-panel-vm .chat-input-ctnr,
#chat-control-panel-vm .bottom-actions {
display: none !important;
}
.chat-history-panel {
height: calc(100% - var(--rank-list-height, 178px) - var(--chat-control-panel-height, 145px)) !important;
}
#chat-control-panel-vm {
height: var(--chat-control-panel-height) !important;
}
#aside-area-vm {
overflow: hidden;
}
.chat-history-panel .danmaku-at-prompt {
bottom: calc(var(--chat-control-panel-height) + 3px);
}
`,
}),
// 隐藏 弹幕栏底部全部功能
new CheckboxItem({
itemID: 'live-page-chat-control-panel',
description: '隐藏 弹幕栏底部全部功能',
itemCSS: `#chat-control-panel-vm {display: none !important;}
.chat-history-panel .danmaku-at-prompt {bottom: 25px !important;}
/* 高权限调高度 */
#aside-area-vm .chat-history-panel {height: 100% !important;}`,
itemCSS: `
:root {
--ctrlh3: 0px;
--chat-control-panel-height: min(min(var(--ctrlh1, 145px), var(--ctrlh2, 145px)), var(--ctrlh3, 145px));
}
#chat-control-panel-vm {
display: none !important;
}
.chat-history-panel {
height: calc(100% - var(--rank-list-height, 178px) - var(--chat-control-panel-height, 145px)) !important;
padding-bottom: 8px;
}
#chat-control-panel-vm {
height: var(--chat-control-panel-height, 145px) !important;
}
#aside-area-vm {
overflow: hidden;
}
.chat-history-panel .danmaku-at-prompt {
bottom: calc(var(--chat-control-panel-height) + 3px);
}
`,
}),
]
liveGroupList.push(new Group('live-right-container', '右栏 高能榜/弹幕列表', rightContainerItems))
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
userscript: {
name: 'bilibili 页面净化大师',
namespace: 'http://tampermonkey.net/',
version: '3.7.2',
version: '3.7.3',
description:
'净化 B站/哔哩哔哩 页面,支持「精简功能、播放器净化、过滤视频、过滤评论、全站黑白名单」,提供 300+ 功能,定制自己的 B 站',
author: 'festoney8',
Expand Down

0 comments on commit 24bc7b4

Please sign in to comment.