diff --git a/.github-json/data/workflows/build.json b/.github-json/data/workflows/build.json index 23ffd24fb..2f72a7cfe 100644 --- a/.github-json/data/workflows/build.json +++ b/.github-json/data/workflows/build.json @@ -28,7 +28,7 @@ "name": "Install dependencies", "uses": "pnpm/action-setup@v2.2.4", "with": { - "version": "8.9.0", + "version": "8.12.1", "run_install": true } }, diff --git a/.github-json/data/workflows/pull-request-check.json b/.github-json/data/workflows/pull-request-check.json index 54fcdff6d..a3ed29327 100644 --- a/.github-json/data/workflows/pull-request-check.json +++ b/.github-json/data/workflows/pull-request-check.json @@ -17,7 +17,7 @@ "name": "Install dependencies", "uses": "pnpm/action-setup@v2.2.4", "with": { - "version": "8.9.0", + "version": "8.12.1", "run_install": true } }, diff --git a/CHANGELOG.md b/CHANGELOG.md index 5808b7eb3..0b3c998e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,75 @@ # 更新日志 +## v2.8.8 / v2.8.8-preview +`2024-01-18` + +
+正式版用户将获得 v2.8.6-preview ~ v2.8.7-preview 的所有新功能, 点击展开查看 + +✨新增 +- 新增插件 `下载视频 - MPV 输出支持加强版`. (PR #4448 by [weapon!](https://github.com/Asukaaaaaa)) +> 同时支持单文件和多文件, 不需要额外下载程序处理 mpv 协议, 配置方式请参考 [README](https://github.com/Asukaaaaaa/tricks/blob/main/Bilibili-Evolved%20mpv-ex%20%E6%8F%92%E4%BB%B6.md) + +- `查看封面` 组件安装后可为 `下载视频` 提供下载封面支持. (#889, PR #4473 by [Oxygenくん](https://github.com/oxygenkun)) +- 新增插件 `下载视频 - WASM 混流输出`. (PR #4521 by [WakelessSloth56](https://github.com/WakelessSloth56)) +> 使用 WASM 在浏览器中下载并合并音视频,运行过程中请勿关闭页面,初次使用或清除缓存后需要加载约 30 MB 的 WASM 文件 + +- 使用流量计费网络时, 不再触发本体和功能的更新检查. (仅 Chrome) (#4477) +- `快捷键扩展` 的音量调整支持自定义幅度. (#2594) +- `自定义字体` 改善了组件代码和功能. (PR #4485 by [Tinhone](https://github.com/Tinhone)) + +☕开发者相关 +- PlayerAgent API 重构为调用 `window.player` 和 `window.nano` API, 可以解决 #2544 的问题, 感谢 [timongh](https://github.com/timongh) 和 [WakelessSloth56](https://github.com/WakelessSloth56) 的发现. (#4330, #4341) + +
+ +⚠ 注意 +- Firefox 的最低版本要求提升至 121, 顺便更新了下配置要求, 分为了最低配置和推荐配置, CPU 统一为桌面级型号. +- 移除对旧版视频播放器的支持, 仅支持新版视频播放器 (BPX 播放器) + +✨新增 +- 新增插件 `动态过滤器 - 移除充电专属动态`. (#4033) +> 移除动态里的充电专属动态, 装有 `动态过滤器` 时生效. + +- `删除视频弹窗` 支持屏蔽 "心动" 弹窗, `禁用特殊弹幕样式` 支持屏蔽相应的带货弹幕. (#4565) +- `删除广告` 支持屏蔽首页的桌面端弹窗广告. (#4590) +- 新增插件 `下载视频 - 空输出`. (#4581) +> 提供一个 "空" 的输出选项, 只想获取下载视频的附带产物 (弹幕, 字幕等) 时可以使用此插件. + +- `下载视频` 支持下载合集. (#3240) +- 视频相关功能和快捷键扩展支持新版番剧播放器. (#4571) + +🐛修复 +- 修复 `评论区IP属地显示` 在小黑屋中失效的问题. (#4572, PR #4573 by [Light_Quanta](https://github.com/LightQuanta)) +- `自定义字体` 改进: (PR #4585 by [Tinhone](https://github.com/Tinhone)) + - 修复 `自定义字体` 导致快速收藏图标消失. (#4566) + - 将 `覆盖选项` 迁移到了更多选项中. + - 因为文泉驿微米黑(WenQuanYi Micro Hei)字体的部分版本存在朝鲜语(韩语)显示不正确的问题,所以从默认设置中删除,使用 Malgun Gothic 字体替换. +- 夜间模式适配播放页的充电卡片. (#4599, PR #4600 by [Pencil](https://github.com/pencilqaq)) +- `直播信息扩充` 使用新的 API, 能够显示悄悄关注的主播. (PR #4587 by [Oxygenくん](https://github.com/oxygenkun)) +- 修复自定义顶栏在搜索页面的表现: 关键词同步 & 禁用全局固定. (#1431) +- `删除广告` 使用 CSS `:has` 功能实现了移除广告的空白占位区域. (#3997) +- 修复新版的动态多图界面中 `图片批量导出` 检测不到图片. (#4586) +- 修复使用 `pluginApis.installStyle` 安装带有特殊字符的名称的样式后, 无法删除的问题. (#4557) +- 修复快速收起评论遮挡了评论的操作菜单. (#4595) +- 更新了 `稍后再看重定向` 的说明文字, 明确了功能作用范围. (#4555) +> 将稍后再看的链接重定向为普通播放网址. +> - `重定向页面`: 对稍后再看列表页面里的链接重定向. +> - `重定向顶栏`: 对 `自定义顶栏` 里的稍后再看链接重定向. + +- 修复文件命名格式中 `[title]`, `[ep]`, `[lid]` 变量的值获取不正确. (#4575) + +☕开发者相关 +- pnpm 更新至 8.12.1. +- README 调整了一些中英文字符之间的空格. (PR #4602 by [Shen-Linwood](https://github.com/Shen-Linwood)) +- PlayerAgent.getPlayerConfig 支持 BPX 播放器, 且默认认为当前 Agent 为 BPX 类型. +- 修复 DownloadPackage 中同名文件会互相覆盖. (#4576) +- 动态过滤器中使用 CSS `.plugin-block` 可以隐藏某个动态卡片, 插件结合 `forEachFeedsCard` 等 API 可以实现自定义的过滤逻辑. (#4033) +- retrieveImageUrl 支持传入 picture 元素本身. +- 内置 UA 更新至 Firefox 123. +- 增加了 simulateClick API, 可以模拟一次点击. (依次触发 `pointerdown`, `mousedown`, `pointerup`, `mouseup`, `click` 事件) + ## v2.8.7 / v2.8.7-preview `2023-11-23` @@ -46,7 +115,7 @@ - 修复 `自定义顶栏` 历史面板无法正确跳转课程. (#4484) - 修复 `自定义顶栏` 在历史记录页面产生的布局错位. (#4459) - 修复 `网址参数清理` 处理相对路径 URL 时产生了错误的结果. (#4471) -- 修复 `自定义顶栏` 在专栏页面挡住了作者信息顶栏. +- 修复 `自定义顶栏` 在专栏页面挡住了作者信息顶栏. (#4540) ☕开发者相关 - 锁定了 PR Check 中的 pnpm 版本, 避免 pnpm 更新后出现不兼容 lockfile 导致 PR Check 失败. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d055e859f..ade6c659c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ pnpm install // @description Bilibili Evolved (本地) // @version 300.0 // @author Grant Howard, Coulomb-G -// @copyright 2023, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) +// @copyright 2024, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) // @license MIT // @match *://*.bilibili.com/* // @exclude *://*.bilibili.com/*/mobile.html diff --git a/README.md b/README.md index f1f0b3eba..c45bc9194 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,12 @@ **注意事项** - **⚠ 使用正式版 (GitHub 源) 和预览版须翻墙.** -- 默认不预装任何组件, 需要在按[设置](#设置)中的说明添加感兴趣的功能. +- 默认不预装任何组件, 需要在按[设置](#设置)中的说明添加感兴趣的功能; 默认会屏蔽双击全屏, 如有需要可以安装 `双击全屏` 组件来恢复. - 这个是一个综合性的脚本, 如果只是想下载视频建议去 [GreasyFork](https://greasyfork.org/zh-CN/scripts/by-site/bilibili.com) 找个更专业的. -- 全景视频不能用鼠标拖拽视角(只能用键盘操作). -- 默认屏蔽双击全屏, 如有需要可以安装 `双击全屏` 组件来恢复. -- 对性能有较大影响. +- 对性能有较大影响, 详见[配置要求](#配置). - 默认不对未登录的状态做适配. - 新版本一旦正式发布, 就不再对旧版本做任何技术支持. -- 使用外部网站的链接时 (如将下载任务发送到自己的服务器 / 使用链接安装组件等) 可能会提示"脚本试图访问跨域资源", 请选择"始终允许". -- 需要在至少 1400 x 800 以上的逻辑分辨率下使用. +- 使用外部网站的链接时 (如将下载任务发送到自己的服务器 / 使用链接安装组件等) 可能会提示"脚本试图访问跨域资源", 请选择"始终允许" 避免下次还提示. | 正式版 (jsDelivr 源) | 正式版 (GitHub 源) | 预览版 | | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | @@ -73,16 +70,27 @@ about-panel -# 推荐配置 -- 操作系统: 64-bit Windows 10 / macOS Sonoma -- 分辨率: 3840x2160 / 192ppi -- 浏览器: Chrome 100+ / Firefox 103+ / Safari 15.4+ (仅理论上能运行, 没测试过) -- 处理器: Intel Core i7-9750H / AMD Ryzen 5 5600H +# 配置 +## 最低配置 +- 操作系统: Windows 8.1 / macOS Big Sur +- 分辨率: 1920x1080, 缩放 125% +- 浏览器: Chrome 105+ / Firefox 121+ / Safari 15.4+ (仅理论上能运行, 没测试过) +- 处理器: Intel Core i5-10500 / AMD Ryzen 5 3600 - 内存: 8GB -- 脚本管理器: Tampermonkey 4.14 / Violentmonkey 2.13 +- 脚本管理器: Tampermonkey 5.0 / Violentmonkey 2.18 - 显卡: GeForce GTX 1050 / Radeon HD 7870 - 网络: 10MB/s +## 推荐配置 +- 操作系统: Windows 10 / macOS Sonoma +- 分辨率: 3840x2160, 缩放 200% +- 浏览器: Chrome 120+ / Firefox 121+ +- 处理器: Intel Core i7-11700 / AMD Ryzen 7 5800 +- 内存: 32GB +- 脚本管理器: Tampermonkey 5.0 / Violentmonkey 2.18 +- 显卡: GeForce RTX 3060 / Radeon RX 6600XT +- 网络: 20MB/s + # 兼容性 ## 脚本管理器 diff --git a/doc/donate.md b/doc/donate.md index fc692bcc7..6fefffe14 100644 --- a/doc/donate.md +++ b/doc/donate.md @@ -29,6 +29,11 @@ https://afdian.net/@the1812?tab=sponsor | 时间 | 用户名 | 单号后4位 | 金额 | | ------------------- | --------------------- | --------- | ------- | +| 2024.01.12 22:02:24 | 简式谐_LastofNESTS | 5700 | ¥22.33 | +| 2024.01.02 16:44:38 | O*h | 5101 | ¥10.00 | +| 2023.12.18 21:46:53 | *京 | 1206 | ¥20.00 | +| 2023.12.12 19:57:57 | *克 | 0688 | ¥2.33 | +| 2023.11.30 09:23:38 | *漩 | 2405 | ¥5.00 | | 2023.11.22 15:55:16 | *楠 | 2917 | ¥30.00 | | 2023.10.30 11:02:52 | *分 | 9485 | ¥3.00 | | 2023.10.17 09:38:26 | f*t | 0728 | ¥10.00 | diff --git a/doc/features/features.json b/doc/features/features.json index 920995a43..a4d29fea2 100644 --- a/doc/features/features.json +++ b/doc/features/features.json @@ -195,7 +195,7 @@ "type": "component", "name": "customFontFamily", "displayName": "自定义字体", - "description": "by [@Tinhone](https://github.com/Tinhone)\n\n使用组件提供的字体设置覆盖原版的主站字体,并使主站字体可被自定义。字体设置写法请参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family) 、默认设置与设置说明", + "description": "by [@Tinhone](https://github.com/Tinhone)\n\n使用组件提供的字体设置覆盖原版的主站字体,并使主站字体可被自定义。\r\n\r\n当组件被启用后,几乎所有的元素会立即应用组件提供的字体设置。\r\n\r\n选项说明:\r\n- `禁用标题标点符号缩进`: 在新版视频页中,推荐视频栏中的视频标题,如果首个字符是特定的标点符号,则文本会缩入左侧。这个选项可以禁用这种样式\r\n- `更多选项`:\r\n - `自定义字体`: 设置自定义字体。写法请参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family)、默认设置与设置说明。\r\n - `覆盖选项`: 相当于一个白名单,使用了特殊字体的元素会被加入其中。默认情况下这些元素不会应用组件提供的字体设置,只有在启用对应的选项后才会应用。", "fullRelativePath": "../../registry/dist/components/style/custom-font-family.js", "fullAbsolutePath": "registry/dist/components/style/custom-font-family.js" }, @@ -619,7 +619,7 @@ "type": "component", "name": "watchlaterRedirect", "displayName": "稍后再看重定向", - "description": "将稍后再看的链接重定向为普通播放网址.", + "description": "将稍后再看的链接重定向为普通播放网址.\r\n- `重定向页面`: 对稍后再看列表页面里的链接重定向.\r\n- `重定向顶栏`: 对 `自定义顶栏` 里的稍后再看链接重定向.\r\n", "fullRelativePath": "../../registry/dist/components/utils/watchlater-redirect.js", "fullAbsolutePath": "registry/dist/components/utils/watchlater-redirect.js" }, @@ -904,6 +904,14 @@ "description": "by FoundTheWOUT\n\n在视频播放器右上角显示系统时间.", "owner": "FoundTheWOUT" }, + { + "type": "plugin", + "name": "feedsFilter.pluginBlocks.chargeFeeds", + "displayName": "动态过滤器 - 移除充电专属动态", + "description": "移除动态里的充电专属动态, 装有 `动态过滤器` 时生效.\r\n", + "fullRelativePath": "../../registry/dist/plugins/feeds/filter/hide-charge-feeds.js", + "fullAbsolutePath": "registry/dist/plugins/feeds/filter/hide-charge-feeds.js" + }, { "type": "plugin", "name": "launchBar.actions.audioSearch", @@ -1032,6 +1040,14 @@ "fullRelativePath": "../../registry/dist/plugins/video/download/aria2-output.js", "fullAbsolutePath": "registry/dist/plugins/video/download/aria2-output.js" }, + { + "type": "plugin", + "name": "downloadVideo.outputs.empty", + "displayName": "下载视频 - 空输出", + "description": "提供一个 \"空\" 的输出选项, 只想获取下载视频的附带产物 (弹幕, 字幕等) 时可以使用此插件.\r\n", + "fullRelativePath": "../../registry/dist/plugins/video/download/empty-output.js", + "fullAbsolutePath": "registry/dist/plugins/video/download/empty-output.js" + }, { "type": "plugin", "name": "downloadVideo.outputs.idm", @@ -1056,6 +1072,14 @@ "fullRelativePath": "../../registry/dist/plugins/video/download/motrix-output.js", "fullAbsolutePath": "registry/dist/plugins/video/download/motrix-output.js" }, + { + "type": "plugin", + "name": "downloadVideo.outputs.mpv-ex", + "displayName": "下载视频 - MPV 输出支持加强版", + "description": "by [@asuaaa](https://github.com/Asukaaaaaa)\n\n为下载视频增加 MPV 输出,支持导出列表, 配置方式请参考 [README](https://github.com/Asukaaaaaa/tricks/blob/main/Bilibili-Evolved%20mpv-ex%20%E6%8F%92%E4%BB%B6.md)", + "fullRelativePath": "../../registry/dist/plugins/video/download/mpv-output-ex.js", + "fullAbsolutePath": "registry/dist/plugins/video/download/mpv-output-ex.js" + }, { "type": "plugin", "name": "downloadVideo.outputs.mpv-playlist", @@ -1072,6 +1096,14 @@ "fullRelativePath": "../../registry/dist/plugins/video/download/mpv-output.js", "fullAbsolutePath": "registry/dist/plugins/video/download/mpv-output.js" }, + { + "type": "plugin", + "name": "downloadVideo.outputs.wasm", + "displayName": "下载视频 - WASM 混流输出", + "description": "by [@WakelessSloth56](https://github.com/WakelessSloth56)\n\n使用 WASM 在浏览器中下载并合并音视频", + "fullRelativePath": "../../registry/dist/plugins/video/download/wasm-output.js", + "fullAbsolutePath": "registry/dist/plugins/video/download/wasm-output.js" + }, { "type": "plugin", "name": "speed.keymap", diff --git a/doc/features/features.md b/doc/features/features.md index 0006ebc81..fe278556b 100644 --- a/doc/features/features.md +++ b/doc/features/features.md @@ -242,7 +242,15 @@ by [@RieN7](https://github.com/rien7) by [@Tinhone](https://github.com/Tinhone) -使用组件提供的字体设置覆盖原版的主站字体,并使主站字体可被自定义。字体设置写法请参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family) 、默认设置与设置说明 +使用组件提供的字体设置覆盖原版的主站字体,并使主站字体可被自定义。 + +当组件被启用后,几乎所有的元素会立即应用组件提供的字体设置。 + +选项说明: +- `禁用标题标点符号缩进`: 在新版视频页中,推荐视频栏中的视频标题,如果首个字符是特定的标点符号,则文本会缩入左侧。这个选项可以禁用这种样式 +- `更多选项`: + - `自定义字体`: 设置自定义字体。写法请参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family)、默认设置与设置说明。 + - `覆盖选项`: 相当于一个白名单,使用了特殊字体的元素会被加入其中。默认情况下这些元素不会应用组件提供的字体设置,只有在启用对应的选项后才会应用。 ### [自定义顶栏](../../registry/dist/components/style/custom-navbar.js) `customNavbar` @@ -821,6 +829,8 @@ by [@Light_Quanta](https://github.com/LightQuanta) **GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/watchlater-redirect.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/utils/watchlater-redirect.js) 将稍后再看的链接重定向为普通播放网址. +- `重定向页面`: 对稍后再看列表页面里的链接重定向. +- `重定向顶栏`: 对 `自定义顶栏` 里的稍后再看链接重定向. ### [自动移出稍后再看](../../registry/dist/components/video/auto-remove-watchlater.js) `autoRemoveWatchlater` @@ -1242,6 +1252,15 @@ by FoundTheWOUT 在视频播放器右上角显示系统时间. ## 插件 +### [动态过滤器 - 移除充电专属动态](../../registry/dist/plugins/feeds/filter/hide-charge-feeds.js) +`feedsFilter.pluginBlocks.chargeFeeds` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/feeds/filter/hide-charge-feeds.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/feeds/filter/hide-charge-feeds.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/feeds/filter/hide-charge-feeds.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/feeds/filter/hide-charge-feeds.js) + +移除动态里的充电专属动态, 装有 `动态过滤器` 时生效. + ### [搜索栏 - 音频跳转](../../registry/dist/plugins/launch-bar/audio-search.js) `launchBar.actions.audioSearch` @@ -1388,6 +1407,15 @@ by FoundTheWOUT 为下载视频增加 aria2 文件导出和 RPC 输出支持. +### [下载视频 - 空输出](../../registry/dist/plugins/video/download/empty-output.js) +`downloadVideo.outputs.empty` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/video/download/empty-output.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/video/download/empty-output.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/video/download/empty-output.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/video/download/empty-output.js) + +提供一个 "空" 的输出选项, 只想获取下载视频的附带产物 (弹幕, 字幕等) 时可以使用此插件. + ### [下载视频 - IDM 输出支持](../../registry/dist/plugins/video/download/idm-output.js) `downloadVideo.outputs.idm` @@ -1415,6 +1443,17 @@ by FoundTheWOUT 为下载视频增加 Motrix 输出支持. +### [下载视频 - MPV 输出支持加强版](../../registry/dist/plugins/video/download/mpv-output-ex.js) +`downloadVideo.outputs.mpv-ex` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/video/download/mpv-output-ex.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/video/download/mpv-output-ex.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/video/download/mpv-output-ex.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/video/download/mpv-output-ex.js) + +by [@asuaaa](https://github.com/Asukaaaaaa) + +为下载视频增加 MPV 输出,支持导出列表, 配置方式请参考 [README](https://github.com/Asukaaaaaa/tricks/blob/main/Bilibili-Evolved%20mpv-ex%20%E6%8F%92%E4%BB%B6.md) + ### [下载视频 - MPV 播放支持(列表)](../../registry/dist/plugins/video/download/mpv-output-playlist.js) `downloadVideo.outputs.mpv-playlist` @@ -1437,6 +1476,17 @@ by [@diannaojiang](https://github.com/diannaojiang) 为下载视频增加 MPV 输出支持, 配置方式请参考 [Bilibili-Playin-Mpv](https://github.com/diannaojiang/Bilibili-Playin-Mpv) +### [下载视频 - WASM 混流输出](../../registry/dist/plugins/video/download/wasm-output.js) +`downloadVideo.outputs.wasm` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/video/download/wasm-output.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/video/download/wasm-output.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/video/download/wasm-output.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/video/download/wasm-output.js) + +by [@WakelessSloth56](https://github.com/WakelessSloth56) + +使用 WASM 在浏览器中下载并合并音视频 + ### [快捷键扩展 - 视频倍速](../../registry/dist/plugins/video/player/speed.js) `speed.keymap` diff --git a/registry/lib/components/feeds/extend-live/LiveList.vue b/registry/lib/components/feeds/extend-live/LiveList.vue index 3895f3342..f73827ca2 100644 --- a/registry/lib/components/feeds/extend-live/LiveList.vue +++ b/registry/lib/components/feeds/extend-live/LiveList.vue @@ -109,20 +109,65 @@ export default Vue.extend({ try { this.items = [] this.loaded = false - const pageSize = 24 - const [promise] = responsiveGetPages({ + const [, promise] = responsiveGetPages({ api: page => getJsonWithCredentials( - `https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${page}&pagesize=${pageSize}`, + `https://api.live.bilibili.com/xlive/web-ucenter/v1/xfetter/GetWebList?page=${page}`, ), - getList: json => lodash.get(json, 'data.list', []), - getTotal: json => lodash.get(json, 'data.results', 0), + getList: json => + lodash.get(json, 'data.list', []).map(item => { + const { face, uname, title, room_id, cover_from_user, online, uid, link } = item + return { + cover: face, + face, + uname, + title, + roomid: room_id, + pic: cover_from_user, + online, + uid, + link, + } + }), + getTotal: json => lodash.get(json, 'data.count', 0), }) - this.items = await promise + + const [allItems, recommendItems] = await Promise.all([promise, this.fetchRecommendItems()]) + this.items = this.sortByRecommend(allItems, recommendItems) } finally { this.loaded = true } }, + + async fetchRecommendItems(): Promise { + // 动态portal接口会获取推荐的top30直播。同时这个接口不会忽略悄悄关注的up的直播。 + const portalList = await getJsonWithCredentials( + 'https://api.bilibili.com/x/polymer/web-dynamic/v1/portal', + ) + const recommendLiveItems = portalList.data.live_users.items.map(item => { + const { jump_url, room_id, face, title, uname, mid } = item + return { + cover: face, + face, + uname, + title, + roomid: room_id, + pic: '', // portal接口没有 + online: 0, // portal接口没有 + uid: mid, + link: jump_url, + } + }) + return recommendLiveItems + }, + + sortByRecommend(feedItems: LiveInfo[], recommendItems: LiveInfo[]) { + // recommendItems里的pic和online为默认值,但是ui也没用到。 + // 所以方便起见,直接拼接没出现在recommendItems里的item + const recommendRoomIds = recommendItems.map(item => item.roomid) + const feedConcatItems = feedItems.filter(item => !recommendRoomIds.includes(item.roomid)) + return lodash.concat(recommendItems, feedConcatItems) + }, }, }) @@ -136,96 +181,119 @@ export default Vue.extend({ font-size: 12px; color: #000; background-color: #fff; + body.dark & { background-color: #444; color: #eee; } + &-header { @include h-center(); justify-content: space-between; } + &-title { @include h-center(4px); font-size: 14px; } + &-count { opacity: 0.5; font-size: 12px; } + &-actions { @include h-center(4px); } + &-refresh { cursor: pointer; padding: 2px; + .be-icon { opacity: 0.5; transition: 0.35s ease-out; } + &:hover .be-icon { transform: rotate(360deg); opacity: 1; color: var(--theme-color); } } + &-more { opacity: 0.5; padding: 2px; cursor: pointer; @include h-center(); + &:hover { opacity: 1; color: var(--theme-color); } } + &-search { @include h-center(8px); + .be-icon { opacity: 0.6; } + .be-textbox { flex-grow: 1; } } + &-content { @include no-scrollbar(); @include v-stretch(8px); // 默认状态 max-height: calc(100vh - 358px); + // 开启过滤器 body.enable-feeds-filter & { max-height: calc(100vh - 414px); } + // 禁掉 profile 后 body.feeds-filter-side-block-profile & { max-height: calc(100vh - 218px); } } + &-item { @include h-center(8px); cursor: pointer; + &-avatar { overflow: hidden; border-radius: 50%; display: flex; border: 1px solid #8884; } + &-info { @include v-stretch(2px); flex-grow: 1; width: 0; } + &-title, &-user { @include single-line(); } + &-title { font-size: 14px; transition: 0.2s ease-out; } + &-user { opacity: 0.6; } + &:hover &-title { color: var(--theme-color); } diff --git a/registry/lib/components/feeds/filter/FeedsFilterCard.vue b/registry/lib/components/feeds/filter/FeedsFilterCard.vue index b92ad01d1..649a03f3c 100644 --- a/registry/lib/components/feeds/filter/FeedsFilterCard.vue +++ b/registry/lib/components/feeds/filter/FeedsFilterCard.vue @@ -227,6 +227,7 @@ body.enable-feeds-filter:not(.disable-feeds-filter) { @include type-block(); @include side-block(); @include pattern-block(); + @include plugin-block(); } body.disable-feeds-filter { .feeds-filter-section { diff --git a/registry/lib/components/feeds/filter/_blocker.scss b/registry/lib/components/feeds/filter/_blocker.scss index 66cce2521..53a085a5a 100644 --- a/registry/lib/components/feeds/filter/_blocker.scss +++ b/registry/lib/components/feeds/filter/_blocker.scss @@ -107,3 +107,9 @@ display: none !important; } } +@mixin plugin-block { + .bili-dyn-list__item.plugin-block, + .feed-card .card.plugin-block { + display: none !important; + } +} diff --git a/registry/lib/components/feeds/fold-comments/fold-comment.scss b/registry/lib/components/feeds/fold-comments/fold-comment.scss index 3f17e8481..bebfe6a51 100644 --- a/registry/lib/components/feeds/fold-comments/fold-comment.scss +++ b/registry/lib/components/feeds/fold-comments/fold-comment.scss @@ -35,7 +35,8 @@ font-size: 13px; } .at-panel, - .emoji-panel { + .emoji-panel, + .reply-operation .operation-list { z-index: 111; } } diff --git a/registry/lib/components/style/custom-font-family/data.ts b/registry/lib/components/style/custom-font-family/data.ts new file mode 100644 index 000000000..5c6d31df8 --- /dev/null +++ b/registry/lib/components/style/custom-font-family/data.ts @@ -0,0 +1,20 @@ +export const fontFamilyDefaultValue = + 'Microsoft Yahei, Helvetica Neue, Helvetica, Arial, Hiragino Sans GB, Heiti SC, Malgun Gothic' + +export const coverOptionsName = [ + { camel: 'coverOrnament', kebab: 'cover-ornament', display: '装扮字体' }, + { camel: 'coverFansMedal', kebab: 'cover-fans-medal', display: '粉丝勋章字体' }, + { camel: 'coverDanmaku', kebab: 'cover-danmaku', display: '弹幕字体' }, + { camel: 'coverIconFont', kebab: 'cover-icon-font', display: '图标字体' }, + { camel: 'coverColumn', kebab: 'cover-column', display: '专栏自定义字体' }, + { camel: 'coverScore', kebab: 'cover-score', display: '评分字体' }, +] + +export const coverOptionsDefaultValue = { + coverOrnament: false, + coverFansMedal: false, + coverDanmaku: false, + coverIconFont: false, + coverColumn: false, + coverScore: false, +} diff --git a/registry/lib/components/style/custom-font-family/disable-quotation-mark-text-indent.scss b/registry/lib/components/style/custom-font-family/disable-quotation-mark-text-indent.scss deleted file mode 100644 index f1c3c595c..000000000 --- a/registry/lib/components/style/custom-font-family/disable-quotation-mark-text-indent.scss +++ /dev/null @@ -1,16 +0,0 @@ -$name: 'custom-font-family'; - -html[#{$name}--options--disable-quotation-mark-text-indent='true'] - :is( - p[title^='「'], - p[title^='『'], - p[title^='【'], - h1[title^='「'], - h1[title^='『'], - h1[title^='【'], - h3[title^='「'], - h3[title^='『'], - h3[title^='【'] - ) { - text-indent: initial !important; -} diff --git a/registry/lib/components/style/custom-font-family/disable-title-punctuation-text-indent.scss b/registry/lib/components/style/custom-font-family/disable-title-punctuation-text-indent.scss new file mode 100644 index 000000000..bcf6d3301 --- /dev/null +++ b/registry/lib/components/style/custom-font-family/disable-title-punctuation-text-indent.scss @@ -0,0 +1,26 @@ +$name: 'custom-font-family'; + +html[#{$name}--options--disable-title-punctuation-text-indent='true'] + :is( + p[title^='「'], + p[title^='『'], + p[title^='【'], + h1[title^='「'], + h1[title^='『'], + h1[title^='【'], + h3[title^='「'], + h3[title^='『'], + h3[title^='【'], + p[title^='~'], + h3[title^='~'], + p[title^='《'], + h3[title^='《'], + p[title^='“'], + h3[title^='“'], + p[title^='~'], + h3[title^='~'], + p[title^='《'], + h3[title^='《'] + ) { + text-indent: initial !important; +} diff --git a/registry/lib/components/style/custom-font-family/extra-options/Entry.vue b/registry/lib/components/style/custom-font-family/extra-options/Entry.vue new file mode 100644 index 000000000..33013ba76 --- /dev/null +++ b/registry/lib/components/style/custom-font-family/extra-options/Entry.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/registry/lib/components/style/custom-font-family/extra-options/ExtraOptionsPanel.vue b/registry/lib/components/style/custom-font-family/extra-options/ExtraOptionsPanel.vue new file mode 100644 index 000000000..397e2a9bc --- /dev/null +++ b/registry/lib/components/style/custom-font-family/extra-options/ExtraOptionsPanel.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/registry/lib/components/style/custom-font-family/extra-options/Panel.vue b/registry/lib/components/style/custom-font-family/extra-options/Panel.vue new file mode 100644 index 000000000..044677ee1 --- /dev/null +++ b/registry/lib/components/style/custom-font-family/extra-options/Panel.vue @@ -0,0 +1,190 @@ +