diff --git a/.vscode/settings.json b/.vscode/settings.json index 6b6ce433a3..4ff1db3276 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,6 +16,7 @@ "cSpell.words": [ "afterbegin", "afterend", + "akari", "BALH", "Bangumi", "bevo", @@ -27,6 +28,7 @@ "bofqi", "BVID", "camelcase", + "cascader", "clipboardy", "cntr", "compositionend", diff --git a/CHANGELOG.md b/CHANGELOG.md index 11045244d2..94f0a6174b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,68 @@ # 更新日志 +## v2.9.5-preview +`2024-11-12` + +包含 [v2.9.5](https://github.com/the1812/Bilibili-Evolved/releases/tag/v2.9.5) 的所有更新内容. + +- `自定义顶栏` 的历史支持手动刷新. (#4948) + +## v2.9.5 +`2024-11-12` + +
+正式版用户将获得 v2.9.4-preview 的所有改动, 点击展开查看 + +✨新增 +- 新增组件 `隐藏头像框`. +> 隐藏页面中用户的头像框 (包括角标), 目前支持动态和视频页面. + +- 新增组件 `隐藏直播马赛克`. (#4634) +> 移除直播画面中的马赛克区域. + +- 优化了搜索框的搜索建议精准度. (#4833) +- 新增组件 `删除动态`. (PR #4915 by [gouzil](https://github.com/gouzil)) +> 删除动态, 可选转发抽奖, 和全部删除. + +- `保存视频元数据` 增加 FFMETADATA 字段选项. (PR #4943 by [WakelessSloth56](https://github.com/WakelessSloth56)) +- 新增组件 `评论内容替换`. (#4072) +> 替换评论中的内容. +> 可以添加多个替换配置, 每项配置可将一个关键词替换为其他文本. 若替换的目标是一个链接, 则视作替换为表情. +> + +- `直播信息扩充` 更换新的 API 接口. (PR #4964 by [Oxygenくん](https://github.com/oxygenkun)) + +
+ +✨新增 +- 新版视频推荐适配组件: + - `显示视频投稿时间` (#4934, PR #4960 by [呼乎户](https://github.com/wisokey)) + - `隐藏视频推荐` + - `选集区域优化`, 其中 `展开选集标题` 选项还可恢复分 P 数的展示 + - `传统连播模式` + - `展开弹幕列表` - `有选集时不自动展开` +- 优化在线仓库中的搜索逻辑和搜索为空的提示. (#4975, #4973) +- `自定义顶栏` 的历史支持显示分 P 数信息. (#1866) +- `删除广告` 更新对首页浮窗广告的屏蔽. (#5001) + +🐛修复 +- 修复 `简化直播间` 付费礼物屏蔽失效. (#4968) +- 修复动态菜单中的扩展菜单项失效. (#4976) +- `夜间模式` 排除工房页面, 避免文字难以阅读. (#4981) +- `自定义顶栏` 移除已下线的 `短剧榜` 入口. (#4987) +- 修复 `删除广告` 导致直播间和个人空间里的动态显示不出来. (#5003) +- 修复 `网址参数清理` 对需转义的字符处理不正确. (#5009) +- 修复组件描述在部分页面的标题颜色不正确. (#4995) +- 修复 `禁止跳转动态详情` 在带图转发动态二次转发后, 查看图片按钮失效. (PR #4980 by [sunfkny](https://github.com/sunfkny)) +- 插件 `下载视频 - WASM 混流输出` 修复写入元数据选项, 新增混流进度, 优化多集下载. (#4840, PR #4984 by [WakelessSloth56](https://github.com/WakelessSloth56)) + +☕开发者相关 +- `自定义顶栏` 未登录时的阿卡林头像转为内置. (感觉说不定 b 站哪天就把这图删了) + +🗑️废弃 +- 废弃 `简化首页` 功能, 请使用 [BewlyBewly](https://github.com/BewlyBewly/BewlyBewly) 替代. + ## v2.9.4-preview `2024-10-22` diff --git a/README.md b/README.md index 620b7151c0..f0996e6743 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,9 @@ # 相关推荐 这些脚本/插件同样能够改善您在B站的体验, 相同的功能将不会整合到 Bilibili Evolved, 但会尽可能地适配 -## bilibili 网页端添加 APP 首页推荐 -作者: [indefined](https://github.com/indefined) -- [GitHub](https://github.com/indefined/UserScripts/tree/master/bilibiliHome) -- [GreasyFork](https://greasyfork.org/zh-CN/scripts/368446-bilibili%E7%BD%91%E9%A1%B5%E7%AB%AF%E6%B7%BB%E5%8A%A0app%E9%A6%96%E9%A1%B5%E6%8E%A8%E8%8D%90) +## BewlyBewly +作者: [Hakadao](https://github.com/hakadao) +- [GitHub](https://github.com/BewlyBewly/BewlyBewly) ## pakku.js 哔哩哔哩弹幕过滤器 作者: [xmcp](https://github.com/xmcp) diff --git a/doc/donate.md b/doc/donate.md index 1b804b50b5..50d2f5cbe9 100644 --- a/doc/donate.md +++ b/doc/donate.md @@ -6,7 +6,7 @@ ## 爱发电 - + 爱发电 @@ -30,6 +30,8 @@ https://afdian.com/a/the1812?tab=sponsor | 时间 | 用户名 | 单号后4位 | 金额 | | ------------------- | --------------------- | --------- | ------- | +| 2024.10.24 19:59:56 | 匿名 | 5126 | ¥20.00 | +| 2024.10.24 03:07:40 | S*a | 8703 | ¥20.00 | | 2024.10.11 11:19:52 | 匿名 | 8738 | ¥100.00 | | 2024.09.28 22:43:29 | 匿名 | 7519 | ¥20.00 | | 2024.09.28 17:45:29 | *天 | 7998 | ¥20.00 | diff --git a/doc/features/features.json b/doc/features/features.json index 176fc61fe9..c32896e0d7 100644 --- a/doc/features/features.json +++ b/doc/features/features.json @@ -7,6 +7,14 @@ "fullRelativePath": "../../registry/dist/components/feeds/copy-link.js", "fullAbsolutePath": "registry/dist/components/feeds/copy-link.js" }, + { + "type": "component", + "name": "deleteFeeds", + "displayName": "删除动态", + "description": "删除动态, 可选转发抽奖, 和全部删除.\r\n", + "fullRelativePath": "../../registry/dist/components/feeds/del-feeds.js", + "fullAbsolutePath": "registry/dist/components/feeds/del-feeds.js" + }, { "type": "component", "name": "disableFeedsDetails", @@ -135,6 +143,14 @@ "fullRelativePath": "../../registry/dist/components/live/hide-gift-fullscreen.js", "fullAbsolutePath": "registry/dist/components/live/hide-gift-fullscreen.js" }, + { + "type": "component", + "name": "hideLivePlayerBlur", + "displayName": "隐藏直播马赛克", + "description": "移除直播画面中的马赛克区域.\r\n", + "fullRelativePath": "../../registry/dist/components/live/hide-player-blur.js", + "fullAbsolutePath": "registry/dist/components/live/hide-player-blur.js" + }, { "type": "component", "name": "liveHomeMute", @@ -295,6 +311,14 @@ "fullRelativePath": "../../registry/dist/components/style/hide/user-card.js", "fullAbsolutePath": "registry/dist/components/style/hide/user-card.js" }, + { + "type": "component", + "name": "hideUserPendent", + "displayName": "隐藏头像框", + "description": "隐藏页面中用户的头像框 (包括角标), 目前支持动态和视频页面.\r\n", + "fullRelativePath": "../../registry/dist/components/style/hide/user-pendent.js", + "fullAbsolutePath": "registry/dist/components/style/hide/user-pendent.js" + }, { "type": "component", "name": "hideVideoNotes", @@ -407,14 +431,6 @@ "fullRelativePath": "../../registry/dist/components/style/simplify/comments.js", "fullAbsolutePath": "registry/dist/components/style/simplify/comments.js" }, - { - "type": "component", - "name": "simplifyHome", - "displayName": "简化首页", - "description": "隐藏原版首页不需要的元素 / 分区.", - "fullRelativePath": "../../registry/dist/components/style/simplify/home.js", - "fullAbsolutePath": "registry/dist/components/style/simplify/home.js" - }, { "type": "component", "name": "simplifyLiveroom", @@ -527,6 +543,14 @@ "fullRelativePath": "../../registry/dist/components/utils/column-unlock.js", "fullAbsolutePath": "registry/dist/components/utils/column-unlock.js" }, + { + "type": "component", + "name": "commentContentReplace", + "displayName": "评论内容替换", + "description": "替换评论中的内容.\r\n\r\n可以添加多个替换配置, 每项配置可将一个关键词替换为其他文本. 若替换的目标是一个链接, 则视作替换为表情, 留空则会移除命中的关键词.\r\n", + "fullRelativePath": "../../registry/dist/components/utils/comments/content-replace.js", + "fullAbsolutePath": "registry/dist/components/utils/comments/content-replace.js" + }, { "type": "component", "name": "copyCommentsLink", @@ -739,7 +763,7 @@ "type": "component", "name": "fullEpisodeTitle", "displayName": "选集区域优化", - "description": "提供一些视频选集区域的优化, 对番剧无效.\r\n- `展开选集标题`: 总是完全展开视频选集列表项的标题\r\n- `展开选集列表`: 总是完全展开视频选集列表\r\n\r\n打开 `展开选集列表` 时, 在选集区域的标题上按住 Alt 键点击可以临时切换展开/收起选集列表.\r\n", + "description": "提供一些视频选集区域的优化, 对番剧无效.\r\n- `展开选集标题`: 总是完全展开视频选集列表项的标题, 若为传统分 P 列表, 还会恢复显示分 P 数的前缀.\r\n- `展开选集列表`: 总是完全展开视频选集列表\r\n\r\n打开 `展开选集列表` 时, 在选集区域的标题上按住 Alt 键点击可以临时切换此组件的效果.\r\n", "fullRelativePath": "../../registry/dist/components/video/full-episode-title.js", "fullAbsolutePath": "registry/dist/components/video/full-episode-title.js" }, diff --git a/doc/features/features.md b/doc/features/features.md index 570495dddf..a9b2407bbf 100644 --- a/doc/features/features.md +++ b/doc/features/features.md @@ -11,6 +11,15 @@ 开启后, 可在每条动态的菜单中选择复制链接. +### [删除动态](../../registry/dist/components/feeds/del-feeds.js) +`deleteFeeds` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/feeds/del-feeds.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/feeds/del-feeds.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/feeds/del-feeds.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/feeds/del-feeds.js) + +删除动态, 可选转发抽奖, 和全部删除. + ### [禁止跳转动态详情](../../registry/dist/components/feeds/disable-details.js) `disableFeedsDetails` @@ -170,6 +179,15 @@ by [@TimmyOVO](https://github.com/TimmyOVO) 移除全屏观看直播时的底部礼物栏 +### [隐藏直播马赛克](../../registry/dist/components/live/hide-player-blur.js) +`hideLivePlayerBlur` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/live/hide-player-blur.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/live/hide-player-blur.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/live/hide-player-blur.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/live/hide-player-blur.js) + +移除直播画面中的马赛克区域. + ### [直播首页静音](../../registry/dist/components/live/home-mute.js) `liveHomeMute` @@ -389,6 +407,15 @@ by [@WakelessSloth56](https://github.com/WakelessSloth56) 隐藏鼠标指向用户名或用户头像时弹出的浮动用户信息卡片 +### [隐藏头像框](../../registry/dist/components/style/hide/user-pendent.js) +`hideUserPendent` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/style/hide/user-pendent.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/style/hide/user-pendent.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/user-pendent.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/user-pendent.js) + +隐藏页面中用户的头像框 (包括角标), 目前支持动态和视频页面. + ### [隐藏记笔记](../../registry/dist/components/style/hide/video/notes.js) `hideVideoNotes` @@ -545,15 +572,6 @@ by [@RieN7](https://github.com/rien7),[@ZiuChen](https://github.com/ZiuChen),[@L - `粉丝勋章`: 隐藏用户的粉丝勋章. - `小喇叭横幅`: 隐藏评论区顶部的小喇叭横幅 -### [简化首页](../../registry/dist/components/style/simplify/home.js) -`simplifyHome` - -**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/style/simplify/home.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/style/simplify/home.js) - -**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/home.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/home.js) - -隐藏原版首页不需要的元素 / 分区. - ### [简化直播间](../../registry/dist/components/style/simplify/live.js) `simplifyLiveroom` @@ -695,6 +713,17 @@ by [@snowraincloud](https://github.com/snowraincloud) 避免专栏的文字复制后在最后带上出处信息, 更贴近原生的复制行为. +### [评论内容替换](../../registry/dist/components/utils/comments/content-replace.js) +`commentContentReplace` + +**jsDelivr:** [`Stable`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/utils/comments/content-replace.js) / [`Preview`](https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/utils/comments/content-replace.js) + +**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/comments/content-replace.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/utils/comments/content-replace.js) + +替换评论中的内容. + +可以添加多个替换配置, 每项配置可将一个关键词替换为其他文本. 若替换的目标是一个链接, 则视作替换为表情, 留空则会移除命中的关键词. + ### [复制评论链接](../../registry/dist/components/utils/comments/copy-link.js) `copyCommentsLink` @@ -1028,10 +1057,10 @@ by [@kdxcxs](https://github.com/kdxcxs) **GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/video/full-episode-title.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/video/full-episode-title.js) 提供一些视频选集区域的优化, 对番剧无效. -- `展开选集标题`: 总是完全展开视频选集列表项的标题 +- `展开选集标题`: 总是完全展开视频选集列表项的标题, 若为传统分 P 列表, 还会恢复显示分 P 数的前缀. - `展开选集列表`: 总是完全展开视频选集列表 -打开 `展开选集列表` 时, 在选集区域的标题上按住 Alt 键点击可以临时切换展开/收起选集列表. +打开 `展开选集列表` 时, 在选集区域的标题上按住 Alt 键点击可以临时切换此组件的效果. ### [保存视频元数据](../../registry/dist/components/video/metadata.js) `saveVideoMetadata` diff --git a/doc/features/pack/pack.json b/doc/features/pack/pack.json index 0a9d4d3e98..8bbc1be2d4 100644 --- a/doc/features/pack/pack.json +++ b/doc/features/pack/pack.json @@ -2,7 +2,7 @@ { "name": "cleaner", "displayName": "简洁至上", - "description": "简化各种多余界面元素, 专注于内容本身.\n\n包含以下功能:\n删除广告, 删除直播水印, 删除视频弹窗, 禁用特殊弹幕样式, 简化评论区, 简化直播间, 简化首页, 自动收起直播侧栏, 隐藏视频推荐, 隐藏直播推荐, 隐藏视频标题层", + "description": "简化各种多余界面元素, 专注于内容本身.\n\n包含以下功能:\n删除广告, 删除直播水印, 删除视频弹窗, 禁用特殊弹幕样式, 简化评论区, 简化直播间, 自动收起直播侧栏, 隐藏视频推荐, 隐藏直播推荐, 隐藏视频标题层", "components": [ "removePromotions", "removeLiveWatermark", @@ -10,7 +10,6 @@ "disableSpecialDanmaku", "simplifyComments", "simplifyLiveroom", - "simplifyHome", "collapseLiveSideBar", "hideRelatedVideos", "hideRecommendedLive", @@ -65,14 +64,6 @@ "fullRelativePath": "../../registry/dist/components/style/simplify/live.js", "fullAbsolutePath": "registry/dist/components/style/simplify/live.js" }, - { - "type": "component", - "name": "simplifyHome", - "displayName": "简化首页", - "description": "隐藏原版首页不需要的元素 / 分区.", - "fullRelativePath": "../../registry/dist/components/style/simplify/home.js", - "fullAbsolutePath": "registry/dist/components/style/simplify/home.js" - }, { "type": "component", "name": "collapseLiveSideBar", diff --git a/doc/features/pack/pack.md b/doc/features/pack/pack.md index 08604ae2c8..384791c076 100644 --- a/doc/features/pack/pack.md +++ b/doc/features/pack/pack.md @@ -5,7 +5,7 @@ 简化各种多余界面元素, 专注于内容本身. 包含以下功能: -删除广告, 删除直播水印, 删除视频弹窗, 禁用特殊弹幕样式, 简化评论区, 简化直播间, 简化首页, 自动收起直播侧栏, 隐藏视频推荐, 隐藏直播推荐, 隐藏视频标题层 +删除广告, 删除直播水印, 删除视频弹窗, 禁用特殊弹幕样式, 简化评论区, 简化直播间, 自动收起直播侧栏, 隐藏视频推荐, 隐藏直播推荐, 隐藏视频标题层
jsDelivr Stable @@ -17,7 +17,6 @@ https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/ https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/special-danmaku.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/comments.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/live.js -https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/home.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/live/side-bar.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/video/related-videos.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/video/recommended-live.js @@ -35,7 +34,6 @@ https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/special-danmaku.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/comments.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/live.js -https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/home.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/live/side-bar.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/video/related-videos.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/video/recommended-live.js @@ -53,7 +51,6 @@ https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/ https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/special-danmaku.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/comments.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/live.js -https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/simplify/home.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/live/side-bar.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/video/related-videos.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/video/recommended-live.js @@ -71,7 +68,6 @@ https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/special-danmaku.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/comments.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/live.js -https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/simplify/home.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/live/side-bar.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/video/related-videos.js https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/video/recommended-live.js diff --git a/registry/lib/components/feeds/del-feeds/Widget.vue b/registry/lib/components/feeds/del-feeds/Widget.vue new file mode 100644 index 0000000000..12321d57c8 --- /dev/null +++ b/registry/lib/components/feeds/del-feeds/Widget.vue @@ -0,0 +1,42 @@ + + + diff --git a/registry/lib/components/feeds/del-feeds/check-in-item.ts b/registry/lib/components/feeds/del-feeds/check-in-item.ts new file mode 100644 index 0000000000..67b56c0ca4 --- /dev/null +++ b/registry/lib/components/feeds/del-feeds/check-in-item.ts @@ -0,0 +1,134 @@ +import { getJsonWithCredentials, postJsonWithCredentials } from '@/core/ajax' +import { Toast } from '@/core/toast' +import { getUID, getCsrf } from '@/core/utils' +import { registerAndGetData } from '@/plugins/data' + +export interface CheckInItem { + name: string + displayName: string + icon: string + action: (button: HTMLDivElement, event: MouseEvent) => Promise + disabled?: boolean +} +const builtInItems: CheckInItem[] = [ + { + name: 'del-all-feeds', + displayName: '删除所有动态', + icon: 'mdi-delete', + action: async () => { + const { forEachFeedsCard } = await import('@/components/feeds/api') + Toast.info('如果想删除所有动态, 可以一直下拉页面到没有动态为止', '删除动态', 3000) + + // 只能删除本页 + await forEachFeedsCard({ + added: async card => { + // 检查是否是转发动态 + const post_del_dynamic_data = { + dyn_id_str: card.id, + dyn_type: card.type.id, + rid_str: card.id, + } + // 删除动态 + const del_dynamic_resp = JSON.parse( + await postJsonWithCredentials( + `https://api.bilibili.com/x/dynamic/feed/operate/remove?platform=web&csrf=${getCsrf()}`, + post_del_dynamic_data, + ), + ) as { + code: number + message: string + ttl: number + data: null + } + + if (del_dynamic_resp.code === 0) { + console.info('删除动态成功: ', card.id) + } else { + console.info('删除动态失败: ', card.id, del_dynamic_resp) + } + }, + }) + Toast.success(`打开控制台查看删除动态结果`, '删除动态', 3000) + }, + }, + { + name: 'del-feeds', + displayName: '删除转发抽奖动态', + icon: 'mdi-delete', + action: async () => { + const { forEachFeedsCard } = await import('@/components/feeds/api') + Toast.info('如果想删除所有动态, 可以一直下拉页面到没有动态为止', '删除动态', 3000) + await forEachFeedsCard({ + added: async card => { + const { isRepostType } = await import('@/components/feeds/api') + + // 判断是否是转发动态 + if (isRepostType(card)) { + const uid = getUID() + + const dynamic_info = (await getJsonWithCredentials( + `https://api.vc.bilibili.com/lottery_svr/v2/lottery_svr/lottery_notice?dynamic_id=${card.repostId}`, + )) as { + code: number + data: { + lottery_time: number + lottery_result: { + first_prize_result: { + uid: number + }[] + } + } + } + + // 检查抽奖时间 + if ( + dynamic_info.data.lottery_time && + dynamic_info.data.lottery_time > Date.now() / 1000 + ) { + // 抽奖未开始, 不能删除 + return + } + + if (dynamic_info.code === 0) { + // 检查是否中奖 + for (let i = 0; i < dynamic_info.data.lottery_result.first_prize_result.length; i++) { + if (dynamic_info.data.lottery_result.first_prize_result[i].uid === Number(uid)) { + Toast.info(`居然中奖了, 不能接受😭😭😭, 动态ID: ${card.id}`, '删除动态', 10000) + return + } + } + + const post_del_dynamic_data = { + dyn_id_str: card.id, + dyn_type: card.type.id, + rid_str: card.id, + } + // 删除动态 + const del_dynamic_resp = JSON.parse( + await postJsonWithCredentials( + `https://api.bilibili.com/x/dynamic/feed/operate/remove?platform=web&csrf=${getCsrf()}`, + post_del_dynamic_data, + ), + ) as { + code: number + message: string + ttl: number + data: null + } + + if (del_dynamic_resp.code === 0) { + console.info('删除动态成功: ', card.id) + } else { + console.info('删除动态失败: ', card.id, del_dynamic_resp) + } + } + } + }, + }) + + Toast.success(`打开控制台查看删除动态结果`, '删除动态', 3000) + }, + }, +] + +export const [checkInItems] = registerAndGetData('deleteFeeds.items', builtInItems) diff --git a/registry/lib/components/feeds/del-feeds/index.md b/registry/lib/components/feeds/del-feeds/index.md new file mode 100644 index 0000000000..59fb2a8534 --- /dev/null +++ b/registry/lib/components/feeds/del-feeds/index.md @@ -0,0 +1 @@ +删除动态, 可选转发抽奖, 和全部删除. diff --git a/registry/lib/components/feeds/del-feeds/index.ts b/registry/lib/components/feeds/del-feeds/index.ts new file mode 100644 index 0000000000..d9d9e9eb90 --- /dev/null +++ b/registry/lib/components/feeds/del-feeds/index.ts @@ -0,0 +1,16 @@ +import { defineComponentMetadata } from '@/components/define' +import { getUID } from '@/core/utils' + +export const component = defineComponentMetadata({ + name: 'deleteFeeds', + displayName: '删除动态', + tags: [componentsTags.feeds], + description: { + 'zh-CN': `删除动态, 可选转发抽奖(不会删除自己中奖的动态), 和全部删除.`, + }, + entry: none, + urlInclude: [`https://space.bilibili.com/${getUID()}/dynamic`], + widget: { + component: () => import('./Widget.vue').then(m => m.default), + }, +}) diff --git a/registry/lib/components/feeds/disable-details/index.ts b/registry/lib/components/feeds/disable-details/index.ts index cfc9e9a4be..c781c0a729 100644 --- a/registry/lib/components/feeds/disable-details/index.ts +++ b/registry/lib/components/feeds/disable-details/index.ts @@ -41,6 +41,7 @@ const entry = async () => { 'bili-rich-text-topic', 'bili-rich-text-module', 'bili-rich-text-link', + 'bili-rich-text-viewpic', ].some(className => target.classList.contains(className)) ) { return diff --git a/registry/lib/components/feeds/extend-live/LiveList.vue b/registry/lib/components/feeds/extend-live/LiveList.vue index f73827ca2d..3a4412ecce 100644 --- a/registry/lib/components/feeds/extend-live/LiveList.vue +++ b/registry/lib/components/feeds/extend-live/LiveList.vue @@ -50,7 +50,7 @@ diff --git a/registry/lib/components/live/chat-panel-fit/chat-panel-fit.scss b/registry/lib/components/live/chat-panel-fit/chat-panel-fit.scss index f3d150d8d5..b07258ce78 100644 --- a/registry/lib/components/live/chat-panel-fit/chat-panel-fit.scss +++ b/registry/lib/components/live/chat-panel-fit/chat-panel-fit.scss @@ -21,9 +21,13 @@ } } } - .chat-input-ctnr-new .medal-section { - min-width: 0 !important; - max-width: 0 !important; + .chat-input-ctnr-new { + .medal-section { + display: none !important; + } + .chat-input-new:not(:has(textarea.focus)) { + padding-left: 12px !important; + } } } } diff --git a/registry/lib/components/live/hide-player-blur/hide-player-blur.scss b/registry/lib/components/live/hide-player-blur/hide-player-blur.scss new file mode 100644 index 0000000000..86abd60eb4 --- /dev/null +++ b/registry/lib/components/live/hide-player-blur/hide-player-blur.scss @@ -0,0 +1,3 @@ +#web-player-module-area-mask-panel { + z-index: -100 !important; +} diff --git a/registry/lib/components/live/hide-player-blur/index.md b/registry/lib/components/live/hide-player-blur/index.md new file mode 100644 index 0000000000..78df557fc3 --- /dev/null +++ b/registry/lib/components/live/hide-player-blur/index.md @@ -0,0 +1 @@ +移除直播画面中的马赛克区域. diff --git a/registry/lib/components/live/hide-player-blur/index.ts b/registry/lib/components/live/hide-player-blur/index.ts new file mode 100644 index 0000000000..b5cfe94b1d --- /dev/null +++ b/registry/lib/components/live/hide-player-blur/index.ts @@ -0,0 +1,11 @@ +import { defineComponentMetadata } from '@/components/define' +import { liveUrls } from '@/core/utils/urls' + +export const component = defineComponentMetadata({ + name: 'hideLivePlayerBlur', + displayName: '隐藏直播马赛克', + entry: none, + tags: [componentsTags.live, componentsTags.style], + urlInclude: [...liveUrls], + instantStyles: [{ name: 'hideLivePlayerBlur', style: () => import('./hide-player-blur.scss') }], +}) diff --git a/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue b/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue index 4e25c4ecc6..1331447690 100644 --- a/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue +++ b/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue @@ -59,7 +59,9 @@ class="progress" :style="{ width: h.progress * 100 + '%' }" > -
{{ h.durationText }}
+
+ {{ h.page }}P / {{ h.pages }}P +
{{ h.title || h.upName + '的直播间' @@ -360,14 +362,18 @@ export default Vue.extend({ &-items { padding: 0 12px; .floating { - @include round-bar(20); + @include round-bar(16); @include h-center(); background-color: #000c; color: white; justify-content: center; position: absolute; - opacity: 0; font-size: 11px; + padding: 2px 4px; + &.pages { + bottom: 4px; + right: 4px; + } } .time-group-item { display: grid; @@ -391,9 +397,6 @@ export default Vue.extend({ .cover { transform: scale(1.05); } - .floating { - opacity: 1; - } } .history-cover-container { $height: 55px; diff --git a/registry/lib/components/style/custom-navbar/history/types.ts b/registry/lib/components/style/custom-navbar/history/types.ts index 0767b42f16..2cb8ff19f2 100644 --- a/registry/lib/components/style/custom-navbar/history/types.ts +++ b/registry/lib/components/style/custom-navbar/history/types.ts @@ -36,8 +36,10 @@ export interface HistoryItem { duration: number /** 时长展示文字 */ durationText: string - /** 视频的分P */ + /** 视频的分 P */ page?: number + /** 视频的分 P 数 */ + pages?: number /** 直播状态: 0 未开播 1 直播中 2 轮播中 (似乎新 API 不会返回 2) */ liveStatus?: number /** 视频的tag/直播的分区名 */ @@ -131,6 +133,7 @@ const parseHistoryItem = (item: any): HistoryItem => { bvid, // 视频 bv号 cid, // 专栏 cv号 oid, // 直播 房间号 / 专栏 cv 号 / 课程神秘标识符 + page, } = item.history const progressParam = item.progress > 0 ? `t=${item.progress}` : 't=0' const progress = item.progress === -1 ? 1 : item.progress / item.duration @@ -189,6 +192,8 @@ const parseHistoryItem = (item: any): HistoryItem => { id: bvid, url: `https://www.bilibili.com/video/${bvid}?p=${item.history.page}&${progressParam}`, type: HistoryType.Video, + page, + pages: item.videos, } } if (cid) { diff --git a/registry/lib/components/style/custom-navbar/ranking/NavbarRanking.vue b/registry/lib/components/style/custom-navbar/ranking/NavbarRanking.vue index 688cf51918..afb557d115 100644 --- a/registry/lib/components/style/custom-navbar/ranking/NavbarRanking.vue +++ b/registry/lib/components/style/custom-navbar/ranking/NavbarRanking.vue @@ -34,10 +34,6 @@ const entries = [ href: 'https://www.bilibili.com/v/popular/music', name: '全站音乐榜', }, - { - href: 'https://www.bilibili.com/v/popular/drama', - name: '短剧榜', - }, ] as RankingEntry[] export default Vue.extend({ name: 'RankingPopup', diff --git a/registry/lib/components/style/custom-navbar/user-info/UserFace.vue b/registry/lib/components/style/custom-navbar/user-info/UserFace.vue index fdbf151403..3f790034fa 100644 --- a/registry/lib/components/style/custom-navbar/user-info/UserFace.vue +++ b/registry/lib/components/style/custom-navbar/user-info/UserFace.vue @@ -9,9 +9,9 @@ import { getUserInfo } from '@/core/user-info' import { getDpiSourceSet } from '@/core/utils' import { EmptyImageUrl } from '@/core/utils/constants' +import notLoginFaceUrl from './akari.jpg' const noFaceUrl = '//static.hdslb.com/images/member/noface.gif' -const notLoginFaceUrl = 'https://static.hdslb.com/images/akari.jpg' export default Vue.extend({ name: 'UserFace', data() { diff --git a/registry/lib/components/style/custom-navbar/user-info/akari.jpg b/registry/lib/components/style/custom-navbar/user-info/akari.jpg new file mode 100644 index 0000000000..5e5ea0bc91 Binary files /dev/null and b/registry/lib/components/style/custom-navbar/user-info/akari.jpg differ diff --git a/registry/lib/components/style/dark-mode/dark-urls.ts b/registry/lib/components/style/dark-mode/dark-urls.ts index 44b237f1fc..f1e9c1374a 100644 --- a/registry/lib/components/style/dark-mode/dark-urls.ts +++ b/registry/lib/components/style/dark-mode/dark-urls.ts @@ -14,4 +14,5 @@ export const darkExcludes = [ // 创作中心-收益管理-悬赏计划 '//cm.bilibili.com/quests/#/task', '//live.bilibili.com/activity/live-activity-full/full-next/index.html', + '//gf.bilibili.com/', ] diff --git a/registry/lib/components/style/hide/user-pendent/index.md b/registry/lib/components/style/hide/user-pendent/index.md new file mode 100644 index 0000000000..6d6069bab6 --- /dev/null +++ b/registry/lib/components/style/hide/user-pendent/index.md @@ -0,0 +1 @@ +隐藏页面中用户的头像框 (包括角标), 目前支持动态和视频页面. diff --git a/registry/lib/components/style/hide/user-pendent/index.ts b/registry/lib/components/style/hide/user-pendent/index.ts new file mode 100644 index 0000000000..5d2b950136 --- /dev/null +++ b/registry/lib/components/style/hide/user-pendent/index.ts @@ -0,0 +1,19 @@ +import { defineComponentMetadata } from '@/components/define' + +export const component = defineComponentMetadata({ + name: 'hideUserPendent', + displayName: '隐藏头像框', + entry: none, + tags: [componentsTags.style], + instantStyles: [ + { + name: 'hide-user-pendent', + style: () => import('./user-pendent.scss'), + }, + { + name: 'hide-user-pendent', + style: () => import('./user-pendent-shadow.scss'), + shadowDom: true, + }, + ], +}) diff --git a/registry/lib/components/style/hide/user-pendent/user-pendent-shadow.scss b/registry/lib/components/style/hide/user-pendent/user-pendent-shadow.scss new file mode 100644 index 0000000000..ffba4a2fb0 --- /dev/null +++ b/registry/lib/components/style/hide/user-pendent/user-pendent-shadow.scss @@ -0,0 +1,15 @@ +:host(bili-avatar) { + container-type: size; + container-name: avatar; + // .layers:first-child, + .layer:not(:first-child), + .layer:not(:has(picture), :has([style*="/face/"])) { + display: none; + } + .layer:is(:has(picture), :has([style*="/face/"])) { + min-width: 100cqw; + min-height: 100cqh; + max-width: 100cqw; + max-height: 100cqh; + } +} diff --git a/registry/lib/components/style/hide/user-pendent/user-pendent.scss b/registry/lib/components/style/hide/user-pendent/user-pendent.scss new file mode 100644 index 0000000000..925acfad62 --- /dev/null +++ b/registry/lib/components/style/hide/user-pendent/user-pendent.scss @@ -0,0 +1,27 @@ +.b-avatar { + container-type: size; + container-name: avatar; + &__layers:not(:first-child), + &__layer:not(:first-child) { + display: none !important; + } + &__layer:first-child { + min-width: 100cqw; + min-height: 100cqh; + } +} +.up-avatar { + container-type: size; + container-name: avatar; + .bili-avatar { + min-width: 100cqw; + min-height: 100cqh; + transform: none !important; + } +} +.bili-avatar { + &-icon, + &-pendent-dom { + display: none !important; + } +} diff --git a/registry/lib/components/style/hide/video/related-videos/related-videos.scss b/registry/lib/components/style/hide/video/related-videos/related-videos.scss index b9729e4869..770520abb9 100644 --- a/registry/lib/components/style/hide/video/related-videos/related-videos.scss +++ b/registry/lib/components/style/hide/video/related-videos/related-videos.scss @@ -4,7 +4,8 @@ .r-con .rcmd-list, .playlist-container .recommend-list-container, .bpx-player-ending-related, -.plp-r [class*="recommend_wrap"] { +.plp-r [class*="recommend_wrap"], +.video-container-v1 .recommend-list-v1 { display: none !important; } .bilibili-player-ending-panel-box-functions .bilibili-player-upinfo-spans { diff --git a/registry/lib/components/style/simplify/comments/comments-v2.scss b/registry/lib/components/style/simplify/comments/comments-v2.scss index b141557995..bc52ce7ee3 100644 --- a/registry/lib/components/style/simplify/comments/comments-v2.scss +++ b/registry/lib/components/style/simplify/comments/comments-v2.scss @@ -37,12 +37,6 @@ $prefix: 'simplifyComments-switch'; } } - body.#{$prefix}-userPendent & { - .bili-avatar-pendent-dom { - display: none !important; - } - } - body.#{$prefix}-decorateAndTime & { .reply-decorate { display: none !important; diff --git a/registry/lib/components/style/simplify/comments/index.ts b/registry/lib/components/style/simplify/comments/index.ts index 4a395d89e8..69800976da 100644 --- a/registry/lib/components/style/simplify/comments/index.ts +++ b/registry/lib/components/style/simplify/comments/index.ts @@ -17,10 +17,6 @@ export const component = wrapSwitchOptions({ defaultValue: true, displayName: '装扮 & 时间', }, - userPendent: { - defaultValue: false, - displayName: '头像框', - }, subReplyNewLine: { defaultValue: true, displayName: '回复换行', diff --git a/registry/lib/components/style/simplify/live/index.ts b/registry/lib/components/style/simplify/live/index.ts index ee2c8803e9..ebf4815149 100644 --- a/registry/lib/components/style/simplify/live/index.ts +++ b/registry/lib/components/style/simplify/live/index.ts @@ -1,5 +1,4 @@ import { wrapSwitchOptions } from '@/components/switch-options' -import { styledComponentEntry } from '@/components/styled-component' import { liveUrls } from '@/core/utils/urls' export const component = wrapSwitchOptions({ @@ -97,13 +96,17 @@ export const component = wrapSwitchOptions({ })({ name: 'simplifyLiveroom', displayName: '简化直播间', - entry: styledComponentEntry( - () => import('./live.scss'), - async () => { - const { setupSkinSimplify } = await import('./skin') - setupSkinSimplify() + entry: async () => { + const { setupSkinSimplify } = await import('./skin') + setupSkinSimplify() + }, + instantStyles: [ + { + name: 'simplify-liveroom', + style: () => import('./live.scss'), + important: true, }, - ), + ], description: { 'zh-CN': '隐藏直播间中各种不需要的内容.', }, diff --git a/registry/lib/components/style/simplify/live/live.scss b/registry/lib/components/style/simplify/live/live.scss index 0bdf92d533..0fdfb20254 100644 --- a/registry/lib/components/style/simplify/live/live.scss +++ b/registry/lib/components/style/simplify/live/live.scss @@ -164,7 +164,8 @@ $prefix: 'simplifyLiveroom-switch'; .gift-control-panel .wish-icon, .gift-control-panel .wish-tip, .gift-control-panel .left-part-ctnr, - .web-live-player-gift-icon-wrap { + .web-live-player-gift-icon-wrap, + .gift-control-panel .gift-presets .gift-panel.gift-panel.gift-panel { display: none !important; } .gift-control-section, @@ -188,6 +189,7 @@ $prefix: 'simplifyLiveroom-switch'; .gift-presets { .gift-section { display: flex !important; + justify-content: flex-end !important; } } .more-gift-section { diff --git a/registry/lib/components/utils/comments/content-replace/handlers/emoticon-to-emoticon.ts b/registry/lib/components/utils/comments/content-replace/handlers/emoticon-to-emoticon.ts new file mode 100644 index 0000000000..bc2586407b --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/emoticon-to-emoticon.ts @@ -0,0 +1,18 @@ +import { isUrl } from '../utils' +import { NodeContentReplacer } from './node-content-replacer' + +export class EmoticonToEmoticonReplacer extends NodeContentReplacer { + isKeywordMatch(node: Node, keyword: string, target: string) { + if (node instanceof HTMLImageElement) { + return node.alt === keyword && isUrl(target) + } + return false + } + replaceContent(node: Node, keyword: string, target: string): Node[] { + if (!(node instanceof HTMLImageElement)) { + return [] + } + node.src = target + return [] + } +} diff --git a/registry/lib/components/utils/comments/content-replace/handlers/emoticon-to-text.ts b/registry/lib/components/utils/comments/content-replace/handlers/emoticon-to-text.ts new file mode 100644 index 0000000000..7c70bf8748 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/emoticon-to-text.ts @@ -0,0 +1,21 @@ +import { NodeContentReplacer } from './node-content-replacer' + +export class EmoticonToTextReplacer extends NodeContentReplacer { + isKeywordMatch(node: Node, keyword: string) { + if (node instanceof HTMLImageElement) { + return node.alt === keyword + } + return false + } + replaceContent(node: Node, keyword: string, target: string): Node[] { + if (!(node instanceof HTMLImageElement)) { + return [] + } + if (target === '') { + node.remove() + } else { + node.replaceWith(new Text(target)) + } + return [] + } +} diff --git a/registry/lib/components/utils/comments/content-replace/handlers/index.ts b/registry/lib/components/utils/comments/content-replace/handlers/index.ts new file mode 100644 index 0000000000..514fdc828a --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/index.ts @@ -0,0 +1,49 @@ +import { registerAndGetData } from '@/plugins/data' +import { getComponentSettings } from '@/core/settings' +import { CommentContentReplaceHandler } from './types' +import { CommentContentReplaceOptions } from '../options' +import { NodeContentReplacer } from './node-content-replacer' +import { EmoticonToEmoticonReplacer } from './emoticon-to-emoticon' +import { EmoticonToTextReplacer } from './emoticon-to-text' +import { RecursiveReplacer } from './recursive' +import { TextToEmoticonReplacer } from './text-to-emoticon' +import { TextToTextReplacer } from './text-to-text' + +const { options } = getComponentSettings('commentContentReplace') + +const contentReplacers: NodeContentReplacer[] = [ + new TextToEmoticonReplacer(), + new EmoticonToEmoticonReplacer(), + new TextToTextReplacer(), + new EmoticonToTextReplacer(), + new RecursiveReplacer(), +] + +export const CommentContentReplaceDefaultHandlerReplaceMap = + 'commentContentReplace.defaultHandler.replaceMap' +const defaultHandler: CommentContentReplaceHandler = ({ content }) => { + const { replaceMap } = options + const [finalReplaceMap] = registerAndGetData( + CommentContentReplaceDefaultHandlerReplaceMap, + replaceMap, + ) + const replaceNodes = (nodes: Node[]) => { + nodes.forEach(node => { + Object.entries(finalReplaceMap).forEach(([from, to]) => { + if (from === to || from === '') { + return + } + const replacer = contentReplacers.find(r => r.isKeywordMatch(node, from, to)) + if (!replacer) { + return + } + const restParts = replacer.replaceContent(node, from, to) + replaceNodes(restParts) + }) + }) + } + replaceNodes(content) +} + +export const CommentContentReplaceHandlers = 'commentContentReplace.handlers' +export const handlers = registerAndGetData(CommentContentReplaceHandlers, [defaultHandler]) diff --git a/registry/lib/components/utils/comments/content-replace/handlers/node-content-replacer.ts b/registry/lib/components/utils/comments/content-replace/handlers/node-content-replacer.ts new file mode 100644 index 0000000000..819f1ced7c --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/node-content-replacer.ts @@ -0,0 +1,4 @@ +export abstract class NodeContentReplacer { + abstract isKeywordMatch(node: Node, keyword: string, target: string): boolean + abstract replaceContent(node: Node, keyword: string, target: string): Node[] +} diff --git a/registry/lib/components/utils/comments/content-replace/handlers/recursive.ts b/registry/lib/components/utils/comments/content-replace/handlers/recursive.ts new file mode 100644 index 0000000000..fa0a17e0e2 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/recursive.ts @@ -0,0 +1,10 @@ +import { NodeContentReplacer } from './node-content-replacer' + +export class RecursiveReplacer extends NodeContentReplacer { + isKeywordMatch() { + return true + } + replaceContent(node: Node): Node[] { + return Array.from(node.childNodes) + } +} diff --git a/registry/lib/components/utils/comments/content-replace/handlers/text-to-emoticon.ts b/registry/lib/components/utils/comments/content-replace/handlers/text-to-emoticon.ts new file mode 100644 index 0000000000..dd71991bd2 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/text-to-emoticon.ts @@ -0,0 +1,22 @@ +import { createEmoticonImage, isUrl } from '../utils' +import { NodeContentReplacer } from './node-content-replacer' + +export class TextToEmoticonReplacer extends NodeContentReplacer { + isKeywordMatch(node: Node, keyword: string, target: string) { + if (node instanceof Text) { + return node.textContent.includes(keyword) && isUrl(target) + } + return false + } + replaceContent(node: Node, keyword: string, target: string): Node[] { + const index = node.textContent.indexOf(keyword) + if (index === -1 || !(node instanceof Text)) { + return [] + } + const leftPart = new Text(node.textContent.substring(0, index)) + const imageElement = createEmoticonImage(target, keyword) + const rightPart = new Text(node.textContent.substring(index + keyword.length)) + node.replaceWith(leftPart, imageElement, rightPart) + return [rightPart] + } +} diff --git a/registry/lib/components/utils/comments/content-replace/handlers/text-to-text.ts b/registry/lib/components/utils/comments/content-replace/handlers/text-to-text.ts new file mode 100644 index 0000000000..0f8a634ee1 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/text-to-text.ts @@ -0,0 +1,20 @@ +import { NodeContentReplacer } from './node-content-replacer' + +export class TextToTextReplacer extends NodeContentReplacer { + isKeywordMatch(node: Node, keyword: string) { + if (node instanceof Text) { + return node.textContent.includes(keyword) + } + return false + } + replaceContent(node: Node, keyword: string, target: string): Node[] { + const index = node.textContent.indexOf(keyword) + if (index === -1) { + return [] + } + const leftPart = node.textContent.substring(0, index) + const rightPart = node.textContent.substring(index + keyword.length) + node.textContent = `${leftPart}${target}${rightPart}` + return [] + } +} diff --git a/registry/lib/components/utils/comments/content-replace/handlers/types.ts b/registry/lib/components/utils/comments/content-replace/handlers/types.ts new file mode 100644 index 0000000000..493f99df7a --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/handlers/types.ts @@ -0,0 +1,9 @@ +import type { CommentItem } from '@/components/utils/comment-apis' + +export interface CommentContentReplaceContext { + commentItem: CommentItem + content: Node[] +} +export type CommentContentReplaceHandler = ( + context: CommentContentReplaceContext, +) => void | Promise diff --git a/registry/lib/components/utils/comments/content-replace/index.md b/registry/lib/components/utils/comments/content-replace/index.md new file mode 100644 index 0000000000..6d980e9c7e --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/index.md @@ -0,0 +1,3 @@ +替换评论中的内容. + +可以添加多个替换配置, 每项配置可将一个关键词替换为其他文本. 若替换的目标是一个链接, 则视作替换为表情, 留空则会移除命中的关键词. diff --git a/registry/lib/components/utils/comments/content-replace/index.ts b/registry/lib/components/utils/comments/content-replace/index.ts new file mode 100644 index 0000000000..a383c06be9 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/index.ts @@ -0,0 +1,36 @@ +import { defineComponentMetadata } from '@/components/define' +import { forEachCommentItem } from '@/components/utils/comment-apis' +import { select } from '@/core/spin-query' +import { getData } from '@/plugins/data' +import type { CommentContentReplaceHandler } from './handlers/types' +import { commentContentReplaceOptions } from './options' + +export const component = defineComponentMetadata({ + name: 'commentContentReplace', + displayName: '评论内容替换', + tags: [componentsTags.utils], + options: commentContentReplaceOptions, + entry: async () => { + forEachCommentItem({ + added: async commentItem => { + const { CommentContentReplaceHandlers } = await import('./handlers') + if (commentItem.shadowDomEntry === undefined) { + return + } + const content = await select( + () => commentItem.shadowDomEntry.querySelector(':host(bili-rich-text) #contents'), + { queryInterval: 200 }, + ) + if (content === null) { + return + } + content.childNodes + const [handlers] = getData(CommentContentReplaceHandlers) as [ + CommentContentReplaceHandler[], + ] + handlers.forEach(h => h({ commentItem, content: Array.from(content.childNodes) })) + }, + }) + }, + extraOptions: () => import('./settings/ExtraOptions.vue'), +}) diff --git a/registry/lib/components/utils/comments/content-replace/options.ts b/registry/lib/components/utils/comments/content-replace/options.ts new file mode 100644 index 0000000000..dbc206fddc --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/options.ts @@ -0,0 +1,10 @@ +import { defineOptionsMetadata, OptionsOfMetadata } from '@/components/define' + +export const commentContentReplaceOptions = defineOptionsMetadata({ + replaceMap: { + defaultValue: {} as Record, + hidden: true, + }, +}) + +export type CommentContentReplaceOptions = OptionsOfMetadata diff --git a/registry/lib/components/utils/comments/content-replace/settings/ContentReplaceRow.vue b/registry/lib/components/utils/comments/content-replace/settings/ContentReplaceRow.vue new file mode 100644 index 0000000000..6b89b14465 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/settings/ContentReplaceRow.vue @@ -0,0 +1,70 @@ + + + diff --git a/registry/lib/components/utils/comments/content-replace/settings/ExtraOptions.vue b/registry/lib/components/utils/comments/content-replace/settings/ExtraOptions.vue new file mode 100644 index 0000000000..ca4f483d7e --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/settings/ExtraOptions.vue @@ -0,0 +1,90 @@ + + + diff --git a/registry/lib/components/utils/comments/content-replace/settings/row.ts b/registry/lib/components/utils/comments/content-replace/settings/row.ts new file mode 100644 index 0000000000..40dd2057b5 --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/settings/row.ts @@ -0,0 +1,6 @@ +import { getRandomId } from '@/core/utils' + +export class CommentContentReplaceRow { + key = getRandomId() + constructor(public from = '', public to = '') {} +} diff --git a/registry/lib/components/utils/comments/content-replace/utils.ts b/registry/lib/components/utils/comments/content-replace/utils.ts new file mode 100644 index 0000000000..8df970e63a --- /dev/null +++ b/registry/lib/components/utils/comments/content-replace/utils.ts @@ -0,0 +1,18 @@ +export const createEmoticonImage = (src: string, alt: string) => { + const element = document.createElement('img') + element.src = src + element.alt = alt + element.loading = 'lazy' + element.style.width = '50px' + element.style.height = '50px' + return element +} + +export const isUrl = (text: string) => { + try { + const url = new URL(text) + return Boolean(url) + } catch (error) { + return false + } +} diff --git a/registry/lib/components/utils/remove-promotions/remove-promotions.scss b/registry/lib/components/utils/remove-promotions/remove-promotions.scss index b0b5157539..823f0fb764 100644 --- a/registry/lib/components/utils/remove-promotions/remove-promotions.scss +++ b/registry/lib/components/utils/remove-promotions/remove-promotions.scss @@ -33,7 +33,9 @@ body.remove-game-match-module #reportFirst3, .video-page-operator-card-small, [data-be-promotion-mark], body:not(.preserve-feed-goods) .dyn-goods, -.desktop-download-tip { +.desktop-download-tip, +.adcard, +.palette-button-adcard { display: none !important; } .recommend-list .rec-list > :not(.video-page-card) + .video-page-card { @@ -88,6 +90,6 @@ body:not(.preserve-feed-goods) .bili-dyn-content__orig__additional:has(.dyn-good .feed-card:has(.bili-video-card a[href*='cm.bilibili.com']), .bili-video-card.is-rcmd:has(a[href*='cm.bilibili.com']), .bili-video-card__wrap:has(a[href*='cm.bilibili.com']), -body:not(.promotion-show-placeholder) :is(.bili-video-card.is-rcmd, .feed-card):not(:has(.bili-video-card__wrap)) { +body:not(.promotion-show-placeholder) :is(.bili-video-card.is-rcmd, .bili-feed4-layout .feed-card):not(:has(.bili-video-card__wrap)) { display: none !important; } diff --git a/registry/lib/components/utils/url-params-clean/index.ts b/registry/lib/components/utils/url-params-clean/index.ts index 144064f641..9d9ff0e93a 100644 --- a/registry/lib/components/utils/url-params-clean/index.ts +++ b/registry/lib/components/utils/url-params-clean/index.ts @@ -106,7 +106,7 @@ const entry = async () => { const getCleanUrl = (originalUrl: string) => { const url = new URL(originalUrl, location.origin) const urlParams = [...new URLSearchParams(url.search).entries()].map( - ([key, value]) => `${key}=${value}`, + ([key, value]) => `${key}=${encodeURIComponent(value)}`, ) if (urlParams.some(param => noClean.some(it => param.includes(it)))) { return originalUrl diff --git a/registry/lib/components/video/danmaku/download/index.ts b/registry/lib/components/video/danmaku/download/index.ts index a7c622f60d..380525bd80 100644 --- a/registry/lib/components/video/danmaku/download/index.ts +++ b/registry/lib/components/video/danmaku/download/index.ts @@ -5,6 +5,7 @@ import { Toast } from '@/core/toast' import { videoAndBangumiUrls } from '@/core/utils/urls' import { DownloadVideoAssets } from '../../download/types' import { DanmakuDownloadType } from './utils' +import { downloadDanmakuOptions } from './options' export const component = defineComponentMetadata({ name: 'downloadDanmaku', @@ -17,6 +18,7 @@ export const component = defineComponentMetadata({ entry: none, reload: none, unload: none, + options: downloadDanmakuOptions, plugin: { displayName: '下载视频 - 下载弹幕支持', setup: ({ addData }) => { diff --git a/registry/lib/components/video/danmaku/download/options.ts b/registry/lib/components/video/danmaku/download/options.ts new file mode 100644 index 0000000000..81f21a4350 --- /dev/null +++ b/registry/lib/components/video/danmaku/download/options.ts @@ -0,0 +1,10 @@ +import { defineOptionsMetadata, OptionsOfMetadata } from '@/components/define' + +export const downloadDanmakuOptions = defineOptionsMetadata({ + speed: { + defaultValue: 'auto' as 'auto' | number, + hidden: true, + }, +}) + +export type DownloadDanmakuOptions = OptionsOfMetadata diff --git a/registry/lib/components/video/danmaku/download/utils.ts b/registry/lib/components/video/danmaku/download/utils.ts index 18d2fd1ffe..e82b452069 100644 --- a/registry/lib/components/video/danmaku/download/utils.ts +++ b/registry/lib/components/video/danmaku/download/utils.ts @@ -6,6 +6,8 @@ import { DanmakuConverterConfig, DanmakuConverter } from '../converter/danmaku-c import { DanmakuType } from '../converter/danmaku-type' import { XmlDanmaku } from '../converter/xml-danmaku' import { playerAgent } from '@/components/video/player-agent' +import { getComponentSettings } from '@/core/settings' +import { DownloadDanmakuOptions } from './options' export class JsonDanmaku { // static SegmentSize = 6 * 60 @@ -71,6 +73,8 @@ export class JsonDanmaku { } export type DanmakuDownloadType = 'json' | 'xml' | 'ass' export const getUserDanmakuConfig = async () => { + const downloadDanmakuOptions = + getComponentSettings('downloadDanmaku').options const title = getFriendlyTitle() const defaultConfig: Omit = { font: '微软雅黑', @@ -135,7 +139,11 @@ export const getUserDanmakuConfig = async () => { // 弹幕持续时长 config.duration = (() => { - const scrollDuration = 18 - 3 * playerAgent.getPlayerConfig('dmSetting.speedplus', 0) + const speed = + downloadDanmakuOptions.speed === 'auto' + ? playerAgent.getPlayerConfig('dmSetting.speedplus', 0) + : downloadDanmakuOptions.speed + const scrollDuration = 18 - 3 * speed return (danmaku: { type: number }) => { switch (danmaku.type) { case 4: diff --git a/registry/lib/components/video/danmaku/expand/index.ts b/registry/lib/components/video/danmaku/expand/index.ts index 728de09677..b1870fda31 100644 --- a/registry/lib/components/video/danmaku/expand/index.ts +++ b/registry/lib/components/video/danmaku/expand/index.ts @@ -21,7 +21,7 @@ const entry: ComponentEntry = async ({ settings: { options } }) => { return } const danmakuBox = await select('.bui-collapse-wrap') - if (dq('.multi-page-v1, .base-video-sections-v1') && options.ignoreWithEpisodes) { + if (dq('.multi-page-v1, .base-video-sections-v1, .video-pod') && options.ignoreWithEpisodes) { console.log('检测到选集, 跳过展开') return } diff --git a/registry/lib/components/video/download/DownloadVideo.vue b/registry/lib/components/video/download/DownloadVideo.vue index 6a1a637cd8..24b73efb0e 100644 --- a/registry/lib/components/video/download/DownloadVideo.vue +++ b/registry/lib/components/video/download/DownloadVideo.vue @@ -49,6 +49,9 @@
使用备用下载地址:
+
+ 若默认下载地址速度缓慢, 可以尝试更换备用下载地址. +
Alt 键点击可以临时切换展开/收起选集列表. +打开 `展开选集列表` 时, 在选集区域的标题上按住 Alt 键点击可以临时切换此组件的效果. diff --git a/registry/lib/components/video/full-episode-title/index.ts b/registry/lib/components/video/full-episode-title/index.ts index f150f263dd..07b35f8bfc 100644 --- a/registry/lib/components/video/full-episode-title/index.ts +++ b/registry/lib/components/video/full-episode-title/index.ts @@ -39,6 +39,7 @@ export const component = defineComponentMetadata({ select('.multi-page-v1 .head-left h3'), select('.video-sections-v1 .first-line-title'), select('.base-video-sections-v1 .first-line-title'), + select('.video-pod .video-pod__header .title'), ]).then(titleElement => { if (!titleElement) { return diff --git a/registry/lib/components/video/metadata/index.ts b/registry/lib/components/video/metadata/index.ts index bcdbdecea1..29aae4590e 100644 --- a/registry/lib/components/video/metadata/index.ts +++ b/registry/lib/components/video/metadata/index.ts @@ -5,6 +5,7 @@ import { Toast } from '@/core/toast' import { videoUrls } from '@/core/utils/urls' import { DownloadVideoAssets } from '../download/types' import { generateByType, MetadataType } from './metadata' +import { options } from './options' export const title = '保存视频元数据' export const name = 'saveVideoMetadata' @@ -28,6 +29,7 @@ export const component = defineComponentMetadata({ tags: [componentsTags.video], entry: none, urlInclude: videoUrls, + options, widget: { condition: hasVideo, component: () => import('./SaveMetadata.vue').then(m => m.default), diff --git a/registry/lib/components/video/metadata/metadata.ts b/registry/lib/components/video/metadata/metadata.ts index 6f30f52cab..a3c5ceca50 100644 --- a/registry/lib/components/video/metadata/metadata.ts +++ b/registry/lib/components/video/metadata/metadata.ts @@ -2,8 +2,10 @@ import { VideoInfo, VideoPageInfo } from '@/components/video/video-info' import { VideoQuality } from '@/components/video/video-quality' import { bilibiliApi, getJsonWithCredentials } from '@/core/ajax' import { meta } from '@/core/meta' +import { getComponentSettings } from '@/core/settings' import { Toast } from '@/core/toast' -import { title as pluginTitle } from '.' +import { name as componentName, title as pluginTitle } from '.' +import { FieldsMode, Options } from './options' export type MetadataType = 'ffmetadata' | 'ogm' @@ -62,6 +64,10 @@ async function generateFFMetadata(aid: string = unsafeWindow.aid, cid: string = const data = await fetchMetadata(aid, cid) const info = data.basic + const { + options: { fieldsMode }, + } = getComponentSettings(componentName) + const lines = [ ';FFMETADATA1', `;generated by Bilibili-Evolved v${meta.compilationInfo.version}`, @@ -70,25 +76,29 @@ async function generateFFMetadata(aid: string = unsafeWindow.aid, cid: string = ff('title', `${info.title} - ${data.page.title}`, false), ff('description', info.description, false), ff('artist', info.up.name, false), - // Custom fields - ff('title', info.title), - ff('description', info.description), - ff('publish_date', new Date(info.pubdate * 1000).toLocaleString()), - ff('aid', info.aid), - ff('bvid', info.bvid), - ff('cid', data.page.cid), - ff('category_id', info.tagId), - ff('category_name', info.tagName), - ff('page_title', data.page.title), - ff('page', data.page.pageNumber), - ff('pages', info.pages.length), - ff('up_name', info.up.name), - ff('up_uid', info.up.uid), ] - if (data.quality) { - lines.push(ff('quality', data.quality.value)) - lines.push(ff('quality_label', data.quality.name)) + if (fieldsMode === FieldsMode.ALL) { + // Custom fields + lines.push( + ff('title', info.title), + ff('description', info.description), + ff('publish_date', new Date(info.pubdate * 1000).toLocaleString()), + ff('aid', info.aid), + ff('bvid', info.bvid), + ff('cid', data.page.cid), + ff('category_id', info.tagId), + ff('category_name', info.tagName), + ff('page_title', data.page.title), + ff('page', data.page.pageNumber), + ff('pages', info.pages.length), + ff('up_name', info.up.name), + ff('up_uid', info.up.uid), + ) + if (data.quality) { + lines.push(ff('quality', data.quality.value)) + lines.push(ff('quality_label', data.quality.name)) + } } if (data.viewPoints.length > 0) { diff --git a/registry/lib/components/video/metadata/options.ts b/registry/lib/components/video/metadata/options.ts new file mode 100644 index 0000000000..f1e0971d40 --- /dev/null +++ b/registry/lib/components/video/metadata/options.ts @@ -0,0 +1,16 @@ +import { defineOptionsMetadata, OptionsOfMetadata } from '@/components/define' + +export enum FieldsMode { + ALL = '全部', + Standard = '仅标准字段', +} + +export const options = defineOptionsMetadata({ + fieldsMode: { + defaultValue: FieldsMode.ALL, + displayName: 'FFMETADATA 字段', + dropdownEnum: FieldsMode, + }, +}) + +export type Options = OptionsOfMetadata diff --git a/registry/lib/components/video/player/legacy-auto-play/index.ts b/registry/lib/components/video/player/legacy-auto-play/index.ts index eb0b17b71d..3018197521 100644 --- a/registry/lib/components/video/player/legacy-auto-play/index.ts +++ b/registry/lib/components/video/player/legacy-auto-play/index.ts @@ -21,14 +21,23 @@ export const component = defineComponentMetadata({ ':is(.base-video-sections, .base-video-sections-v1) .next-button', ':is(.multi-page, .multi-page-v1) .next-button', '.player-auxiliary-autoplay-switch input', + '.video-pod .auto-play .switch-btn', ], // 命中时应该关闭连播: 关联视频推荐 - disable: [':is(.recommend-list, .recommend-list-v1) .next-button'], + disable: [ + ':is(.recommend-list, .recommend-list-v1) .next-button', + '.recommend-list-v1 .switch-btn', + ], } // 最后 1P 时不能开启连播 const disableConditions = [ // 传统分 P - () => Boolean(dq(':is(.multi-page, .multi-page-v1) .list-box li.on:last-child')), + () => + Boolean( + dq( + ':is(.multi-page, .multi-page-v1) .list-box li.on:last-child, .video-pod__list .simple-base-item.active:last-child', + ), + ), // 替代分 P 的合集 // & 可分子合集的分 P 合集, 布局长得比下面那个丑一点 () => @@ -52,6 +61,7 @@ export const component = defineComponentMetadata({ const rightPanel = await Promise.any([ select('.right-container-inner'), select('.playlist-container--right'), + select('.video-pod'), ]) // 如果未找到元素,提前退出不执行后续动作 if (!rightPanel) { @@ -60,26 +70,33 @@ export const component = defineComponentMetadata({ } const checkPlayListPlayMode = async () => { - // 检查是不是播放列表中的最后一个视频或者最后一个分 P 视频的最后一个视频 - const videoSequentialNumber = dq('.list-count') - const sequentialNumbers = videoSequentialNumber.innerHTML.split('/') - // 检查最后一个元素是单个视频还是多 P 视频 + const videoSequentialNumber = dq(rightPanel, '.list-count, .video-pod__header .amt') + const sequentialNumbers = videoSequentialNumber.innerHTML + .replace(/[()]/g, '') + .split('/') + .map(it => parseInt(it)) const lastVideoElement = dq( - '.action-list .action-list-inner .action-list-item-wrap:last-child .action-list-item .actionlist-item-inner', + '.action-list .action-list-item-wrap:last-child .action-list-item .actionlist-item-inner, .video-pod__list .pod-item:last-child', ) - let isLastVideo = false - if (lastVideoElement.classList.contains('singlep-list-item-inner')) { - isLastVideo = lastVideoElement.classList.contains('siglep-active') - } else { - isLastVideo = - lastVideoElement.children[1].lastElementChild.classList.contains( - 'multip-list-item-active', + const isSingleList = + lastVideoElement.classList.contains('singlep-list-item-inner') || + lastVideoElement.querySelector('.single-p') !== null + const isLastVideo = (() => { + if (isSingleList) { + return ( + lastVideoElement.classList.contains('siglep-active') || + lastVideoElement.querySelector('.simple-base-item.active') !== null ) - } + } + return lastVideoElement.children[1].lastElementChild.classList.contains( + 'multip-list-item-active', + ) + })() const shouldContinue = !(sequentialNumbers[0] >= sequentialNumbers[1] && isLastVideo) + console.log('checkPlayListPlayMode', { isLastVideo, sequentialNumbers, shouldContinue }) const app = document.getElementById('app') const vueInstance = getVueData(app) // 不用判断当前状态是什么,直接将将是否需要继续播放赋值 vue 实例中的 continuousPlay @@ -87,7 +104,8 @@ export const component = defineComponentMetadata({ } const isChecked = (container: HTMLElement) => - Boolean(container.querySelector('.switch-button.on') || container.matches(':checked')) + Boolean(container.querySelector('.switch-button.on') || container.matches(':checked')) || + container.classList.contains('on') const checkPlayMode = async () => { const element = (await select( @@ -100,21 +118,20 @@ export const component = defineComponentMetadata({ autoPlayControls.enable.some(selector => element.matches(selector)) && disableConditions.every(condition => !condition()) const checked = isChecked(element) + console.log('checkPlayMode', { shouldChecked, checked }) if (shouldChecked !== checked) { element.click() } } const checkRightPanelPlayMode = async () => { - rightPanel.classList.contains('right-container-inner') - ? checkPlayMode() - : checkPlayListPlayMode() + const isPlayList = rightPanel.querySelector('.video-pod__list.section') + return isPlayList ? checkPlayListPlayMode() : checkPlayMode() } videoChange(async () => { - checkRightPanelPlayMode() const video = (await playerAgent.query.video.element()) as HTMLVideoElement - video?.addEventListener('play', checkRightPanelPlayMode, { once: true }) + video?.addEventListener('play', () => checkRightPanelPlayMode(), { once: true }) }) childListSubtree(rightPanel, () => checkRightPanelPlayMode()) diff --git a/registry/lib/components/style/simplify/home/home.scss b/registry/lib/deprecated/simplify-home/home.scss similarity index 100% rename from registry/lib/components/style/simplify/home/home.scss rename to registry/lib/deprecated/simplify-home/home.scss diff --git a/registry/lib/components/style/simplify/home/index.ts b/registry/lib/deprecated/simplify-home/index.ts similarity index 100% rename from registry/lib/components/style/simplify/home/index.ts rename to registry/lib/deprecated/simplify-home/index.ts diff --git a/registry/lib/docs/index.ts b/registry/lib/docs/index.ts index 37b60ce513..9b7d711730 100644 --- a/registry/lib/docs/index.ts +++ b/registry/lib/docs/index.ts @@ -19,6 +19,7 @@ export interface DocSourceItem { name: string displayName: string description?: string + descriptionText?: string fullAbsolutePath: string fullRelativePath: string owner?: string diff --git a/registry/lib/docs/packages/cleaner.ts b/registry/lib/docs/packages/cleaner.ts index 549aa043e9..6d9e8ff9a2 100644 --- a/registry/lib/docs/packages/cleaner.ts +++ b/registry/lib/docs/packages/cleaner.ts @@ -11,7 +11,6 @@ export const pack: Package = { 'disableSpecialDanmaku', 'simplifyComments', 'simplifyLiveroom', - 'simplifyHome', 'collapseLiveSideBar', 'hideRelatedVideos', 'hideRecommendedLive', diff --git a/registry/lib/docs/packages/downloader.ts b/registry/lib/docs/packages/downloader.ts index aca5949f6f..2e328e5caa 100644 --- a/registry/lib/docs/packages/downloader.ts +++ b/registry/lib/docs/packages/downloader.ts @@ -4,11 +4,5 @@ export const pack: Package = { name: 'downloader', displayName: '下载器', description: '支持下载各种内容.', - components: [ - 'downloadVideo', - 'downloadSubtitle', - 'downloadDanmaku', - 'downloadAudio', - ], - + components: ['downloadVideo', 'downloadSubtitle', 'downloadDanmaku', 'downloadAudio'], } diff --git a/registry/lib/docs/packages/starter.ts b/registry/lib/docs/packages/starter.ts index 958d80667d..e69caf89c8 100644 --- a/registry/lib/docs/packages/starter.ts +++ b/registry/lib/docs/packages/starter.ts @@ -22,7 +22,5 @@ export const pack: Package = { 'disableFeedsDetails', 'fullVideoDescription', ], - plugins: [ - 'settingsPanel.tagFilters.recentComponents', - ], + plugins: ['settingsPanel.tagFilters.recentComponents'], } diff --git a/registry/lib/plugins/video/download/aria2-output/RpcConfig.vue b/registry/lib/plugins/video/download/aria2-output/RpcConfig.vue index 52e9e2f01a..399ff15ae9 100644 --- a/registry/lib/plugins/video/download/aria2-output/RpcConfig.vue +++ b/registry/lib/plugins/video/download/aria2-output/RpcConfig.vue @@ -1,8 +1,13 @@