mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Merge branch 'preview-fixes' into master-cdn
This commit is contained in:
commit
f17ed3ab6d
48
CHANGELOG.md
48
CHANGELOG.md
@ -1,10 +1,58 @@
|
||||
<!-- spell-checker: disable -->
|
||||
# 更新日志
|
||||
|
||||
## v2.9.4-preview
|
||||
`2024-10-22`
|
||||
|
||||
包含 [v2.9.4](https://github.com/the1812/Bilibili-Evolved/releases/tag/v2.9.4) 的所有更新内容.
|
||||
|
||||
✨新增
|
||||
- 新增组件 `隐藏头像框`.
|
||||
> 隐藏页面中用户的头像框 (包括角标), 目前支持动态和视频页面.
|
||||
|
||||
- 新增组件 `隐藏直播马赛克`. (#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))
|
||||
|
||||
## v2.9.4
|
||||
`2024-10-22`
|
||||
|
||||
✨新增
|
||||
- `屏蔽黑名单up主` 去除了登录校验. (#4917, PR #4926 by [snowraincloud](https://github.com/snowraincloud))
|
||||
- `图片批量导出` 适配新型的图片动态. (#4830)
|
||||
- 更新评论区的 `夜间模式`. (#4931)
|
||||
|
||||
🐛修复
|
||||
- 修复 StreamSaver 和 ffmpeg WASM 的 SRI 校验问题. (#4913, #4864)
|
||||
- 修复下载合集时 BV 号命名重复. (#4818)
|
||||
- 修复 `删除广告` 去除首页广告时没有遵循 `占位文本` 选项. (#4836)
|
||||
- 修复 `自定义顶栏` 历史面板中的多余 title 提示. (#4962)
|
||||
- 修复下载弹幕时播放器设置没有正确读取. (#4824)
|
||||
|
||||
🗑️废弃
|
||||
- `自定义顶栏` 删除 `相簿` 入口.
|
||||
|
||||
☕开发者相关
|
||||
- 修复 DevClient 无法重载 Shadow DOM 样式.
|
||||
|
||||
## v2.9.3-preview
|
||||
`2024-09-15`
|
||||
|
||||
主要是各种修复, 见 [v2.9.3](https://github.com/the1812/Bilibili-Evolved/releases/tag/v2.9.3).
|
||||
|
||||
## v2.9.3
|
||||
`2024-09-15`
|
||||
|
||||
<details>
|
||||
<summary>正式版用户将获得 v2.9.1-preview ~ v2.9.2-preview 的所有改动, 点击展开查看</summary>
|
||||
|
||||
@ -177,7 +177,7 @@
|
||||
|
||||
> 之前的支付宝付款码有点问题, 现已弃用 (不必担心, 转账均已收到), 在爱发电中仍然可以选择支付宝作为付款方式.
|
||||
|
||||
<a href="https://afdian.net/@the1812" target="_blank">
|
||||
<a href="https://afdian.com/a/the1812" target="_blank">
|
||||
<img alt="爱发电" src="./images/compressed/afdian.jpg" width="400">
|
||||
</a>
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
## 爱发电
|
||||
|
||||
https://afdian.net/@the1812?tab=sponsor
|
||||
https://afdian.com/a/the1812?tab=sponsor
|
||||
|
||||
## 微信/支付宝收款
|
||||
|
||||
@ -30,6 +30,11 @@ https://afdian.net/@the1812?tab=sponsor
|
||||
|
||||
| 时间 | 用户名 | 单号后4位 | 金额 |
|
||||
| ------------------- | --------------------- | --------- | ------- |
|
||||
| 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 |
|
||||
| 2024.09.23 14:19:17 | 匿名 | 1799 | ¥2.33 |
|
||||
| 2024.09.10 00:19:41 | 匿名 | 1484 | ¥20.00 |
|
||||
| 2024.09.06 16:05:23 | 匿名 | 0752 | ¥5.00 |
|
||||
| 2024.09.03 23:08:43 | *根 | 3956 | ¥20.00 |
|
||||
| 2024.08.25 16:55:07 | 匿名 | 6595 | ¥10.00 |
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"caniuse-lite": "1.0.30001609",
|
||||
"caniuse-lite": "1.0.30001668",
|
||||
"consolidate": "1.0.1"
|
||||
}
|
||||
},
|
||||
|
||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@ -5,7 +5,7 @@ settings:
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
overrides:
|
||||
caniuse-lite: 1.0.30001609
|
||||
caniuse-lite: 1.0.30001668
|
||||
consolidate: 1.0.1
|
||||
|
||||
dependencies:
|
||||
@ -2659,7 +2659,7 @@ packages:
|
||||
postcss: ^8.1.0
|
||||
dependencies:
|
||||
browserslist: 4.21.4
|
||||
caniuse-lite: 1.0.30001609
|
||||
caniuse-lite: 1.0.30001668
|
||||
fraction.js: 4.2.0
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
@ -2772,7 +2772,7 @@ packages:
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001609
|
||||
caniuse-lite: 1.0.30001668
|
||||
electron-to-chromium: 1.4.487
|
||||
node-releases: 2.0.13
|
||||
update-browserslist-db: 1.0.11(browserslist@4.21.10)
|
||||
@ -2783,7 +2783,7 @@ packages:
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001609
|
||||
caniuse-lite: 1.0.30001668
|
||||
electron-to-chromium: 1.4.284
|
||||
node-releases: 2.0.6
|
||||
update-browserslist-db: 1.0.10(browserslist@4.21.4)
|
||||
@ -2815,8 +2815,8 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/caniuse-lite@1.0.30001609:
|
||||
resolution: {integrity: sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==}
|
||||
/caniuse-lite@1.0.30001668:
|
||||
resolution: {integrity: sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==}
|
||||
dev: true
|
||||
|
||||
/chalk@1.1.3:
|
||||
|
||||
@ -6,7 +6,7 @@ import { logo } from './logo/logo'
|
||||
import { home } from './home/home'
|
||||
import { gamesIframe, livesIframe, mangaIframe } from './iframe/iframe'
|
||||
import { blanks } from './flexible-blank/flexible-blank'
|
||||
import { bangumi, music, drawing, shop, match, creations } from './simple-links/simple-links'
|
||||
import { bangumi, music, shop, match, creations } from './simple-links/simple-links'
|
||||
import { upload } from './upload/upload'
|
||||
import { search } from './search/search'
|
||||
import { feeds } from './feeds/feeds'
|
||||
@ -22,7 +22,6 @@ export const getBuiltInItems = (): CustomNavbarItemInit[] => [
|
||||
home,
|
||||
bangumi,
|
||||
ranking,
|
||||
drawing,
|
||||
music,
|
||||
gamesIframe,
|
||||
livesIframe,
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
<div class="type-filters">
|
||||
<div v-for="t of types" :key="t.name" class="type-filter">
|
||||
<RadioButton
|
||||
:title="(t.checked ? '不显示' : '显示') + t.displayName"
|
||||
:class="{ checked: t.checked }"
|
||||
:checked="t.checked"
|
||||
:disabled="loading"
|
||||
|
||||
@ -21,11 +21,6 @@ export const bangumi = getSimpleLinkItem({
|
||||
displayName: '番剧',
|
||||
href: 'https://www.bilibili.com/anime/',
|
||||
})
|
||||
export const drawing = getSimpleLinkItem({
|
||||
name: 'drawing',
|
||||
displayName: '相簿',
|
||||
href: 'https://h.bilibili.com',
|
||||
})
|
||||
export const music = getSimpleLinkItem({
|
||||
name: 'music',
|
||||
displayName: '音频',
|
||||
|
||||
@ -40,10 +40,6 @@
|
||||
a {
|
||||
@include theme-color();
|
||||
}
|
||||
img,
|
||||
a i {
|
||||
@include to-theme('blue');
|
||||
}
|
||||
}
|
||||
}
|
||||
:host(bili-comment-box) {
|
||||
@ -75,3 +71,13 @@
|
||||
@include border-color('3');
|
||||
}
|
||||
}
|
||||
:host(bili-comment-renderer) {
|
||||
i#note {
|
||||
@include color('a');
|
||||
@include background-color('3');
|
||||
}
|
||||
.tag:not(:empty) {
|
||||
@include color('e');
|
||||
@include background-color('4');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,29 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="custom-black-list-extra-options">
|
||||
<VButton
|
||||
v-if="login"
|
||||
ref="button"
|
||||
@mouseover="loadNameBlackListSettings()"
|
||||
@click="toggleNameSettings()"
|
||||
>
|
||||
<VButton ref="button" @mouseover="loadNameBlackListSettings()" @click="toggleNameSettings()">
|
||||
精确匹配列表<VIcon icon="right-arrow" :size="16"></VIcon>
|
||||
</VButton>
|
||||
</div>
|
||||
<div class="custom-black-list-extra-options">
|
||||
<VButton
|
||||
v-if="login"
|
||||
ref="button"
|
||||
@mouseover="loadRegexBlackListSettings()"
|
||||
@click="toggleRegexSettings()"
|
||||
>
|
||||
<VButton @mouseover="loadRegexBlackListSettings()" @click="toggleRegexSettings()">
|
||||
正则匹配列表<VIcon icon="right-arrow" :size="16"></VIcon>
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { getUID } from '@/core/utils'
|
||||
import { VIcon, VButton } from '@/ui'
|
||||
import {
|
||||
loadNameSettings,
|
||||
@ -39,11 +28,6 @@ export default Vue.extend({
|
||||
VIcon,
|
||||
VButton,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
login: Boolean(getUID()),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async loadNameBlackListSettings() {
|
||||
const isFirstLoad = await loadNameSettings()
|
||||
|
||||
@ -23,7 +23,7 @@ export const setupFeedImageExporter: ComponentEntry<Options> = async ({
|
||||
const imageUrls: { url: string; extension: string }[] = []
|
||||
dqa(
|
||||
card.element,
|
||||
'.main-content .img-content, .bili-album__preview__picture__img, .bili-album .preview__picture__img',
|
||||
'.main-content .img-content, .bili-album__preview__picture__img, .bili-album .preview__picture__img, .bili-dyn-gallery__image img',
|
||||
).forEach((img: HTMLImageElement | HTMLDivElement) => {
|
||||
const urlData = retrieveImageUrl(img)
|
||||
if (urlData && !imageUrls.some(({ url }) => url === urlData.url)) {
|
||||
|
||||
@ -88,6 +88,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']),
|
||||
.bili-video-card.is-rcmd:not(:has(.bili-video-card__wrap)) {
|
||||
body:not(.promotion-show-placeholder) :is(.bili-video-card.is-rcmd, .feed-card):not(:has(.bili-video-card__wrap)) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@ -117,17 +117,17 @@ export const getUserDanmakuConfig = async () => {
|
||||
})()
|
||||
|
||||
// 加粗
|
||||
config.bold = playerAgent.getPlayerConfig('bold', false)
|
||||
config.bold = playerAgent.getPlayerConfig('dmSetting.bold', false)
|
||||
|
||||
// 透明度
|
||||
config.alpha = lodash.clamp(
|
||||
1 - parseFloat(playerAgent.getPlayerConfig('opacity', '0.4')),
|
||||
1 - parseFloat(playerAgent.getPlayerConfig('dmSetting.opacity', '0.4')),
|
||||
0,
|
||||
1,
|
||||
)
|
||||
|
||||
// 分辨率
|
||||
const resolutionFactor = 1.4 - 0.4 * playerAgent.getPlayerConfig('fontsize', 1)
|
||||
const resolutionFactor = 1.4 - 0.4 * playerAgent.getPlayerConfig('dmSetting.fontsize', 1)
|
||||
config.resolution = {
|
||||
x: Math.round(1920 * resolutionFactor),
|
||||
y: Math.round(1080 * resolutionFactor),
|
||||
@ -135,7 +135,7 @@ export const getUserDanmakuConfig = async () => {
|
||||
|
||||
// 弹幕持续时长
|
||||
config.duration = (() => {
|
||||
const scrollDuration = 18 - 3 * playerAgent.getPlayerConfig('speedplus', 0)
|
||||
const scrollDuration = 18 - 3 * playerAgent.getPlayerConfig('dmSetting.speedplus', 0)
|
||||
return (danmaku: { type: number }) => {
|
||||
switch (danmaku.type) {
|
||||
case 4:
|
||||
@ -148,10 +148,13 @@ export const getUserDanmakuConfig = async () => {
|
||||
})()
|
||||
|
||||
// 底部间距
|
||||
const bottomMargin = playerAgent.getPlayerConfig('danmakuArea', 0)
|
||||
const bottomMargin = playerAgent.getPlayerConfig('dmSetting.danmakuArea', 0)
|
||||
config.bottomMarginPercent = bottomMargin >= 100 ? 0 : bottomMargin / 100
|
||||
// 无显示区域限制时要检查是否开启防挡字幕
|
||||
if (config.bottomMarginPercent === 0 && playerAgent.getPlayerConfig('preventshade', false)) {
|
||||
if (
|
||||
config.bottomMarginPercent === 0 &&
|
||||
playerAgent.getPlayerConfig('dmSetting.preventshade', false)
|
||||
) {
|
||||
config.bottomMarginPercent = 0.15
|
||||
}
|
||||
|
||||
|
||||
@ -100,6 +100,8 @@ export const videoSeasonBatchInput: DownloadVideoInput = {
|
||||
n: formatNumber(page, totalEpisodesLength),
|
||||
title: episode.page.part,
|
||||
cid: episode.cid,
|
||||
aid: episode.aid,
|
||||
bvid: episode.bvid,
|
||||
ep: episode.title,
|
||||
user: owner.name,
|
||||
userID: owner.mid?.toString(),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { urlChange } from '@/core/observer'
|
||||
import { playerReady, getVue2Data } from '@/core/utils'
|
||||
@ -118,6 +119,8 @@ export const component = defineComponentMetadata({
|
||||
formatString = options.formatString?.toString()
|
||||
}
|
||||
relist.forEach(async video => {
|
||||
// 使用临时变量保存视频名称,以避免计算属性导致的问题
|
||||
let videoName: string = video.name
|
||||
// 确认存放推荐视频列表的List中的元素是否被更新
|
||||
if (forceUpdate || !video.item.owner.mark) {
|
||||
video.item.owner.mark = true
|
||||
@ -134,16 +137,21 @@ export const component = defineComponentMetadata({
|
||||
if (!video.oldname) {
|
||||
video.oldname = video.name
|
||||
}
|
||||
video.name = getFormatStr(createTime, formatString, video.oldname)
|
||||
videoName = getFormatStr(createTime, formatString, video.oldname)
|
||||
video.name = videoName
|
||||
}
|
||||
// 保存生成后的name
|
||||
video.item.owner.name = video.name
|
||||
video.item.owner.name = videoName
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getRecoList = () => {
|
||||
const reco_list = dq('#reco_list')
|
||||
let reco_list = dq('#reco_list')
|
||||
// 2024.10.17 兼容最近的b站前端改动
|
||||
if (reco_list == null) {
|
||||
reco_list = dq('.recommend-list-v1')
|
||||
}
|
||||
let recoList: RecommendList = getVue2Data(reco_list)
|
||||
if (recoList.isOpen === undefined) {
|
||||
recoList = recoList.$children[0]
|
||||
@ -156,12 +164,14 @@ export const component = defineComponentMetadata({
|
||||
return recoList
|
||||
}
|
||||
|
||||
const videoClasses = ['video-page-operator-card-small', 'video-page-card-small']
|
||||
|
||||
addComponentListener(
|
||||
`${metadata.name}.formatString`,
|
||||
(value: string) => {
|
||||
const recoList: RecommendList = getRecoList()
|
||||
const relist: VideoPageCard[] = recoList.$children.filter(
|
||||
video => video.$el.className.indexOf('special') === -1,
|
||||
const relist: VideoPageCard[] = recoList.$children.filter(video =>
|
||||
videoClasses.includes(video.$el.className),
|
||||
)
|
||||
showUploadTime(relist, true, value)
|
||||
},
|
||||
@ -180,8 +190,8 @@ export const component = defineComponentMetadata({
|
||||
'recListItems',
|
||||
() => {
|
||||
console.debug('recoListItems changed, now url is', document.URL)
|
||||
const relist = recoList.$children.filter(
|
||||
video => video.$el.className.indexOf('special') === -1,
|
||||
const relist = recoList.$children.filter(video =>
|
||||
videoClasses.includes(video.$el.className),
|
||||
)
|
||||
showUploadTime(relist)
|
||||
},
|
||||
|
||||
@ -4,11 +4,19 @@
|
||||
display: flex !important;
|
||||
height: auto !important;
|
||||
}
|
||||
// 新版css
|
||||
// 2023.04.30 版本css
|
||||
.video-page-card-small .card-box .info .upname {
|
||||
height: auto !important;
|
||||
a .name {
|
||||
-webkit-line-clamp: unset !important;
|
||||
white-space: pre !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 2024.10.17 版本css
|
||||
.video-page-operator-card-small .card-box .info .upname {
|
||||
height: auto !important;
|
||||
a .name {
|
||||
-webkit-line-clamp: unset !important;
|
||||
white-space: pre !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "2.9.3",
|
||||
"version": "2.9.4",
|
||||
"author": "Grant Howard, Coulomb-G",
|
||||
"copyright": "[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)",
|
||||
"license": "MIT",
|
||||
|
||||
@ -29,7 +29,7 @@ export class ShadowRootStyles {
|
||||
|
||||
async addStyle(definition: ShadowRootStyleDefinition) {
|
||||
const { id, style } = definition
|
||||
const entryId = `shadow-dom-style-${id !== undefined ? lodash.kebabCase(id) : getRandomId()}`
|
||||
const entryId = id !== undefined ? lodash.kebabCase(id) : `shadow-dom-style-${getRandomId()}`
|
||||
const styleSheet = new CSSStyleSheet()
|
||||
await styleSheet.replace(style)
|
||||
|
||||
|
||||
1
src/global.d.ts
vendored
1
src/global.d.ts
vendored
@ -8,6 +8,7 @@ declare global {
|
||||
|
||||
const lodash: LoDashStatic
|
||||
const Vue: typeof import('vue/types/umd')
|
||||
type Vue = import('vue/types/umd')
|
||||
|
||||
type EnumEventTarget<EventTypes extends string> = EventTarget & {
|
||||
addEventListener(
|
||||
|
||||
@ -26,8 +26,8 @@ export const jsDelivr: CdnConfig = {
|
||||
sha256: '0ea5a6fbfbf5434b606878533cb7a66bcf700f0f08afe908335d0978fb63ad94',
|
||||
},
|
||||
streamsaver: {
|
||||
url: `https://${host}/npm/streamsaver@2.0.6/StreamSaver.min.js`,
|
||||
sha256: '64f465e51e5992be894c5d42330b781544eda5462069fe6be4c7421f02d28c92',
|
||||
url: `https://${host}/npm/streamsaver@2.0.6/StreamSaver.js`,
|
||||
sha256: 'a110f78e0b092481dc372901c4d57ae50681d773bc9d55e62356f9a22f17e24b',
|
||||
},
|
||||
ffmpeg: {
|
||||
worker: {
|
||||
@ -40,7 +40,7 @@ export const jsDelivr: CdnConfig = {
|
||||
},
|
||||
wasm: {
|
||||
url: `https://${host}/npm/@ffmpeg/core@0.12.4/dist/umd/ffmpeg-core.wasm`,
|
||||
sha256: '925bd7ef35d4e0f715254cd650f4cfc68c4ec6ecebf293face72b92da904ddda',
|
||||
sha256: '81bdc645b71d7d74ff56fdc0979c5fcb2f92ffcc7f24573a79681fed4ea73905',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user