Skip to content

Commit

Permalink
Merge branch 'preview-features' into preview
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Jul 19, 2024
2 parents 55d4f6e + c6449e8 commit 9920134
Show file tree
Hide file tree
Showing 48 changed files with 1,090 additions and 216 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
2 changes: 1 addition & 1 deletion .github-json/data/workflows/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"name": "Install dependencies",
"uses": "pnpm/action-setup@v2.2.4",
"uses": "pnpm/action-setup@v4",
"with": {
"version": "8.12.1",
"run_install": true
Expand Down
4 changes: 2 additions & 2 deletions .github-json/data/workflows/pull-request-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v2",
"uses": "actions/checkout@v3",
"with": {
"ref": "${{ github.event.pull_request.head.sha }}"
}
},
{
"name": "Install dependencies",
"uses": "pnpm/action-setup@v2.2.4",
"uses": "pnpm/action-setup@v4",
"with": {
"version": "8.12.1",
"run_install": true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
git config --global core.autocrlf true
git config --global core.safecrlf false
- name: Install dependencies
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4
with:
version: 8.12.1
run_install: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install dependencies
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4
with:
version: 8.12.1
run_install: true
Expand Down
48 changes: 46 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
<!-- spell-checker: disable -->
# 更新日志

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

✨新增
- `简化直播间` 支持屏蔽推荐直播间. (#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 输出方式.

## v2.8.13
`2024-07-19`

<details>
<summary>获得 v2.8.12-preview 的所有新功能, 点击展开查看</summary>

✨新增
- `下载视频 - WASM 混流输出` 支持批量下载. (PR #4726 by [WakelessSloth56](https://github.com/WakelessSloth56))
- `夜间模式` 增加 `color-scheme` meta 信息, 适配 Chrome 的 [Fluent overlay scrollbars](chrome://flags/#fluent-overlay-scrollbars). (#4717)

</details>

✨新增
- `删除广告` 支持屏蔽首页的 "广告已被屏蔽" 占位卡片.
- `自定义顶栏` 增加公益、公开课、社区中心入口. (#1511)

🐛修复
- 修复 `显示视频投稿时间` 时间显示错误及不显示时间的问题. (#4755, PR #4756 by [呼乎户](https://github.com/wisokey))
- 修复夜间模式的一些适配问题. (#4376, #4768, #4785, #4802, PR #4763, #4810 by [Pencil](https://github.com/pencilqaq))
- 修复 `屏蔽黑名单up主` 弹窗高度溢出. (PR #4784 by [snowraincloud](https://github.com/snowraincloud))
- 修复 `自定义顶栏` 搜索框在 b 站搜索页打字时自动弹出. (#4808)

☕开发者相关
- 修复 GitHub Workflow 中 pnpm 安装失败.

## v2.8.11-preview / v2.8.12-preview
`2024-05-14`

包含 [v2.8.11](https://github.com/the1812/Bilibili-Evolved/releases/tag/v2.8.11) 的所有更新内容.
Expand All @@ -10,7 +54,7 @@
- `下载视频 - WASM 混流输出` 支持批量下载. (PR #4726 by [WakelessSloth56](https://github.com/WakelessSloth56))
- `夜间模式` 增加 `color-scheme` meta 信息, 适配 Chrome 的 [Fluent overlay scrollbars](chrome://flags/#fluent-overlay-scrollbars). (#4717)

## v2.8.11
## v2.8.11 / v2.8.12
`2024-05-14`

🐛修复
Expand Down
6 changes: 3 additions & 3 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 All @@ -106,7 +106,7 @@

## 浏览器

支持**最新版** Chrome, Edge (Chromium 内核), Firefox, 不保证脚本能在["套壳类浏览器"](https://www.jianshu.com/p/67d790a8f221)或者较长时间没更新的浏览器中完美运行.
支持**最新版** Chrome, Firefox, 不保证脚本能在 Safari 和 ["套壳类浏览器"](https://www.jianshu.com/p/67d790a8f221) 中完美运行.

# 开发者

Expand Down
6 changes: 6 additions & 0 deletions doc/donate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ https://afdian.net/@the1812?tab=sponsor

| 时间 | 用户名 | 单号后4位 | 金额 |
| ------------------- | --------------------- | --------- | ------- |
| 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 |
| 2024.06.01 09:26:49 | w*w | 3223 | ¥20.00 |
| 2024.05.18 16:48:31 | *| 2853 | ¥10.00 |
| 2024.05.14 14:16:58 | *| 4515 | ¥6.66 |
| 2024.05.02 16:06:40 | C*6 | 9321 | ¥100.00 |
| 2024.05.02 01:51:05 | 匿名 | 7540 | ¥5.00 |
| 2024.04.08 16:02:38 | 匿名 | 2455 | ¥5.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
Loading

0 comments on commit 9920134

Please sign in to comment.