Skip to content

Commit

Permalink
feat: hide user card
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Apr 3, 2024
1 parent 5f73a5d commit dc29832
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

## 3.3.4

- 新增:隐藏 评论区用户卡片
- 修复:播放页 隐藏视频信息提示typo
- 优化:页面净化功能细节
- 优化:右键单击的判定

## 3.3.3

Expand Down
8 changes: 6 additions & 2 deletions src/filters/videoFilter/pages/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,14 @@ if (isPageVideo() || isPagePlaylist()) {
isContextMenuUploaderEnable &&
(target.classList.contains('name') ||
target.classList.contains('up-name') ||
(target.classList.contains('mask') && target.parentElement?.classList.contains('up-name')))
target.parentElement?.classList.contains('up-name') ||
target.closest('.staff-info'))
) {
// 命中UP主
const uploader = target.textContent || target.parentElement?.textContent
const uploader =
target.closest('.staff-info')?.querySelector('.staff-name')?.textContent?.trim() ||
target.textContent?.trim() ||
target.parentElement?.textContent?.trim()
if (uploader) {
e.preventDefault()
const onclickBlack = () => {
Expand Down
6 changes: 6 additions & 0 deletions src/rules/bangumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ if (isPageBangumi()) {
itemCSS: `#comment-module .main-reply-box .reply-box-textarea::placeholder {color: transparent !important;}
#comment-module .fixed-reply-box .reply-box-textarea::placeholder {color: transparent !important;}`,
}),
// 隐藏 评论区用户卡片
new CheckboxItem({
itemID: 'video-page-hide-comment-user-card',
description: '隐藏 评论区用户卡片\n鼠标放在用户名上时不显示卡片',
itemCSS: `.user-card {display: none!important;}`,
}),
// 隐藏 评论内容右侧装饰
new CheckboxItem({
itemID: 'video-page-hide-reply-decorate',
Expand Down
6 changes: 6 additions & 0 deletions src/rules/dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ if (isPageDynamic()) {
defaultStatus: true,
itemCSS: `.comment-container .reply-box-textarea::placeholder {color: transparent !important;}`,
}),
// 隐藏 评论区用户卡片
new CheckboxItem({
itemID: 'video-page-hide-comment-user-card',
description: '隐藏 评论区用户卡片\n鼠标放在用户名上时不显示卡片',
itemCSS: `.user-card {display: none!important;}`,
}),
// 隐藏 评论右侧装饰
new CheckboxItem({
itemID: 'video-page-hide-reply-decorate',
Expand Down
6 changes: 6 additions & 0 deletions src/rules/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,12 @@ if (isPageVideo() || isPagePlaylist()) {
itemCSS: `.main-reply-box .reply-box-textarea::placeholder {color: transparent !important;}
.fixed-reply-box .reply-box-textarea::placeholder {color: transparent !important;}`,
}),
// 隐藏 评论区用户卡片
new CheckboxItem({
itemID: 'video-page-hide-comment-user-card',
description: '隐藏 评论区用户卡片\n鼠标放在用户名上时不显示卡片',
itemCSS: `.user-card {display: none!important;}`,
}),
// 隐藏 评论内容右侧装饰
new CheckboxItem({
itemID: 'video-page-hide-reply-decorate',
Expand Down

0 comments on commit dc29832

Please sign in to comment.