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 f5dfb806e1..c32896e0d7 100644 --- a/doc/features/features.json +++ b/doc/features/features.json @@ -431,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", @@ -771,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 7a2126e1e3..a9b2407bbf 100644 --- a/doc/features/features.md +++ b/doc/features/features.md @@ -572,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` @@ -1066,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/check-in-item.ts b/registry/lib/components/feeds/del-feeds/check-in-item.ts index aa06777df0..67b56c0ca4 100644 --- a/registry/lib/components/feeds/del-feeds/check-in-item.ts +++ b/registry/lib/components/feeds/del-feeds/check-in-item.ts @@ -131,4 +131,4 @@ const builtInItems: CheckInItem[] = [ }, ] -export const [checkInItems] = registerAndGetData('checkInCenter.items', builtInItems) +export const [checkInItems] = registerAndGetData('deleteFeeds.items', builtInItems) 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/style/custom-navbar/history/NavbarHistory.vue b/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue index 4e25c4ecc6..2500f61603 100644 --- a/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue +++ b/registry/lib/components/style/custom-navbar/history/NavbarHistory.vue @@ -14,6 +14,11 @@ +
+ + + +
@@ -59,7 +64,9 @@ class="progress" :style="{ width: h.progress * 100 + '%' }" > -
{{ h.durationText }}
+
+ {{ h.page }}P / {{ h.pages }}P +
{{ h.title || h.upName + '的直播间' @@ -360,14 +367,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 +402,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/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/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/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/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/full-episode-title/full-episode-title.scss b/registry/lib/components/video/full-episode-title/full-episode-title.scss index ffe9969eee..9cfcf58107 100644 --- a/registry/lib/components/video/full-episode-title/full-episode-title.scss +++ b/registry/lib/components/video/full-episode-title/full-episode-title.scss @@ -41,6 +41,38 @@ body { } } } + .video-pod { + &__list.multip { + .simple-base-item { + counter-increment: page; + .title { + .title-txt { + &::before { + content: 'P' counter(page); + margin-right: 6px; + } + } + } + } + } + &__list { + .simple-base-item { + .title { + height: auto !important; + padding: 2px 0 !important; + .title-txt { + padding: 4px 0 !important; + width: auto !important; + max-height: unset !important; + height: auto !important; + white-space: normal !important; + line-height: 1.5 !important; + display: block !important; + } + } + } + } + } } &.full-episode-list:not(.disable-full-episode-list) { .video-sections-content-list { @@ -62,5 +94,10 @@ body { } } } + .video-pod { + &__body { + max-height: unset !important; + } + } } } diff --git a/registry/lib/components/video/full-episode-title/index.md b/registry/lib/components/video/full-episode-title/index.md index 8ee449f092..6b71b66e8d 100644 --- a/registry/lib/components/video/full-episode-title/index.md +++ b/registry/lib/components/video/full-episode-title/index.md @@ -1,5 +1,5 @@ 提供一些视频选集区域的优化, 对番剧无效. -- `展开选集标题`: 总是完全展开视频选集列表项的标题 +- `展开选集标题`: 总是完全展开视频选集列表项的标题, 若为传统分 P 列表, 还会恢复显示分 P 数的前缀. - `展开选集列表`: 总是完全展开视频选集列表 -打开 `展开选集列表` 时, 在选集区域的标题上按住 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/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/wasm-output/Config.vue b/registry/lib/plugins/video/download/wasm-output/Config.vue index 0934be6e4f..09862e113b 100644 --- a/registry/lib/plugins/video/download/wasm-output/Config.vue +++ b/registry/lib/plugins/video/download/wasm-output/Config.vue @@ -33,7 +33,7 @@ export default Vue.extend({ }, methods: { saveOptions() { - options.muxWithMetadata = this.muxExtraAssets + options.muxWithMetadata = this.muxWithMetadata Object.assign(storedOptions, options) }, }, diff --git a/registry/lib/plugins/video/download/wasm-output/ffmpeg.ts b/registry/lib/plugins/video/download/wasm-output/ffmpeg.ts index 5f991c0ba1..f02e78d346 100644 --- a/registry/lib/plugins/video/download/wasm-output/ffmpeg.ts +++ b/registry/lib/plugins/video/download/wasm-output/ffmpeg.ts @@ -17,7 +17,9 @@ enum FFMessageType { EXEC = 'EXEC', WRITE_FILE = 'WRITE_FILE', READ_FILE = 'READ_FILE', + DELETE_FILE = 'DELETE_FILE', ERROR = 'ERROR', + PROGRESS = 'PROGRESS', } export class FFmpeg { @@ -25,6 +27,8 @@ export class FFmpeg { #resolves: Callbacks = {} #rejects: Callbacks = {} + #progressEventCallback: (event: ProgressEvent) => void + public loaded = false #registerHandlers = () => { @@ -38,8 +42,14 @@ export class FFmpeg { case FFMessageType.EXEC: case FFMessageType.WRITE_FILE: case FFMessageType.READ_FILE: + case FFMessageType.DELETE_FILE: this.#resolves[id](data) break + case FFMessageType.PROGRESS: + if (this.#progressEventCallback) { + this.#progressEventCallback(data) + } + break case FFMessageType.ERROR: this.#rejects[id](data) break @@ -140,6 +150,20 @@ export class FFmpeg { undefined, signal, ) as Promise + + public deleteFile = (path: string, signal?: AbortSignal) => + this.#send( + { + type: FFMessageType.DELETE_FILE, + data: { path }, + }, + undefined, + signal, + ) as Promise + + public onProgress(callback: (event: ProgressEvent) => void): void { + this.#progressEventCallback = callback + } } // ========================================================================== // @@ -165,18 +189,28 @@ interface FFMessageReadFileData { encoding: string } +interface FFMessageDeleteFileData { + path: string +} + type FFMessageData = | FFMessageLoadConfig | FFMessageExecData | FFMessageWriteFileData | FFMessageReadFileData + | FFMessageDeleteFileData interface Message { type: string data?: FFMessageData } -type CallbackData = Uint8Array | string | boolean | Error | undefined +interface ProgressEvent { + progress: number + time: number +} + +type CallbackData = Uint8Array | string | boolean | Error | ProgressEvent | undefined interface Callbacks { [id: number | string]: (data: CallbackData) => void diff --git a/registry/lib/plugins/video/download/wasm-output/handler.ts b/registry/lib/plugins/video/download/wasm-output/handler.ts index 7d6842e1cf..4be359a0dd 100644 --- a/registry/lib/plugins/video/download/wasm-output/handler.ts +++ b/registry/lib/plugins/video/download/wasm-output/handler.ts @@ -2,6 +2,7 @@ import { DownloadPackage, PackageEntry } from '@/core/download' import { meta } from '@/core/meta' import { getComponentSettings } from '@/core/settings' import { Toast } from '@/core/toast' +import { formatPercent } from '@/core/utils/formatters' import { title as pluginTitle } from '.' import type { Options } from '../../../../components/video/download' import { DownloadVideoAction } from '../../../../components/video/download/types' @@ -59,13 +60,13 @@ async function single( httpGet(audioUrl, progress(1, '正在下载音频流')), ]) - ffmpeg.writeFile('video', video) - ffmpeg.writeFile('audio', audio) + await ffmpeg.writeFile('video', video) + await ffmpeg.writeFile('audio', audio) const args = ['-i', 'video', '-i', 'audio'] if (ffmetadata) { - ffmpeg.writeFile('ffmetadata', new TextEncoder().encode(ffmetadata)) + await ffmpeg.writeFile('ffmetadata', new TextEncoder().encode(ffmetadata)) args.push('-i', 'ffmetadata', '-map_metadata', '2') if (!outputMkv) { args.push('-movflags', '+use_metadata_tags') @@ -76,7 +77,9 @@ async function single( console.debug('FFmpeg commandline args:', args.join(' ')) - toast.message = '混流中……' + ffmpeg.onProgress(event => { + toast.message = `混流中: ${formatPercent(event.progress)}` + }) await ffmpeg.exec(args) const output = await ffmpeg.readFile('output') @@ -87,6 +90,13 @@ async function single( toast.message = '完成!' toast.duration = 1000 + await Promise.all([ + ffmpeg.deleteFile('video'), + ffmpeg.deleteFile('audio'), + ffmpeg.deleteFile('output'), + ffmetadata ? ffmpeg.deleteFile('ffmetadata') : Promise.resolve(), + ]) + await DownloadPackage.single( name.replace(/.[^/.]+$/, `.${outputMkv ? 'mkv' : 'mp4'}`), outputBlob, diff --git a/src/client/common.meta.json b/src/client/common.meta.json index 45aff1fb4e..60a9e94376 100644 --- a/src/client/common.meta.json +++ b/src/client/common.meta.json @@ -1,5 +1,5 @@ { - "version": "2.9.4", + "version": "2.9.5", "author": "Grant Howard, Coulomb-G", "copyright": "[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)", "license": "MIT", diff --git a/src/components/feeds/api/index.ts b/src/components/feeds/api/index.ts index 708104370e..1d8487e438 100644 --- a/src/components/feeds/api/index.ts +++ b/src/components/feeds/api/index.ts @@ -1,4 +1,4 @@ -import { getUID, pascalCase } from '@/core/utils' +import { getUID, pascalCase, raiseEvent } from '@/core/utils' import { getJsonWithCredentials } from '@/core/ajax' import { formatCount, formatDuration, parseCount, parseDuration } from '@/core/utils/formatters' import { watchlaterList } from '@/components/video/watchlater' @@ -6,6 +6,8 @@ import { getData, registerData } from '@/plugins/data' import { descendingStringSort } from '@/core/utils/sort' import { VideoCard } from '../video-card' import { FeedsCard, FeedsCardType, feedsCardTypes } from './types' +import { childList } from '@/core/observer' +import { select } from '@/core/spin-query' export * from './types' export * from './manager' @@ -189,7 +191,7 @@ export const addMenuItem = ( ) => { const morePanel = dq( card.element, - '.more-panel, .bili-dyn-more__menu, .opus-more__menu', + '.more-panel, .bili-dyn-more__menu, .opus-more__menu, .bili-dyn-item__more, .opus-more', ) as HTMLElement const { className, text, action } = config if (!morePanel || dq(morePanel, `.${className}`)) { @@ -198,43 +200,92 @@ export const addMenuItem = ( } const isV2 = !morePanel.classList.contains('more-panel') const isOpus = morePanel.classList.contains('opus-more__menu') - const menuItem = document.createElement(isV2 ? 'div' : 'p') - if (isOpus) { - menuItem.classList.add('opus-more__menu__item', className) - const styleReferenceElement = morePanel.children[0] as HTMLElement - if (styleReferenceElement) { - menuItem.setAttribute('style', styleReferenceElement.getAttribute('style')) + const isCascader = + morePanel.classList.contains('bili-dyn-item__more') || morePanel.classList.contains('opus-more') + + const createMenuItem = (): HTMLElement => { + if (isCascader) { + const menuItem = document.createElement('div') + menuItem.innerHTML = /* html */ ` +
+
+
+
+ ${text} +
+
+
+
+ ` + return menuItem } - menuItem.dataset.type = 'more' - menuItem.dataset.stype = lodash.snakeCase(`ThreePoint${pascalCase(className)}`).toUpperCase() - menuItem.dataset.params = '{}' - } else if (isV2) { - menuItem.classList.add('bili-dyn-more__menu__item', className) - const styleReferenceElement = morePanel.children[0] as HTMLElement - if (styleReferenceElement) { - menuItem.setAttribute('style', styleReferenceElement.getAttribute('style')) + + const menuItem = document.createElement(isV2 ? 'div' : 'p') + if (isOpus) { + menuItem.classList.add('opus-more__menu__item', className) + const styleReferenceElement = morePanel.children[0] as HTMLElement + if (styleReferenceElement) { + menuItem.setAttribute('style', styleReferenceElement.getAttribute('style')) + } + menuItem.dataset.type = 'more' + menuItem.dataset.stype = lodash.snakeCase(`ThreePoint${pascalCase(className)}`).toUpperCase() + menuItem.dataset.params = '{}' + } else if (isV2) { + menuItem.classList.add('bili-dyn-more__menu__item', className) + const styleReferenceElement = morePanel.children[0] as HTMLElement + if (styleReferenceElement) { + menuItem.setAttribute('style', styleReferenceElement.getAttribute('style')) + } else { + menuItem.style.height = '25px' + menuItem.style.padding = '2px 0' + menuItem.style.textAlign = 'center' + } + menuItem.dataset.module = 'more' + menuItem.dataset.type = lodash.snakeCase(`ThreePoint${pascalCase(className)}`).toUpperCase() + menuItem.dataset.params = '{}' } else { - menuItem.style.height = '25px' - menuItem.style.padding = '2px 0' - menuItem.style.textAlign = 'center' + menuItem.classList.add('child-button', 'c-pointer', className) } - menuItem.dataset.module = 'more' - menuItem.dataset.type = lodash.snakeCase(`ThreePoint${pascalCase(className)}`).toUpperCase() - menuItem.dataset.params = '{}' - } else { - menuItem.classList.add('child-button', 'c-pointer', className) + menuItem.textContent = text + const vueScopeAttributes = [ + ...new Set( + [...morePanel.children] + .map((element: HTMLElement) => + element.getAttributeNames().filter(it => it.startsWith('data-v-')), + ) + .flat(), + ), + ] + vueScopeAttributes.forEach(attr => menuItem.setAttribute(attr, '')) + return menuItem } - menuItem.textContent = text - const vueScopeAttributes = [ - ...new Set( - [...morePanel.children] - .map((element: HTMLElement) => - element.getAttributeNames().filter(it => it.startsWith('data-v-')), - ) - .flat(), - ), - ] - vueScopeAttributes.forEach(attr => menuItem.setAttribute(attr, '')) + + if (isCascader) { + ;(async () => { + const cascader = await select(() => dq(morePanel, '.bili-cascader')) + const [observer] = childList(cascader, () => { + const cascaderOptions = dq(cascader, '.bili-cascader-options') + if (cascaderOptions === null) { + return + } + observer.disconnect() + const menuItem = createMenuItem() + menuItem.addEventListener('click', e => { + action(e) + const triggerButton = dq(morePanel, '.bili-dyn-more__btn') as HTMLElement | null + if (triggerButton !== null) { + raiseEvent(triggerButton, 'mouseleave') + } else { + raiseEvent(morePanel, 'mouseleave') + } + }) + cascaderOptions.appendChild(menuItem) + }) + })() + return + } + + const menuItem = createMenuItem() menuItem.addEventListener('click', e => { action(e) card.element.click() diff --git a/src/components/launch-bar/LaunchBar.vue b/src/components/launch-bar/LaunchBar.vue index 765576c34f..4a2b8bce75 100644 --- a/src/components/launch-bar/LaunchBar.vue +++ b/src/components/launch-bar/LaunchBar.vue @@ -188,10 +188,12 @@ export default Vue.extend({ if (!input) { return } - this.keyword = input.value urlChange(url => { const params = new URLSearchParams(url) - this.keyword = params.get('keyword') + const keywordFromParam = params.get('keyword') + if (keywordFromParam !== null) { + this.keyword = params.get('keyword') + } }) await this.$nextTick() }, diff --git a/src/components/settings-panel/sub-pages/online-registry/OnlineRegistry.vue b/src/components/settings-panel/sub-pages/online-registry/OnlineRegistry.vue index f3251253d1..66a0b9606e 100644 --- a/src/components/settings-panel/sub-pages/online-registry/OnlineRegistry.vue +++ b/src/components/settings-panel/sub-pages/online-registry/OnlineRegistry.vue @@ -52,7 +52,7 @@
- +