Skip to content

Commit

Permalink
Merge branch 'preview-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Aug 15, 2024
2 parents fc4fe13 + b61e74e commit 7e9a933
Show file tree
Hide file tree
Showing 40 changed files with 796 additions and 176 deletions.
8 changes: 4 additions & 4 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
> 1%
last 2 versions
not dead
chrome > 100
edge > 100
firefox > 103
safari > 15
chrome > 105
edge > 105
firefox > 127
safari > 15.4
not and_chr > 0
not and_ff > 0
not and_qq > 0
Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
<!-- spell-checker: disable -->
# 更新日志

## v2.9.1-preview
`2024-08-15`

包含 [v2.9.1](https://github.com/the1812/Bilibili-Evolved/releases/tag/v2.9.1) 的所有更新内容.

✨新增
- `查看封面` 可以为 aria2 输出提供直接的封面下载. (PR #4798 by [Oxygenくん](https://github.com/oxygenkun))
- 新增组件 `保存视频元数据`. (PR #4840 by [WakelessSloth56](https://github.com/WakelessSloth56))
> - 保存视频元数据为 [FFMETADATA](https://ffmpeg.org/ffmpeg-formats.html#Metadata-2) 格式
> - 使用组件 `下载视频` 时指定 `WASM` 输出方式(插件 `下载视频 - WASM 混流输出`)可选择是否直接混流入输出文件。
> - 保存视频章节为 OGM 格式 (https://github.com/the1812/Bilibili-Evolved/discussions/2069#discussioncomment-10110916)
- `简化首页` 支持隐藏轮播图. (PR #4852 by [Lime](https://github.com/Liumingxun))
- 新增组件 `添加直播间用户超链接`. (PR #4856 by [Light_Quanta](https://github.com/LightQuanta))
> 网页版直播间右上角的房间观众和大航海界面的用户列表只可查看用户名,不可进行点击。该组件为用户头像和用户名称处添加点击效果,允许通过点击直接查看用户空间。
- 插件 `下载视频 - WASM 混流输出` 支持并行下载库和音视频流. (PR #4864 by [WakelessSloth56](https://github.com/WakelessSloth56))

## v2.9.1
`2024-08-15`

<details>
<summary>正式版用户将获得 v2.9.0-preview 的所有改动 (新功能以及一项废弃), 点击展开查看</summary>

✨新增
- `简化直播间` 支持屏蔽推荐直播间. (#4787)
- 新增功能 `删除直播马赛克遮罩` (#4634, PR #4814)
> 删除观看直播时某些分区的马赛克遮罩.
- `启用视频截图` 截出来的图支持直接复制. (此功能需要 Firefox 127 版本以上) (#4806)
- `图片批量导出`, `下载视频` 支持更多变量, 详情可在更新组件后查看设置中的说明: (#3852)
- 动态 ID, 用户 ID, 动态发布时间, 被转发动态相关数据
- 专栏 cv 号, 专栏发布时间
- (仅对批量视频下载 (分P / 合集) 有效) up 主名称, up 主 ID, 视频发布时间
- `自定义顶栏` 的稍后再看和历史面板现在始终显示 "已观看" 状态. (#4346)
- `自定义顶栏` 的稍后再看, 收藏和历史面板优化了分 P 数和观看进度的展示, 详见[此处](https://github.com/the1812/Bilibili-Evolved/discussions/1866#discussioncomment-10075203). (#1866)

🗑️废弃
- 删除 `下载视频` 的 Toast 输出方式.

</details>

🐛修复
- 部分修复 `简化评论区` 在新版评论区下失效. (#4843)
- 头像框目前还没找到比较好的方式隐藏, 暂不支持.
- 时间由于 Shadow DOM 限制, 无法再挪到右上角了, `装扮 & 时间` 只对装扮有效.
- 样式实现依赖 [:host-context](https://developer.mozilla.org/en-US/docs/Web/CSS/:host-context), 因此目前还不支持 Firefox.
- 修复 `删除视频弹窗``禁用特殊弹幕样式` 在新版播放器下失效. (#4843, #4823, PR #4839 by [festoney8](https://github.com/festoney8))
- 修复 `快捷键扩展` 的部分操作和 `启用弹幕空降` 在新版播放器下失效.

☕开发者相关
- 新增 Shadow DOM 系列 API (`src/core/shadow-dom.ts`), 用于处理 Shadow DOM 相关的逻辑.
- `ShadowDomObserver`: 持续观测页面上的所有 Shadow DOM.
- `ShadowDomStyles`: 支持将样式注入页面, 包含所有 Shadow DOM 内部.
- `MutationObserver` 相关的 API 支持使用 `Node` 类型作为目标.

## v2.9.0-preview
`2024-07-19`

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
## 最低配置
- 操作系统: Windows 8.1 / macOS Big Sur
- 分辨率: 1920x1080, 缩放 125%
- 浏览器: Chrome 105+ / Firefox 121+ / Safari 15.4+ (仅理论上能运行, 没测试过)
- 浏览器: Chrome 105+ / Firefox 127+ / Safari 15.4+ (仅理论上能运行, 没测试过)
- 处理器: Intel Core i5-10500 / AMD Ryzen 5 3600
- 内存: 8GB
- 脚本管理器: Tampermonkey 5.0 / Violentmonkey 2.18
Expand All @@ -84,7 +84,7 @@
## 推荐配置
- 操作系统: Windows 10 / macOS Sonoma
- 分辨率: 3840x2160, 缩放 200%
- 浏览器: Chrome 120+ / Firefox 121+
- 浏览器: Chrome 120+ / Firefox 127+
- 处理器: Intel Core i7-11700 / AMD Ryzen 7 5800
- 内存: 32GB
- 脚本管理器: Tampermonkey 5.0 / Violentmonkey 2.18
Expand Down
4 changes: 4 additions & 0 deletions doc/donate.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ https://afdian.net/@the1812?tab=sponsor
<!--'单号'在支付宝中为'收款单号'/'交易订单号'-->
<!-- 2020.10.16 17:16:05 | 匿名 (要求不列出) -->
<!-- 2021.12.27 14:01:51 | 匿名 (要求不列出) -->
<!-- 2024.07.27 10:36:54 | 匿名 (要求不列出) -->

| 时间 | 用户名 | 单号后4位 | 金额 |
| ------------------- | --------------------- | --------- | ------- |
| 2024.08.15 10:18:07 | *9 | 1653 | ¥10.00 |
| 2024.07.30 13:40:22 | Z*n | 2215 | ¥5.00 |
| 2024.07.24 09:38:46 | H*g | 7776 | ¥5.00 |
| 2024.07.16 20:57:01 | *h | 4344 | ¥20.00 |
| 2024.06.10 11:05:25 | *| 6240 | ¥5.00 |
| 2024.06.01 14:30:08 | R*0 | 8974 | ¥50.00 |
Expand Down
12 changes: 10 additions & 2 deletions doc/features/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@
"fullRelativePath": "../../registry/dist/components/live/original.js",
"fullAbsolutePath": "registry/dist/components/live/original.js"
},
{
"type": "component",
"name": "removeLiveMaskPanel",
"displayName": "删除直播马赛克遮罩",
"description": "by [@Liki4](https://github.com/Liki4)\n\n删除观看直播时某些分区的马赛克遮罩.",
"fullRelativePath": "../../registry/dist/components/live/remove-mask-panel.js",
"fullAbsolutePath": "registry/dist/components/live/remove-mask-panel.js"
},
{
"type": "component",
"name": "removeLiveWatermark",
Expand Down Expand Up @@ -547,7 +555,7 @@
"type": "component",
"name": "imageExporter",
"displayName": "图片批量导出",
"description": "可以批量导出某个地方的图片, 目前支持动态和专栏.\r\n\r\n动态文件名变量:\r\n- `user`: 用户名\r\n- `originalUser`: 被转发用户名, 如果不是转发类型的动态则等于 `user`\r\n- `id`: 动态 ID\r\n- `n`: 第 n 张图\r\n\r\n专栏文件名变量:\r\n- `title`: 专栏标题\r\n- `n`: 第 n 张图",
"description": "可以批量导出某个地方的图片, 目前支持动态和专栏.\r\n\r\n动态文件名变量:\r\n- `n`: 第 n 张图\r\n- `id`: 动态 ID\r\n- `user`: 用户名\r\n- `userID`: 用户 ID\r\n- 动态发布时间:\r\n - `publishYear`\r\n - `publishMonth`\r\n - `publishDay`\r\n - `publishHour`\r\n - `publishMinute`\r\n - `publishSecond`\r\n - `publishMillisecond`\r\n- 被转发的数据 (如果不是转发类型的动态, 则和上面的对应变量相同):\r\n - `originalID`: 被转发的动态 ID\r\n - `originalUser`: 被转发的用户名\r\n - `originalUserID`: 被转发用户 ID\r\n - 被转发的动态发布时间:\r\n - `originalPublishYear`\r\n - `originalPublishMonth`\r\n - `originalPublishDay`\r\n - `originalPublishHour`\r\n - `originalPublishMinute`\r\n - `originalPublishSecond`\r\n - `originalPublishMillisecond`\r\n\r\n专栏文件名变量:\r\n- `n`: 第 n 张图\r\n- `title`: 专栏标题\r\n- `cv`: 专栏 cv 号\r\n- 专栏发布时间:\r\n - `publishYear`\r\n - `publishMonth`\r\n - `publishDay`\r\n - `publishHour`\r\n - `publishMinute`\r\n - `publishSecond`\r\n - `publishMillisecond`\r\n",
"fullRelativePath": "../../registry/dist/components/utils/image-exporter.js",
"fullAbsolutePath": "registry/dist/components/utils/image-exporter.js"
},
Expand Down Expand Up @@ -707,7 +715,7 @@
"type": "component",
"name": "downloadVideo",
"displayName": "下载视频",
"description": "在功能面板中添加下载视频支持. 请注意:\r\n- 不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.\r\n- 请勿短时间进行大量下载, 以免遭到 b 站 IP 封禁.\r\n",
"description": "在功能面板中添加下载视频支持. 请注意:\r\n- 不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.\r\n- 请勿短时间进行大量下载, 以免遭到 b 站 IP 封禁.\r\n\r\n在使用视频 (非番剧) 批量下载时, 文件的批量命名格式中可以使用以下额外变量:\r\n- `user`: UP 主用户名\r\n- `userID`: UP 主用户 ID\r\n- 视频发布时间:\r\n - `publishYear`\r\n - `publishMonth`\r\n - `publishDay`\r\n - `publishHour`\r\n - `publishMinute`\r\n - `publishSecond`\r\n - `publishMillisecond`\r\n",
"fullRelativePath": "../../registry/dist/components/video/download.js",
"fullAbsolutePath": "registry/dist/components/video/download.js"
},
Expand Down
60 changes: 56 additions & 4 deletions doc/features/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ by [@TimmyOVO](https://github.com/TimmyOVO)

在直播间中提供返回原版直播间的按钮, 原版直播间将无视活动皮肤, 强制使用标准的直播页面.

### [删除直播马赛克遮罩](../../registry/dist/components/live/remove-mask-panel.js)
`removeLiveMaskPanel`

**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/live/remove-mask-panel.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/live/remove-mask-panel.js)

**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/live/remove-mask-panel.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/live/remove-mask-panel.js)

by [@Liki4](https://github.com/Liki4)

删除观看直播时某些分区的马赛克遮罩.

### [删除直播水印](../../registry/dist/components/live/remove-watermark.js)
`removeLiveWatermark`

Expand Down Expand Up @@ -733,14 +744,43 @@ by [@snowraincloud](https://github.com/snowraincloud)
可以批量导出某个地方的图片, 目前支持动态和专栏.

动态文件名变量:
- `user`: 用户名
- `originalUser`: 被转发用户名, 如果不是转发类型的动态则等于 `user`
- `id`: 动态 ID
- `n`: 第 n 张图
- `id`: 动态 ID
- `user`: 用户名
- `userID`: 用户 ID
- 动态发布时间:
- `publishYear`
- `publishMonth`
- `publishDay`
- `publishHour`
- `publishMinute`
- `publishSecond`
- `publishMillisecond`
- 被转发的数据 (如果不是转发类型的动态, 则和上面的对应变量相同):
- `originalID`: 被转发的动态 ID
- `originalUser`: 被转发的用户名
- `originalUserID`: 被转发用户 ID
- 被转发的动态发布时间:
- `originalPublishYear`
- `originalPublishMonth`
- `originalPublishDay`
- `originalPublishHour`
- `originalPublishMinute`
- `originalPublishSecond`
- `originalPublishMillisecond`

专栏文件名变量:
- `title`: 专栏标题
- `n`: 第 n 张图
- `title`: 专栏标题
- `cv`: 专栏 cv 号
- 专栏发布时间:
- `publishYear`
- `publishMonth`
- `publishDay`
- `publishHour`
- `publishMinute`
- `publishSecond`
- `publishMillisecond`

### [高分辨率图片](../../registry/dist/components/utils/image-resolution.js)
`imageResolution`
Expand Down Expand Up @@ -948,6 +988,18 @@ by [@kdxcxs](https://github.com/kdxcxs)
- 不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.
- 请勿短时间进行大量下载, 以免遭到 b 站 IP 封禁.

在使用视频 (非番剧) 批量下载时, 文件的批量命名格式中可以使用以下额外变量:
- `user`: UP 主用户名
- `userID`: UP 主用户 ID
- 视频发布时间:
- `publishYear`
- `publishMonth`
- `publishDay`
- `publishHour`
- `publishMinute`
- `publishSecond`
- `publishMillisecond`

### [展开视频简介](../../registry/dist/components/video/full-description.js)
`fullVideoDescription`

Expand Down
2 changes: 1 addition & 1 deletion doc/features/pack/pack.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"type": "component",
"name": "downloadVideo",
"displayName": "下载视频",
"description": "在功能面板中添加下载视频支持. 请注意:\r\n- 不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.\r\n- 请勿短时间进行大量下载, 以免遭到 b 站 IP 封禁.\r\n",
"description": "在功能面板中添加下载视频支持. 请注意:\r\n- 不能下载超出账号权限的视频, 例如非大会员下载大会员清晰度视频, 或者大陆地区网络下载港澳台地区番剧, 都是不可以的.\r\n- 请勿短时间进行大量下载, 以免遭到 b 站 IP 封禁.\r\n\r\n在使用视频 (非番剧) 批量下载时, 文件的批量命名格式中可以使用以下额外变量:\r\n- `user`: UP 主用户名\r\n- `userID`: UP 主用户 ID\r\n- 视频发布时间:\r\n - `publishYear`\r\n - `publishMonth`\r\n - `publishDay`\r\n - `publishHour`\r\n - `publishMinute`\r\n - `publishSecond`\r\n - `publishMillisecond`\r\n",
"fullRelativePath": "../../registry/dist/components/video/download.js",
"fullAbsolutePath": "registry/dist/components/video/download.js"
},
Expand Down
33 changes: 33 additions & 0 deletions registry/lib/components/live/remove-mask-panel/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { defineComponentMetadata } from '@/components/define'
import { liveUrls } from '@/core/utils/urls'

const id = 'web-player-module-area-mask-panel'
const entry = async () => {
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
mutation.addedNodes.forEach(node => {
if ((node as Element).id === id) {
node.parentNode?.removeChild(node)
observer.disconnect()
}
})
})
})
observer.observe(document.body, { childList: true, subtree: true })
}

export const component = defineComponentMetadata({
name: 'removeLiveMaskPanel',
displayName: '删除直播马赛克遮罩',
author: {
name: 'Liki4',
link: 'https://github.com/Liki4',
},
tags: [componentsTags.live, componentsTags.style],
description: {
'zh-CN': '删除观看直播时某些分区的马赛克遮罩.',
},
entry,
reload: entry,
urlInclude: liveUrls,
})
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ const favoriteItemMapper = (item: any): FavoritesItemInfo => ({
title: item.title,
description: item.intro,
duration: item.duration,
durationText: formatDuration(item.duration),
durationText:
item.page > 1
? `${formatDuration(item.duration)} / ${item.page}P`
: formatDuration(item.duration),
playCount: item.cnt_info.play,
danmakuCount: item.cnt_info.danmaku,
upName: item.upper.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,6 @@
class="progress"
:style="{ width: h.progress * 100 + '%' }"
></div>
<div v-if="h.progressText" class="floating progress-number">
{{ h.progress >= 1 ? '已看完' : h.progressText }}
</div>
<div
v-if="h.liveStatus !== undefined"
class="floating duration live-status"
:class="{ on: h.liveStatus === 1 }"
>
{{ h.liveStatus === 1 ? '直播中' : '未开播' }}
</div>
<div v-if="h.durationText" class="floating duration">{{ h.durationText }}</div>
</a>
<a class="title" target="_blank" :href="h.url" :title="h.title">{{
Expand All @@ -89,8 +79,25 @@
></DpiImage>
<div class="up-name">{{ h.upName }}</div>
</a>
<div v-if="h.timeText" class="time" :title="new Date(h.viewAt).toLocaleString()">
{{ h.timeText }}
<div class="history-info">
<div v-if="h.progressText" class="progress-number">
{{ h.progress >= 0.95 ? '已看完' : h.progressText }}
</div>
<div
v-if="h.liveStatus !== undefined"
class="duration live-status"
:class="{ on: h.liveStatus === 1 }"
>
{{ h.liveStatus === 1 ? '直播中' : '未开播' }}
</div>
<span
v-if="h.progressText || h.liveStatus !== undefined"
class="history-info-separator"
>|</span
>
<div v-if="h.timeText" class="time" :title="new Date(h.viewAt).toLocaleString()">
{{ h.timeText }}
</div>
</div>
</div>
</transition-group>
Expand Down Expand Up @@ -405,22 +412,6 @@ export default Vue.extend({
filter: invert(0.9);
}
}
.duration {
left: $padding;
bottom: $padding;
padding: 0 6px;
}
.live-status {
&.on {
background-color: var(--theme-color);
color: var(--foreground-color);
}
}
.progress-number {
left: $padding;
top: $padding;
padding: 0 6px;
}
.progress {
position: absolute;
bottom: 0;
Expand Down Expand Up @@ -448,7 +439,7 @@ export default Vue.extend({
}
}
.up,
.time {
.history-info {
font-size: 11px;
opacity: 0.75;
align-self: center;
Expand Down Expand Up @@ -479,10 +470,23 @@ export default Vue.extend({
}
}
}
.time {
.history-info {
@include h-center(4px);
font-size: 11px;
grid-area: time;
padding-right: 6px;
&-separator {
margin: 0 4px;
}
}
.progress-number,
.live-status {
@include single-line();
}
.live-status {
&.on {
color: var(--theme-color);
}
}
}
}
Expand Down
Loading

0 comments on commit 7e9a933

Please sign in to comment.