Skip to content

Commit

Permalink
Merge branch 'preview-fixes' into preview-features
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Apr 23, 2024
2 parents 00d8e8a + e2b30d5 commit 125ad10
Show file tree
Hide file tree
Showing 28 changed files with 741 additions and 333 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module.exports = {
'lines-between-class-members': 'off',
radix: ['error', 'as-needed'],
'max-classes-per-file': 'off',
'class-methods-use-this': 'off',
'prefer-destructuring': [
'error',
{
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"preload",
"protobuf",
"pubdate",
"rcount",
"reimu",
"reloadable",
"reloadables",
Expand All @@ -84,6 +85,7 @@
"reposts",
"Roadmap",
"roomid",
"rpid",
"saturationv",
"Sendbar",
"sortablejs",
Expand All @@ -95,8 +97,10 @@
"Touhou",
"truetype",
"uname",
"usercard",
"userscript",
"Violentmonkey",
"vnode",
"Vuex",
"Wasm",
"watchlater",
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
<!-- spell-checker: disable -->
# 更新日志

## v2.8.10-preview
`2024-04-23`

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

- 更新了 `动态过滤器` 的描述, 当开启 `直播信息扩充` 时不可配置 `正在直播` 的显隐. (#4705)

## v2.8.10
`2024-04-23`

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

- `下载视频 - WASM 混流输出` 支持更持久的缓存方式. (PR #4667 by [WakelessSloth56](https://github.com/WakelessSloth56))
- `外置稍后再看``启用快速收藏` 增加了 `显示方式` 选项, 出现无法自动适配的排版问题时可以尝试手动调整此设置. (#4532)
- 新增插件 `动态过滤器 - 移除商品带货动态`. (#4425)
> 移除动态里的商品带货动态 (UP主的推荐 · 来自 XX), 装有 `动态过滤器` 时生效.
- 新增组件 `动态图片平铺展示`. (#4645)
> 将动态中左右切换式的图片改回传统的平铺展示. (在动态详情中可能稍有延迟)
- 更换了 `自定义顶栏` 的动态提醒数字来源. (#4427)

</details>

✨新增
- 夜间模式更新对视频和直播页面的样式. (#4701, PR #4675 by [WangYK](https://github.com/AnotiaWang))
- 增强 `下载视频 - WASM 混流输出` 对错误输入流的检测, 支持 FLAC 音频流 (产生 `.mkv` 文件). (PR #4686 by [DBeidachazi](https://github.com/DBeidachazi))
- `复制动态链接` 改用 `opus` 格式的链接, 并支持新版话题页面. (PR #4695, PR #4696 by [星海](https://github.com/lovelyCARDINAL))
- 同时安装了 pakku 时, 支持下载处理后的弹幕. (PR #4712 by [xmcp](https://github.com/xmcp))
- `传统连播模式` 支持识别和处理视频列表. (#4699, PR #4713 by [Wuch](https://github.com/IEXPECTATION))
- `删除视频弹窗` 支持屏蔽收起后的弹窗. (#4703)

🐛修复
- 再次修复 `快速收起评论` 遮挡评论的表情等弹窗.
- 修复评论区相关功能失效. (#4690)
- 修复 `自定义顶栏` 导致稍后再看页面布局错位. (#4668)

☕开发者相关
- Comment API 现已重构并支持 Vue 3 版本的评论区. (#4690)

## v2.8.9-preview
`2024-03-09`

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

| 时间 | 用户名 | 单号后4位 | 金额 |
| ------------------- | --------------------- | --------- | ------- |
| 2024.04.08 16:02:38 | 匿名 | 2455 | ¥5.00 |
| 2024.03.31 16:36:20 | N*r | 3391 | ¥5.20 |
| 2024.03.27 21:25:21 | M*g | 0180 | ¥10.00 |
| 2024.03.23 08:36:29 | 匿名 | 3363 | ¥7.00 |
| 2024.03.23 04:28:31 | 智木人 | 2847 | ¥2.33 |
| 2024.03.21 22:06:40 | X*r | 0185 | ¥5.00 |
| 2024.03.20 19:34:30 | 匿名 | 5133 | ¥52.10 |
| 2024.03.12 19:16:12 | 匿名 | 0321 | ¥20.00 |
| 2024.03.09 21:40:26 | 匿名 | 1963 | ¥2.33 |
| 2024.03.01 16:12:34 | 5*B | 0619 | ¥2.33 |
| 2024.02.29 08:53:14 | M*z | 8723 | ¥2.33 |
| 2024.02.20 14:47:10 | 匿名 | 4111 | ¥5.00 |
Expand Down
2 changes: 1 addition & 1 deletion doc/features/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@
"type": "component",
"name": "removePlayerPopup",
"displayName": "删除视频弹窗",
"description": "删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择.\r\n",
"description": "删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择. 如果之前点了收起弹窗, 则收起后的小弹窗则会直接删除. (不受类别选择影响)\r\n",
"fullRelativePath": "../../registry/dist/components/video/player/remove-popup.js",
"fullAbsolutePath": "registry/dist/components/video/player/remove-popup.js"
},
Expand Down
2 changes: 1 addition & 1 deletion doc/features/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ by [@JLoeve](https://github.com/LonelySteve)

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

删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择.
删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择. 如果之前点了收起弹窗, 则收起后的小弹窗则会直接删除. (不受类别选择影响)

### [启用视频截图](../../registry/dist/components/video/player/screenshot.js)
`videoScreenshot`
Expand Down
2 changes: 1 addition & 1 deletion doc/features/pack/pack.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"type": "component",
"name": "removePlayerPopup",
"displayName": "删除视频弹窗",
"description": "删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择.\r\n",
"description": "删除视频播放器中出现的各种弹窗, 类别可在选项中分别选择. 如果之前点了收起弹窗, 则收起后的小弹窗则会直接删除. (不受类别选择影响)\r\n",
"fullRelativePath": "../../registry/dist/components/video/player/remove-popup.js",
"fullAbsolutePath": "registry/dist/components/video/player/remove-popup.js"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
}
#message-navbar,
body:not(.history-page) #biliMainHeader:not(.z-top-container),
.z-top-container:not(#biliMainHeader) {
.z-top-container:not(#biliMainHeader,.has-menu) {
max-height: var(--navbar-height) !important;
}
body.history-page #biliMainHeader:not(.z-top-container) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ blockquote {
&,
&:link,
&:visited {
@include color('a');
@include color('e');
}
}
.live-skin-normal-text {
@include color('a');
@include color('e');
}
.live-skin-main-text,
.live-skin-highlight-text {
Expand Down
3 changes: 3 additions & 0 deletions registry/lib/components/style/dark-mode/dark-slice-13.scss
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,9 @@ html {
@include set-theme-color('border-bottom-color');
@include theme-color();
}
.underline {
@include theme-border-color();
}
}
.name {
@include set-color('border-bottom-color', 'a');
Expand Down
82 changes: 79 additions & 3 deletions registry/lib/components/style/dark-mode/dark-slice-18.scss
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@
@include color('a');
}
}
.gift-item-asset {
.b-img {
@include background-color();
}
}
}
.gift-sender-panel {
.content {
Expand Down Expand Up @@ -374,6 +379,9 @@
}
.right-arrow {
@include border-color('e');
path {
@include fill('e');
}
}
}
}
Expand All @@ -383,6 +391,9 @@
@include background-color('3');
.arrow {
@include border-color('e');
path {
@include fill('e');
}
}
}
}
Expand All @@ -401,6 +412,9 @@
}
.bag-icon {
@include border-color('e');
path {
@include fill('e');
}
}
&:hover {
@include background-color('8884');
Expand Down Expand Up @@ -708,9 +722,7 @@
@include set-color('border-top-color', '4');
}
#{contains('mediainfo_mediaRight')} {
#{contains('mediainfo_media_desc_section')}
#{contains('mediainfo_display_area')}
#{contains('mediainfo_ellipsis')} {
#{contains('mediainfo_media_desc_section')} #{contains('mediainfo_display_area')} #{contains('mediainfo_ellipsis')} {
background: linear-gradient(90deg, hsla(0, 0%, 100%, 0), #222 20%, #222);
@include theme-color();
}
Expand Down Expand Up @@ -881,3 +893,67 @@
}
}
}
.left-part-ctnr {
.gift-left-part > [class$='-text'] {
@include color('e');
}
.pointer.arrow-box {
@include set-color('--btnBg', '5');
@include set-color('--btnHoverBg', '6');
.arrow path {
@include fill('e');
}
}
.inner-part {
@include set-color('--wrapBg', '4');
}
}
.static-feed-number-list {
.feed-button-root .content-box {
@include color('e');
}
}
.feed-button-box .custom-feed-input {
@include color('e');
}
.gift-control-panel {
.gift-panel-box {
@include background-color();
}
}
.gift-panel-container-root {
@include set-color('--gift-panel-container_background-color', '4');
@include set-color('--gift-panel-container_container-border-color', '5');
@include set-color('--gift-panel-container_feed-user-info-text-color', 'e');
}
.left-container {
.new-tabs {
@include background-color('4');
@include border-color();
}
}
.card-box .switch-btn img {
filter: invert(0.8) !important;
}
.package-gift-root {
.des-box {
@include color('a');
.switch {
@include set-color('--toggle-switch-bg-color', '3');
&.activated {
@include set-theme-color('--toggle-switch-bg-color');
}
}
}
.new-silver-wallet {
@include color('e');
@include background-color('3');
}
}
.shortcuts-ctnr {
.shortcut-item {
.item-icon {
@include to-white();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ button.submit-button.disabled,
.rank-list-ctnr .tabs,
.player-and-aside-area .aside-area,
.player-and-aside-area .aside-area .rank-list-section,
.gift-presets .gift-panel-box,
.bilibili-live-player-ending-panel-recommend-card-pic,
.rank-list-ctnr .own,
.rank-cntr .item.own,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ export class ExtendSpeedComponent extends EntrySpeedComponent<Options> {
}
}

// eslint-disable-next-line class-methods-use-this
getSpeedContextMixin({ menuListElement }: SpeedContext): Partial<SpeedContext> {
return {
query: (speed: number) =>
Expand Down Expand Up @@ -444,7 +443,6 @@ export class ExtendSpeedComponent extends EntrySpeedComponent<Options> {
setTimeout(() => this.forceUpdateStyle(value))
}

// eslint-disable-next-line class-methods-use-this
protected readonly filterNativeSpeed =
() =>
({ subscribe, next }: PublishContext<number>) => {
Expand Down
2 changes: 1 addition & 1 deletion src/client/common.meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.8.9",
"version": "2.8.10",
"author": "Grant Howard, Coulomb-G",
"copyright": "[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)",
"license": "MIT",
Expand Down
10 changes: 0 additions & 10 deletions src/components/i18n/dom-translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ export class Translator {
static map: Map<string, any>
static regex: [RegExp, string][]

// eslint-disable-next-line class-methods-use-this
protected accepts = (node: Node) => node.nodeType === Node.ELEMENT_NODE
// eslint-disable-next-line class-methods-use-this
protected getValue = (node: Node) => node.nodeValue
// eslint-disable-next-line class-methods-use-this
protected setValue = (node: Node, value: string) => {
node.nodeValue = value
}
// eslint-disable-next-line class-methods-use-this
protected getElement = (node: Node) => node as Element
translate(node: Node) {
let value = this.getValue(node)
Expand Down Expand Up @@ -103,23 +99,17 @@ export class Translator {
}
}
export class TextNodeTranslator extends Translator {
// eslint-disable-next-line class-methods-use-this
accepts = (node: Node) => node.nodeType === Node.TEXT_NODE
// eslint-disable-next-line class-methods-use-this
getElement = (node: Node) => node.parentElement
}
export class TitleTranslator extends Translator {
// eslint-disable-next-line class-methods-use-this
getValue = (node: Node) => (node as Element).getAttribute('title')
// eslint-disable-next-line class-methods-use-this
setValue = (node: Node, value: string) => {
;(node as Element).setAttribute('title', value)
}
}
export class PlaceholderTranslator extends Translator {
// eslint-disable-next-line class-methods-use-this
getValue = (node: Node) => (node as Element).getAttribute('placeholder')
// eslint-disable-next-line class-methods-use-this
setValue = (node: Node, value: string) => {
;(node as Element).setAttribute('placeholder', value)
}
Expand Down
Loading

0 comments on commit 125ad10

Please sign in to comment.