mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
commit
324f28f9e8
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,10 +4,9 @@ builder/dotnet/Properties
|
||||
.ts-output/
|
||||
.sass-output/
|
||||
package-lock.json
|
||||
dark.scss
|
||||
dark.css
|
||||
dark-template.scss
|
||||
dark-template.css
|
||||
_dark-template.scss
|
||||
min/dark-slice-*.min.scss
|
||||
min/dark-slice-*.min.css
|
||||
*.csx
|
||||
|
||||
53
@types/global/index.d.ts
vendored
53
@types/global/index.d.ts
vendored
@ -1,8 +1,4 @@
|
||||
declare global {
|
||||
function GM_addValueChangeListener(name: string, valueChangeListener: (name: string, oldValue: any, newValue: any, remote: boolean) => void): number;
|
||||
function GM_setClipboard(data: any, info: string | { type?: string, mimetype?: string }): void;
|
||||
function GM_setValue(name: string, value: any): void;
|
||||
function GM_getValue<T>(name: string, defaultValue?: T): T;
|
||||
interface MonkeyXhrResponse {
|
||||
finalUrl: string
|
||||
readyState: number
|
||||
@ -40,14 +36,17 @@ declare global {
|
||||
function GM_xmlhttpRequest(details: MonkeyXhrDetails): { abort: () => void };
|
||||
type RunAtOptions = "document-start" | "document-end" | "document-idle" | "document-body" | "context-menu";
|
||||
type DanmakuOption = '无' | 'XML' | 'ASS'
|
||||
type Pattern = string | RegExp
|
||||
interface RpcOption {
|
||||
secretKey: string
|
||||
baseDir: string
|
||||
dir: string
|
||||
host: string
|
||||
port: string
|
||||
method: 'get' | 'post'
|
||||
skipByDefault: boolean
|
||||
maxDownloadLimit: string
|
||||
[key: string]: any
|
||||
}
|
||||
interface RpcOptionProfile extends RpcOption {
|
||||
name: string
|
||||
@ -145,12 +144,15 @@ declare global {
|
||||
static select<T>(query: () => T, action: (queryResult: T) => void, failed?: () => void): void;
|
||||
static select<T>(query: () => T): Promise<T>;
|
||||
static select(query: string): Promise<HTMLElement | null>;
|
||||
static select(query: string, action: (queryResult: HTMLElement) => void, failed?: () => void): void;
|
||||
static any<T>(query: () => T, action: (queryResult: T) => void, failed?: () => void): void;
|
||||
static any<T>(query: () => T): Promise<T>;
|
||||
static any(query: string): Promise<any>;
|
||||
static any(query: string): Promise<JQuery>;
|
||||
static any(query: string, action: (queryResult: JQuery) => void, failed?: () => void): void;
|
||||
static count<T>(query: () => T, count: number, success: (queryResult: T) => void, failed?: () => void): void;
|
||||
static count<T>(query: () => T, count: number): Promise<T>;
|
||||
static count(query: string, count: number): Promise<NodeListOf<Element>>;
|
||||
static count(query: string, count: number, success: (queryResult: NodeListOf<Element>) => void, failed?: () => void): Promise<void>;
|
||||
static unsafeJquery(action: () => void, failed?: () => void): void;
|
||||
static unsafeJquery(): Promise<void>;
|
||||
}
|
||||
@ -218,14 +220,16 @@ declare global {
|
||||
constructor(element: Element, callback: MutationCallback);
|
||||
start(): Observer;
|
||||
stop(): Observer;
|
||||
forEach(callback: (observer: Observer) => void): void;
|
||||
add(element: Element): Observer;
|
||||
options: MutationObserverInit;
|
||||
static observe(observable: Observable, callback: MutationCallback, options: MutationObserverInit): Observer[];
|
||||
static childList(observable: Observable, callback: MutationCallback): Observer[];
|
||||
static childListSubtree(observable: Observable, callback: MutationCallback): Observer[];
|
||||
static attributes(observable: Observable, callback: MutationCallback): Observer[];
|
||||
static attributesSubtree(observable: Observable, callback: MutationCallback): Observer[];
|
||||
static all(observable: Observable, callback: MutationCallback): Observer[];
|
||||
static videoChange(callback: MutationCallback): Promise<Observer[] | null>;
|
||||
static observe(observable: Observable, callback: MutationCallback, options: MutationObserverInit): Observer;
|
||||
static childList(observable: Observable, callback: MutationCallback): Observer;
|
||||
static childListSubtree(observable: Observable, callback: MutationCallback): Observer;
|
||||
static attributes(observable: Observable, callback: MutationCallback): Observer;
|
||||
static attributesSubtree(observable: Observable, callback: MutationCallback): Observer;
|
||||
static all(observable: Observable, callback: MutationCallback): Observer;
|
||||
static videoChange(callback: MutationCallback): Promise<void>;
|
||||
}
|
||||
interface BilibiliEvolvedSettings {
|
||||
useDarkStyle: boolean,
|
||||
@ -307,6 +311,7 @@ declare global {
|
||||
guardPurchase: boolean,
|
||||
popup: boolean,
|
||||
skin: boolean,
|
||||
[key: string]: boolean,
|
||||
},
|
||||
customNavbar: boolean,
|
||||
customNavbarFill: boolean,
|
||||
@ -337,6 +342,7 @@ declare global {
|
||||
foldComment: boolean,
|
||||
downloadVideoDefaultDanmaku: '无' | 'XML' | 'ASS',
|
||||
aria2RpcOption: RpcOption,
|
||||
aria2RpcOptionSelectedProfile: string,
|
||||
aria2RpcOptionProfiles: RpcOptionProfile[],
|
||||
searchHistory: SearchHistoryItem[],
|
||||
seedsToCoins: boolean,
|
||||
@ -352,9 +358,26 @@ declare global {
|
||||
scriptLoadingMode: '同时' | '延后' | '同时(自动)' | '延后(自动)' | '自动',
|
||||
scriptDownloadMode: 'bundle' | 'legacy'
|
||||
guiSettingsDockSide: '左侧' | '右侧'
|
||||
fullActivityContent: boolean,
|
||||
activityFilter: boolean,
|
||||
activityFilterPatterns: Pattern[],
|
||||
activityFilterTypes: string[],
|
||||
activityImageSaver: boolean,
|
||||
scriptBlockPatterns: Pattern[],
|
||||
customNavbarSeasonLogo: boolean,
|
||||
selectableColumnText: boolean,
|
||||
downloadVideoFormat: 'flv' | 'dash',
|
||||
enableDashDownload: boolean,
|
||||
watchlaterExpireWarnings: boolean,
|
||||
watchlaterExpireWarningDays: number,
|
||||
superchatTranslate: boolean,
|
||||
latestVersionLink: string,
|
||||
currentVersion: string,
|
||||
}
|
||||
function GM_addValueChangeListener(name: string, valueChangeListener: (name: string, oldValue: any, newValue: any, remote: boolean) => void): number;
|
||||
function GM_setClipboard(data: any, info: string | { type?: string, mimetype?: string }): void;
|
||||
function GM_setValue(name: keyof BilibiliEvolvedSettings, value: any): void;
|
||||
function GM_getValue<T>(name: keyof BilibiliEvolvedSettings, defaultValue?: T): T;
|
||||
const settings: BilibiliEvolvedSettings;
|
||||
const customNavbarDefaultOrders: CustomNavbarOrders;
|
||||
const aria2RpcDefaultOption: RpcOption;
|
||||
@ -375,8 +398,10 @@ declare global {
|
||||
function isEmbeddedPlayer(): boolean;
|
||||
function isIframe(): boolean;
|
||||
function getI18nKey(): string;
|
||||
const dq: (selector: string) => Element | null;
|
||||
const dqa: (selector: string) => Element[];
|
||||
function dq(selector: string): Element | null;
|
||||
function dq(element: Element, selector: string): Element | null;
|
||||
function dqa(selector: string): Element[];
|
||||
function dqa(element: Element, selector: string): Element[];
|
||||
const formatFileSize: (bytes: number, fixed?: number) => string
|
||||
const formatDuration: (time: number, fixed?: number) => string
|
||||
const ascendingSort: <T>(itemProp: (item: T) => number) => (a: T, b: T) => number
|
||||
|
||||
19
@types/lodash/index.d.ts
vendored
19
@types/lodash/index.d.ts
vendored
@ -26,7 +26,22 @@
|
||||
/// <reference path="./common/util.d.ts" />
|
||||
|
||||
export = _;
|
||||
export as namespace _;
|
||||
|
||||
declare global {
|
||||
const _: _.LoDashStatic;
|
||||
declare const _: _.LoDashStatic;
|
||||
declare namespace _ {
|
||||
// tslint:disable-next-line no-empty-interface (This will be augmented)
|
||||
interface LoDashStatic {}
|
||||
}
|
||||
|
||||
// Backward compatibility with --target es5
|
||||
declare global {
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Set<T> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Map<K, V> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface WeakSet<T> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface WeakMap<K extends object, V> { }
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"_resolved": "https://registry.npm.taobao.org/@types/lodash/download/@types/lodash-4.14.138.tgz",
|
||||
"_shasum": "34f52640d7358230308344e579c15b378d91989e",
|
||||
"_spec": "@types/lodash",
|
||||
"_where": "C:\\Users\\The18\\Documents\\My Docs\\Codes\\Bilibili Evo",
|
||||
"_where": "C:\\Users\\The18\\Documents\\My Docs\\Codes",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||
},
|
||||
|
||||
17
@types/lodash/ts3.1/index.d.ts
vendored
17
@types/lodash/ts3.1/index.d.ts
vendored
@ -12,7 +12,24 @@
|
||||
/// <reference path="./common/util.d.ts" />
|
||||
|
||||
export = _;
|
||||
export as namespace _;
|
||||
|
||||
declare const _: _.LoDashStatic;
|
||||
declare namespace _ {
|
||||
// tslint:disable-next-line no-empty-interface (This will be augmented)
|
||||
interface LoDashStatic {}
|
||||
}
|
||||
|
||||
// Backward compatibility with --target es5
|
||||
declare global {
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Set<T> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Map<K, V> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface WeakSet<T> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface WeakMap<K extends object, V> { }
|
||||
|
||||
const _: _.LoDashStatic;
|
||||
}
|
||||
|
||||
107
README.md
107
README.md
@ -61,9 +61,10 @@
|
||||
- 下载后的格式通常为`.flv`, 若需要`.mp4`格式则要手动用其他软件转换, 例如 [ffmpeg](https://ffmpeg.org/) 或 [Handbrake](http://handbrake.fr/).
|
||||
- **分段**的视频会把所有视频打包成`.zip`格式.
|
||||
- 能够下载的清晰度取决于当前登录的账号, 例如`高清 1080P60`需要已登录大会员账号.
|
||||
- 如果以您的账号权限无法观看某些视频(地区限制, 大会员专享等), 那么这种视频也是无法下载的.
|
||||
- 如果以您的账号权限无法观看某些视频(地区限制, 大会员专享等), 就算使用了类似[解除B站区域限制](https://greasyfork.org/zh-CN/scripts/25718-%E8%A7%A3%E9%99%A4b%E7%AB%99%E5%8C%BA%E5%9F%9F%E9%99%90%E5%88%B6)的脚本也是无法下载的. ~~除非您有对应节点的梯子~~
|
||||
- 直接下载过程中所有数据都存在内存里, 内存占用很大的话会导致系统卡顿. 可以考虑[导出 aria2](aria2-notice.md)来进行下载.
|
||||
- 使用`复制链接`得到的链接并不是直接就能用的, 因为**下载时的请求Header必须包含`Referer=https://www.bilibili.com`和正确的`User-Agent`**, 直接粘贴在浏览器里是打不开的. [详细信息](https://github.com/the1812/Bilibili-Evolved/wiki/使用下载视频的复制链接)
|
||||
|
||||
<!-- - 使用`复制链接`得到的链接并不是直接就能用的, 因为**下载时的请求Header必须包含`Referer=https://www.bilibili.com`和正确的`User-Agent`**, 直接粘贴在浏览器里是打不开的. [详细信息](https://github.com/the1812/Bilibili-Evolved/wiki/使用下载视频的复制链接) -->
|
||||
|
||||
<div>
|
||||
<img height="500" alt="single" src="images/compressed/download-video-single.jpg">
|
||||
@ -203,6 +204,11 @@
|
||||
- `r` 循环播放
|
||||
- `m` 静音
|
||||
- `d` 弹幕开关
|
||||
- `l` 点赞
|
||||
- `c` 投币
|
||||
- `s` 收藏
|
||||
- `Shift + ↑/↓` / `Shift + ,/.` 播放速度调整
|
||||
- `Shift + /` 重置播放速度
|
||||
|
||||
附: b站原生快捷键列表:
|
||||
- `f` 全屏/退出全屏
|
||||
@ -244,6 +250,7 @@
|
||||
启用自定义顶栏, 替代原版的顶栏, 仅对主站生效, 直播/相簿/会员购等仍使用原来的顶栏.
|
||||
|
||||
可用的选项包括:
|
||||
- 使用季节Logo
|
||||
- 使用主题色填充顶栏
|
||||
- 为顶栏添加一层阴影效果
|
||||
- 为顶栏使用更紧凑的布局, 紧凑布局将使用更小的间距, 以及在视频标题过长时用...省略后面的部分
|
||||
@ -252,7 +259,7 @@
|
||||
- 改变顶栏边缘两侧的间距
|
||||
- 改变顶栏里栏目的顺序和显示状态
|
||||
|
||||
前5个是整体的外观设置, 可以在设置里直接开关, 后面2个是对顶栏里面内容的详细布局设定, 可以在`附加功能`里设置.
|
||||
前6个是整体的外观设置, 可以在设置里直接开关, 后面2个是对顶栏里面内容的详细布局设定, 可以在`附加功能`里设置.
|
||||
|
||||
下图展示了顶栏在不同设置下的整体外观: (从上到下依次为: 不使用主题色填充, 不填充+夜间模式, 填充主题色, 使用不同的主题色)
|
||||

|
||||
@ -323,6 +330,8 @@
|
||||
- 隐藏欢迎信息 (xxx姥爷进入直播间)
|
||||
- 隐藏礼物弹幕 (仅弹幕列表, 特殊效果如节奏风暴不受影响)
|
||||
- 隐藏上舰提示 (弹幕列表里的 xxx开通了舰长)
|
||||
- 隐藏付费礼物 (播放器下面的各种金瓜子礼物, 以及许愿瓶, 上舰等)
|
||||
- 隐藏活动横幅
|
||||
- 隐藏抽奖提示 (开通舰长, 小飞船抽奖等)
|
||||
- 禁用直播间皮肤
|
||||
|
||||
@ -349,19 +358,15 @@
|
||||
在网页全屏时, 即使宽度过小也强制保留弹幕发送栏, 注意这可能导致右侧的功能按钮挤出边界.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<!-- <details>
|
||||
<summary><strong>模糊视频控制栏背景</strong></summary>
|
||||
|
||||
模糊视频控制栏背景, 原有的阴影效果将无效.
|
||||
此功能需要浏览器支持背景模糊效果, 详情见[背景模糊兼容性](backdrop-filter.md)一节.
|
||||
|
||||
**启用前**
|
||||

|
||||
|
||||
**启用后**
|
||||

|
||||
|
||||
</details>
|
||||
</details> -->
|
||||
<details>
|
||||
<summary><strong>控制栏着色</strong></summary>
|
||||
|
||||
@ -414,6 +419,41 @@
|
||||
|
||||
</details>
|
||||
|
||||
<h2 align="center">动态</h2>
|
||||
<div align="center">改善动态体验</div>
|
||||
|
||||
<details>
|
||||
<summary><strong>解除动态存图限制</strong></summary>
|
||||
|
||||
右键点击动态大图时, 如果这张图的右键菜单被禁止了, 将弹出带图片的消息方便保存.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>快速收起动态评论区</strong></summary>
|
||||
|
||||
动态里查看评论区时, 在底部添加一个`收起评论`按钮, 这样就不用再回到上面收起了.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>展开动态标题</strong></summary>
|
||||
|
||||
在顶栏的动态预览框中, 不管名称多长, 总是完全展开视频的标题.
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>展开动态内容</strong></summary>
|
||||
|
||||
不管内容多长, 总是完全展开动态的内容.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>旧版动态跳转支持</strong></summary>
|
||||
|
||||
将新版动态的链接换为旧版动态, 同时可在附加功能中在新旧动态间切换.
|
||||
|
||||
</details>
|
||||
|
||||
<h2 align="center">工具</h2>
|
||||
<div align="center">各式各样的小玩意</div>
|
||||
|
||||
@ -435,13 +475,6 @@
|
||||
|
||||
将搜索框的推荐词替换为`搜索`.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>展开动态标题</strong></summary>
|
||||
|
||||
在顶栏的动态预览框中, 不管名称多长, 总是完全展开视频的标题.
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>展开选集标题</strong></summary>
|
||||
@ -489,18 +522,14 @@
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>旧版动态跳转支持</strong></summary>
|
||||
|
||||
将新版动态的链接换为旧版动态, 同时可在附加功能中在新旧动态间切换.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>界面翻译(实验性)</strong></summary>
|
||||
|
||||
为界面中一些常用文本提供翻译, 完成度不高, 目前仅开放日语和英语.
|
||||
|
||||
> 如果希望贡献翻译, 请参阅[翻译指南](https://github.com/the1812/Bilibili-Evolved/blob/preview/src/utils/i18n/i18n.md). 在文件中添加翻译文本后即可发送 Pull Request (到 preview 分支), 不需要编译. ~~因为本项目的开发环境弄得很烂, 请不要把时间和精力浪费在搭建开发环境上.~~
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>禁止直播首页自动播放</strong></summary>
|
||||
@ -509,12 +538,6 @@
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>快速收起动态评论区</strong></summary>
|
||||
|
||||
动态里查看评论区时, 在底部添加一个`收起评论`按钮, 这样就不用再回到上面收起了.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>瓜子换硬币</strong></summary>
|
||||
@ -522,6 +545,25 @@
|
||||
在附加功能中添加`瓜子换硬币`的按钮, 点击可以将700银瓜子换成1个硬币, 每天限1次.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>直播间自动领奖</strong></summary>
|
||||
|
||||
在当前直播间有抽奖活动时, 自动点击抽奖按钮. 注意只适用于少量抽奖, 那种99+限量抽奖可能跟不上其他人的手速.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>专栏文字选择</strong></summary>
|
||||
|
||||
使专栏的文字可以选择.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>稍后再看期限提醒</strong></summary>
|
||||
|
||||
稍后再看里的视频添加后60天会过期自动删除. 开启此功能可在期限不足14天时在稍后再看列表里显示过期警告.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<h2 align="center">触摸</h2>
|
||||
<div align="center">为支持触屏的设备特别设计的功能</div>
|
||||
@ -623,7 +665,14 @@
|
||||
脚本功能的加载模式:
|
||||
- 同时: 与b站页面同时加载
|
||||
- 延后: 优先加载b站页面, 在b站页面加载完成后再开始加载脚本功能
|
||||
- 自动: 根据页面自动选择加载模式
|
||||
- 同时(自动): 根据页面自动选择加载模式, 默认采用同时模式
|
||||
- 延后(自动): 根据页面自动选择加载模式, 默认采用延后模式
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>设置面板停靠位置</strong></summary>
|
||||
|
||||
可以把左侧那栏图标放在右边.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# 使用 aria2 下载大文件
|
||||
使用 aria2 可以解决 Chrome 无法下载超过 2GB 视频的限制, 以及 Firefox 内存占用过大导致标签页卡顿或崩溃的问题. ~~(顺便还能在PanDownload里用)~~
|
||||
|
||||
<!--
|
||||
## 前言: 链接下载器(vld)即将寿终正寝
|
||||
> 如果您从未使用过链接下载器, 可以跳过这一节了
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
npm uninstall -g bilibili-evolved-video-link-downloader
|
||||
```
|
||||
|
||||
如果您当时只是为了安装链接下载器而安装了 Node.js, 也可以将 Node.js 卸载.
|
||||
如果您当时只是为了安装链接下载器而安装了 Node.js, 也可以将 Node.js 卸载. -->
|
||||
|
||||
## 下载 aria2
|
||||
您可以在 [aria2官网](https://aria2.github.io/) 或 [GitHub Releases页面](https://github.com/aria2/aria2/releases/latest) 下载 aria2. 无需安装, 解压放在一个文件夹里后即可使用.
|
||||
@ -77,5 +77,6 @@ rpc-secret=xxxxxx
|
||||
## 卸载 aria2
|
||||
如需卸载 aria2, 删掉它的文件夹就行了.
|
||||
|
||||
<!--
|
||||
## 题外话
|
||||
如果您知道如何将 HTTP Headers (主要是 Referer 和 User-Agent)和链接(最好还能指定文件名)同时传给 IDM(Internet Download Manager), 请在 [issue #149](https://github.com/the1812/Bilibili-Evolved/issues/149) 中留言, 谢谢~
|
||||
如果您知道如何将 HTTP Headers (主要是 Referer 和 User-Agent)和链接(最好还能指定文件名)同时传给 IDM(Internet Download Manager), 请在 [issue #149](https://github.com/the1812/Bilibili-Evolved/issues/149) 中留言, 谢谢~ -->
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -13,40 +13,54 @@ namespace BilibiliEvolved.Build
|
||||
{
|
||||
partial class ProjectBuilder
|
||||
{
|
||||
public ProjectBuilder BuildBundle()
|
||||
{
|
||||
private IEnumerable<string> changedBundleFiles;
|
||||
public ProjectBuilder GetBundleFiles() {
|
||||
using (var cache = new BuildCache())
|
||||
{
|
||||
var extensions = new string[] {
|
||||
".ts", ".js", ".css", ".scss", ".sass", ".vue", ".html", ".htm"
|
||||
};
|
||||
var files = ResourceMinifier.GetFiles(file =>
|
||||
file.FullName.Contains("src" + Path.DirectorySeparatorChar) &&
|
||||
extensions.Contains(file.Extension) &&
|
||||
!file.Name.EndsWith(".d.ts") &&
|
||||
!file.FullName.Contains("client" + Path.DirectorySeparatorChar)
|
||||
);
|
||||
var changedFiles = files.Where(file => !cache.Contains(file)).ToArray();
|
||||
if (changedFiles.Any()) {
|
||||
var urlList = from file in Directory.GetFiles("min")
|
||||
where !file.Contains("dark-slice") && !Path.GetFileName(file).StartsWith("bundle.")
|
||||
select file.Replace(@"\", "/");
|
||||
var hashDict = new Dictionary<string, string>();
|
||||
var zipName = "min/bundle.zip";
|
||||
if (File.Exists(zipName))
|
||||
{
|
||||
File.Delete(zipName);
|
||||
}
|
||||
using (var sha256 = new SHA256Managed())
|
||||
using (var zip = ZipFile.Open(zipName, ZipArchiveMode.Update))
|
||||
{
|
||||
foreach (var url in urlList)
|
||||
{
|
||||
var filename = Path.GetFileName(url);
|
||||
var hash = string.Join("", sha256.ComputeHash(File.OpenRead(url)).Select(b => b.ToString("X2")).ToArray());
|
||||
zip.CreateEntryFromFile(url, filename, CompressionLevel.NoCompression);
|
||||
hashDict.Add(filename, hash);
|
||||
}
|
||||
}
|
||||
File.WriteAllText("min/bundle.json", JsonConvert.SerializeObject(hashDict, Formatting.Indented));
|
||||
}
|
||||
changedBundleFiles = files.Where(file => !cache.Contains(file)).ToArray();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
public ProjectBuilder BuildBundle()
|
||||
{
|
||||
if (changedBundleFiles.Any())
|
||||
{
|
||||
var urlList = from file in Directory.GetFiles("min")
|
||||
where !file.Contains("dark-slice") && !Path.GetFileName(file).StartsWith("bundle.")
|
||||
select file.Replace(@"\", "/");
|
||||
var hashDict = new Dictionary<string, string>();
|
||||
var zipName = "min/bundle.zip";
|
||||
if (File.Exists(zipName))
|
||||
{
|
||||
File.Delete(zipName);
|
||||
}
|
||||
using (var sha256 = new SHA256Managed())
|
||||
using (var zip = ZipFile.Open(zipName, ZipArchiveMode.Update))
|
||||
{
|
||||
foreach (var url in urlList)
|
||||
{
|
||||
var filename = Path.GetFileName(url);
|
||||
var hash = string.Join("", sha256.ComputeHash(File.OpenRead(url)).Select(b => b.ToString("X2")).ToArray());
|
||||
zip.CreateEntryFromFile(url, filename, CompressionLevel.NoCompression);
|
||||
hashDict.Add(filename, hash);
|
||||
}
|
||||
}
|
||||
File.WriteAllText("min/bundle.json", JsonConvert.SerializeObject(hashDict, Formatting.Indented));
|
||||
WriteSuccess("Bundle build complete.");
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteSuccess("Skipped bundle build.");
|
||||
}
|
||||
WriteSuccess("Bundle build complete.");
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ namespace BilibiliEvolved.Build
|
||||
.BuildClient()
|
||||
.BuildPreview()
|
||||
.BuildMaster()
|
||||
.GetBundleFiles()
|
||||
.PrebuildVue()
|
||||
.BuildTypeScripts()
|
||||
.BuildSass()
|
||||
|
||||
@ -174,7 +174,7 @@ namespace BilibiliEvolved.Build
|
||||
})();";
|
||||
}
|
||||
// Console.WriteLine(input);
|
||||
return new UglifyJs().Run(input);
|
||||
return new Regex(@"\\n( )+").Replace(new UglifyJs().Run(input), @"\n");
|
||||
}
|
||||
}
|
||||
sealed class HtmlMinifier : ResourceMinifier
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<Authors>Grant Howard</Authors>
|
||||
<Product>Bilibili-Evolved Project Builder</Product>
|
||||
<StartupObject>BilibiliEvolved.Build.Program</StartupObject>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v2.1",
|
||||
"signature": "2c37baa92b17a561f3beba6277fd58f0f52df851"
|
||||
"name": ".NETCoreApp,Version=v3.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v2.1": {
|
||||
".NETCoreApp,Version=v3.0": {
|
||||
"build/1.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Configuration": "2.1.1",
|
||||
@ -127,14 +127,7 @@
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.1": {},
|
||||
"System.Runtime.CompilerServices.Unsafe/4.5.1": {
|
||||
"runtime": {
|
||||
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"assemblyVersion": "4.0.4.0",
|
||||
"fileVersion": "0.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/4.5.1": {},
|
||||
"TextCopy/1.5.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/TextCopy.dll": {
|
||||
|
||||
Binary file not shown.
BIN
builder/dotnet/publish/build.exe
Normal file
BIN
builder/dotnet/publish/build.exe
Normal file
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "netcoreapp2.1",
|
||||
"tfm": "netcoreapp3.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "2.1.0"
|
||||
"version": "3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
19
extras/addons/live-keymap.js
Normal file
19
extras/addons/live-keymap.js
Normal file
@ -0,0 +1,19 @@
|
||||
// ==UserScript==
|
||||
// @name Live Keymap
|
||||
// @version 1.0.0
|
||||
// @description 直播间快捷键扩展
|
||||
// @author Grant Howard
|
||||
// @license MIT
|
||||
// @match *://live.bilibili.com/*
|
||||
// @match *://live.bilibili.com
|
||||
// @run-at document-body
|
||||
// @grant unsafeWindow
|
||||
// ==/UserScript==
|
||||
document.addEventListener('keydown', e => {
|
||||
if (document.activeElement && ['input', 'textarea'].includes(document.activeElement.nodeName.toLowerCase())) {
|
||||
return
|
||||
}
|
||||
if (e.key.toLowerCase() === 'm' && !e.ctrlKey && !e.shiftKey && !e.altKey) {
|
||||
document.querySelector('.blpui-volume-btn .blpui-btn').click()
|
||||
}
|
||||
})
|
||||
11
extras/addons/template.js
Normal file
11
extras/addons/template.js
Normal file
@ -0,0 +1,11 @@
|
||||
// ==UserScript==
|
||||
// @name <name>
|
||||
// @version 1.0.0
|
||||
// @description <description>
|
||||
// @author <author>
|
||||
// @license MIT
|
||||
// @match *://*.bilibili.com/*
|
||||
// @run-at document-body
|
||||
// @grant unsafeWindow
|
||||
// ==/UserScript==
|
||||
Object.assign(window, unsafeWindow.bilibiliEvolved)
|
||||
@ -2,24 +2,9 @@
|
||||
This tutorial will help you install Bilibili-Evolved in your browser.
|
||||
|
||||
## 1. Before install
|
||||
Please check the compatibility information below to make sure your browser is compatible with Bilibili-Evolved.
|
||||
Please check your browser, Bilibili-Evolved must run with the **latest** Chrome / Firefox / Safari.
|
||||
|
||||
> In short, Chrome, Edge (Chromium), Firefox and Safari are supported well. Most of the attention listed below won't affect functionalities. Doesn't support Edge (UWP).
|
||||
|
||||
### Chrome
|
||||
- To use background blur effect ([backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter)), you need enable it manually in `chrome://flags/#enable-experimental-web-platform-features`. (For Edge, change `chrome` to `edge`)
|
||||
- Background blur effect may cause frame drops in animation.
|
||||
- If your Chrome version is ≥ 73, and screen DPI/page zoom is larger than 100%, the background blur effect will display incorrectly. See [Chromium Issue #942910](https://bugs.chromium.org/p/chromium/issues/detail?id=942910) for more information.
|
||||
### Edge (Chromium)
|
||||
- Slider (`input[type='range']`) has a strange black bar.
|
||||
- Background blur effect seems not working with videos. So `Background blur for video controls` will have no effect.
|
||||
### Firefox
|
||||
- The background blur effect is not supported, see [Bugzilla #1178765](https://bugzilla.mozilla.org/show_bug.cgi?id=1178765) for more information.
|
||||
- There are some animation issues when using touch gestures. (Caused by CSS `transition`. Property value always transits from its initial value rather than current value)
|
||||
### Safari
|
||||
- Not tested in Safari. (I don't own a Mac)
|
||||
### Edge (UWP) [**Stopped supporting**]
|
||||
- Please use the browsers listed above. Or you can try [Chromium-based Edge](https://microsoftedgeinsider.com/).
|
||||
> You can also use the new [Chromium-based Edge](https://www.microsoftedgeinsider.com/en-us/), while UWP Edge (Windows 10 built-in) is **not** supported.
|
||||
|
||||
In this tutorial, I'll use Chrome as an example:
|
||||
|
||||
|
||||
@ -2,19 +2,8 @@
|
||||
この説明では、ブラウザに「Bilibili-Evolved」をインストールするのに役立ちます.
|
||||
|
||||
## 1. インストール前の注意
|
||||
ブラウザが「Bilibili-Evolved」の互換性を確保するよう、下記互換性情報をチェックしてください.
|
||||
ブラウザを確認してください.「Bilibili-Evolved」は **最新** の「Chrome / Firefox / Safari」で実行する必要があります.
|
||||
|
||||
> 簡単に言えば、Chrome、Edge (Chromium)、Firefox、Safariがサポートされています.下記の注意事項のほとんどは、それらの機能に影響を与えません.
|
||||
|
||||
### Chrome / Edge (Chromium)
|
||||
- 背景ぼかし効果([backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter))を使用するには 、このページで手動で有効にする必要があります `chrome://flags/#enable-experimental-web-platform-features`. (For Edge, change `chrome` to `edge`)
|
||||
- 背景ぼかし効果は、アニメーションのフレームドロップを引き起こす可能性があります.
|
||||
- もし、君の Chrome のバージョンが ≥ 73 と 画面のDPI/ページのズームが 100% よりも大きい、背景ぼかし効果が正しく表示されない. 詳しい原因はこのページ [Chromium Issue #942910](https://bugs.chromium.org/p/chromium/issues/detail?id=942910) をご覧ください.
|
||||
### Firefox
|
||||
- 背景ぼかし効果が無効です、詳しい原因はこのページ [Bugzilla #1178765](https://bugzilla.mozilla.org/show_bug.cgi?id=1178765) をご覧ください.
|
||||
- タッチジェスチャの使用時にアニメーションの現象があります. (原因は CSS `transition`. プロパティ値は現在値ではなく、常に初期値から変更する)
|
||||
### Safari
|
||||
- Safari でテストされない. (私はMacを持っていません)
|
||||
### Edge (UWP) [**サポート停止**]
|
||||
- 上記のブラウザを使用してください. あるいはこの[Chromium-based Edge](https://microsoftedgeinsider.com/)に切り替えることができます.
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
<div class=bilibili-evolved-about><div class=about-header><i class="mdi mdi-information-outline mdi-24px"></i><span class=about-title>关于</span></div><div class=about-content><p v-if=branch class="name light"v-html=logoImage><p v-if=branch class="name dark"v-html=logoImageDark><p class=version>v{{version}} · {{clientType}}<p class=love><a target=_blank href=https://github.com/the1812/Bilibili-Evolved/ >Made with ❤ </a><a target=_blank href=https://github.com/the1812/Bilibili-Evolved/blob/master/donate.md>Buy me a coffee ☕</a><section class=authors><span class=title>Authors</span><a class=author target=_blank v-for="author of authors"v-bind:href=author.link>{{author.name}}</a></section><section class=contributors><span class=title>Contributors</span><a class=contributor target=_blank v-for="contributor of contributors"v-bind:href=contributor.link>{{contributor.name}}</a></section><section class=supporters><a class=title target=_blank href=https://github.com/the1812/Bilibili-Evolved/blob/preview/donate.md#历史>View Supporters</a></section><section class=participants><span class=title>Community Power</span><span class=fetching v-if=fetching></span><a class=participant target=_blank v-for="participant of participants"v-bind:href=participant.link>{{participant.name}}</a></section><section class=websites><span class=title>Websites</span><a class=website target=_blank v-for="website of websites"v-bind:href=website.link>{{website.name}}</a></section><section class=components><span class=title>Components</span><a class=component target=_blank v-for="component of components"v-bind:href=component.link>{{component.name}}</a></section></div></div>
|
||||
<div class=bilibili-evolved-about><div class=about-header><i class="mdi mdi-information-outline mdi-24px"></i><span class=about-title>关于</span></div><div class=about-content><p v-if=branch class="name light"v-html=logoImage></p><p v-if=branch class="name dark"v-html=logoImageDark></p><p class=version>v{{version}} · {{clientType}}</p><p class=love><a target=_blank href=https://github.com/the1812/Bilibili-Evolved/ >Made with ❤ </a><a target=_blank href=https://github.com/the1812/Bilibili-Evolved/blob/master/donate.md>Buy me a coffee ☕</a></p><section class=authors><span class=title>Authors</span><a class=author target=_blank v-for="author of authors"v-bind:href=author.link>{{author.name}}</a></section><section class=contributors><span class=title>Contributors</span><a class=contributor target=_blank v-for="contributor of contributors"v-bind:href=contributor.link>{{contributor.name}}</a></section><section class=supporters><a class=title target=_blank href=https://github.com/the1812/Bilibili-Evolved/blob/preview/donate.md#历史>View Supporters</a></section><section class=participants><span class=title>Community Power</span><span class=fetching v-if=fetching></span><a class=participant target=_blank v-for="participant of participants"v-bind:href=participant.link>{{participant.name}}</a></section><section class=websites><span class=title>Websites</span><a class=website target=_blank v-for="website of websites"v-bind:href=website.link>{{website.name}}</a></section><section class=components><span class=title>Components</span><a class=component target=_blank v-for="component of components"v-bind:href=component.link>{{component.name}}</a></section></div></div>
|
||||
1
min/activity-apis.min.js
vendored
Normal file
1
min/activity-apis.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(t,e)=>{class s extends EventTarget{constructor(){super(...arguments);this.cards=[]}addCard(t){if(t instanceof Element&&t.classList.contains("card")){if(t.querySelector(".skeleton")!==null){const e=Observer.childList(t,()=>{if(t.querySelector(".skeleton")===null){e.forEach(t=>t.stop());this.addCard(t)}})}else{const e=this.parseCard(t);this.cards.push(e);const s=new CustomEvent("addCard",{detail:e});this.dispatchEvent(s)}}}removeCard(t){if(t instanceof Element&&t.classList.contains("card")){const e=this.parseCard(t).id;const s=this.cards.findIndex(t=>t.id===e);const r=this.cards[s];this.cards.splice(s,1);const n=new CustomEvent("removeCard",{detail:r});this.dispatchEvent(n)}}parseCard(t){const e=e=>{if(t.querySelector(e)===null){return""}return t.querySelector(e).innerText};const s=t=>{const s=parseInt(e(t));if(isNaN(s)){return 0}return s};const r={id:t.getAttribute("data-did"),username:e(".main-content .user-name"),text:e(".card-content .text.description"),reposts:s(".button-bar .single-button:nth-child(1) .text-offset"),comments:s(".button-bar .single-button:nth-child(2) .text-offset"),likes:s(".button-bar .single-button:nth-child(3) .text-offset")};return r}async startWatching(){const t=await SpinQuery.select(".card-list .content");if(!t){return false}const e=[...t.querySelectorAll(".content>.card")];e.forEach(t=>this.addCard(t));Observer.childList(t,t=>{t.forEach(t=>{t.addedNodes.forEach(t=>this.addCard(t));t.removedNodes.forEach(t=>this.removeCard(t))})});return true}}const r=new s;return{export:{activityCardsManager:r}}}})();
|
||||
1
min/activity-image-saver.min.js
vendored
Normal file
1
min/activity-image-saver.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(e,t)=>{(async()=>{if(document.domain!=="t.bilibili.com"&&document.domain!=="space.bilibili.com"){return}const e=e=>{const t=e.querySelector(".image-viewer");if(t===null){console.log(e)}else{t.addEventListener("contextmenu",()=>{setTimeout(()=>{const e=dq(".pop-message .toast-text");if(e&&e.innerHTML.includes("作者设置了禁止保存")){Toast.success(`<img src="${t.src}" width="200">`,"解除动态存图限制")}},200)})}};[...document.body.children].filter(e=>e.classList.contains("photo-imager-container")).forEach(e);Observer.childList(document.body,t=>{t.forEach(t=>{const o=[...t.addedNodes].filter(e=>e instanceof Element&&e.classList.contains("photo-imager-container"));o.forEach(e)})})})()}})();
|
||||
1
min/aria2-rpc-profile-item.vue.min.js
vendored
Normal file
1
min/aria2-rpc-profile-item.vue.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(e,i)=>{const t=`<div class=profile-item :class="{duplicate: duplicateName, selected}"><template v-if=!editing>{{profile.name}}</template><template v-else><input type=text v-model=name @keydown.enter=saveProfile()></template><icon v-if=!editing style="transform: scale(0.9)"type=mdi icon=pencil-outline title=重命名 @click.native="editing = true"></icon><icon v-if=editing type=mdi icon=check title=确定 @click.native=saveProfile()></icon></div>`;i.applyStyleFromText(`.profile-item{display:flex;align-items:center;padding:4px 8px;background-color:#8882;border-radius:4px;border:2px solid transparent;flex-shrink:0;cursor:pointer}.profile-item:not(:last-child){margin-right:8px}.profile-item.duplicate{border-color:red}.profile-item.selected:not(.duplicate){border-color:var(--theme-color)}.profile-item input[type=text]{width:5em;border:none!important;padding:0!important;margin:0!important;line-height:normal}`,"aria2-rpc-profile-item-style");return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue")},props:["profile","deletable","selected"],data(){return{name:this.profile.name,editing:false,duplicateName:false}},methods:{saveProfile(){if(this.name===this.profile.name){this.duplicateName=false;this.editing=false;return}if(this.name===""||e.aria2RpcOptionProfiles.some(e=>e.name===this.name)){this.duplicateName=true;return}else{this.duplicateName=false;if(e.aria2RpcOptionSelectedProfile===this.profile.name){e.aria2RpcOptionSelectedProfile=this.name}this.profile.name=this.name;this.editing=false;this.$emit("profile-update")}}}})}}})();
|
||||
1
min/aria2-rpc-profiles.vue.min.js
vendored
Normal file
1
min/aria2-rpc-profiles.vue.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(e,i)=>{const r=`<div class=aria2-rpc-profiles><div class=profiles-header><h2>预设</h2><div class=profile-operations><div v-if="profiles.length > 1"class="operation delete-profile"@click=deleteProfile() title=删除预设><icon type=mdi icon=trash-can-outline></icon></div><div class="operation new-profile"@click=addProfile() title=新增预设><icon type=mdi icon=plus></icon></div></div></div><div class=profiles-list><profile-item v-for="(profile, index) of profiles":key="profile.name + index"@profile-update=profileUpdate() @click.native=changeProfile(profile) :profile=profile :deletable="profiles.length > 1":selected="profile.name === selectedProfile"></profile-item></div></div>`;i.applyStyleFromText(`.aria2-rpc-profiles .profiles-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.aria2-rpc-profiles .profiles-header .profile-operations{display:flex;align-items:center}.aria2-rpc-profiles .profiles-header .profile-operations .operation{padding:4px;background-color:#8882;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.aria2-rpc-profiles .profiles-header .profile-operations .operation:not(:last-child){margin-right:8px}.aria2-rpc-profiles .profiles-header .profile-operations .operation:hover{background-color:#8884}.aria2-rpc-profiles .profiles-header .profile-operations .operation .mdi{margin:0}.aria2-rpc-profiles .profiles-list{display:flex;overflow:auto;scrollbar-width:none!important}.aria2-rpc-profiles .profiles-list::-webkit-scrollbar{height:0!important}`,"aria2-rpc-profiles-style");const o={name:"未命名",...e.aria2RpcOption};return{export:Object.assign({template:r},{components:{ProfileItem:()=>i.importAsync("aria2-rpc-profile-item.vue"),Icon:()=>i.importAsync("icon.vue")},data(){this.migrateOldProfiles();const i=[...e.aria2RpcOptionProfiles];if(i.length===0){i.push(o);e.aria2RpcOptionProfiles=i}return{profiles:i,selectedProfile:e.aria2RpcOptionSelectedProfile||o.name}},watch:{selectedProfile(i){if(e.aria2RpcOptionSelectedProfile!==i){e.aria2RpcOptionSelectedProfile=i}}},methods:{migrateOldProfiles(){const i=Object.getOwnPropertyNames(e.aria2RpcOption).filter(e=>!e.startsWith("_"));i.push("name");let r=false;for(const o of e.aria2RpcOptionProfiles){i.filter(e=>!(e in o)).forEach(i=>{o[i]=e.aria2RpcOption[i];console.log(`migrated profile property '${i}'`);r=true})}if(r){e.aria2RpcOptionProfiles=e.aria2RpcOptionProfiles}},profileUpdate(){e.aria2RpcOptionProfiles=this.profiles;this.selectedProfile=e.aria2RpcOptionSelectedProfile},changeProfile(e){this.selectedProfile=e.name;this.$emit("profile-change",e)},addProfile(){const i={...this.profiles.find(e=>e.name===this.selectedProfile)};i.name=i.name.replace(/[\d]+$/,"");if(this.profiles.some(e=>e.name===i.name)){let e=1;while(this.profiles.some(r=>r.name===i.name+e.toString())){e++}i.name=i.name+e.toString()}this.profiles.push(i);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(i)},deleteProfile(){const i=this.profiles.findIndex(e=>e.name===this.selectedProfile);const r=i===0?0:i-1;const o=this.profiles[r];this.profiles.splice(i,1);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(o)}}})}}})();
|
||||
2
min/batch-download.min.js
vendored
2
min/batch-download.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{const i=12;class r{constructor(){this.itemList=[];this.itemFilter=(()=>true)}async getItemList(){}async collectData(){}async collectAria2(r,s){const n=JSON.parse(await this.collectData(r));if(s){const r=t.aria2RpcOption;const{sendRpc:s}=await e.importAsync("aria2-rpc");for(const t of n){const e=t.fragments.map((e,s)=>{let n="";if(t.fragments.length>1){n=" - "+(s+1)}const a=[];if(r.secretKey!==""){a.push(`token:${r.secretKey}`)}a.push([e.url]);a.push({referer:document.URL.replace(window.location.search,""),"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0",out:`${t.title}${n}.flv`,split:i,dir:r.dir||undefined,"max-download-limit":r.maxDownloadLimit||undefined});const o=encodeURIComponent(`${t.title}${n}`);return{params:a,id:o}});await s(e,true)}}else{return`\n# Generated by Bilibili Evolved Video Export\n# https://github.com/the1812/Bilibili-Evolved/\n${n.map(t=>{return t.fragments.map(e=>{return`\n${e.url}\n referer=${t.referer}\n user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0\n out=${t.title}.flv\n split=${i}\n `.trim()})}).join("\n")}\n `.trim()}}}class s extends r{static async test(){if(!document.URL.includes("/www.bilibili.com/video/av")){return false}return await SpinQuery.select("#multi_page")!==null}async getItemList(){if(this.itemList.length>0){return this.itemList}const t=`https://api.bilibili.com/x/web-interface/view?aid=${unsafeWindow.aid}`;const e=await Ajax.getJson(t);if(e.code!==0){Toast.error(`获取视频选集列表失败, message=${e.message}`,"批量下载");return""}const i=e.data.pages;if(i===undefined){Toast.error(`获取视频选集列表失败, 没有找到选集信息.`,"批量下载");return""}this.itemList=i.map(t=>{return{title:`P${t.page} ${t.part}`,cid:t.cid,aid:unsafeWindow.aid}});return this.itemList}async collectData(t){const e=[];for(const i of(await this.getItemList()).filter(this.itemFilter)){const r=`https://api.bilibili.com/x/player/playurl?avid=${i.aid}&cid=${i.cid}&qn=${t}&otype=json`;const s=await Ajax.getJsonWithCredentials(r);const n=s.data||s.result||s;if(n.quality!==t){console.warn(`${i.title} 不支持所选画质, 已回退到较低画质. (quality=${n.quality})`)}const a=n.durl.map(t=>{return{length:t.length,size:t.size,url:t.url}});e.push({fragments:a,title:i.title,totalSize:a.map(t=>t.size).reduce((t,e)=>t+e),cid:i.cid,referer:document.URL.replace(window.location.search,"")})}return JSON.stringify(e)}}class n extends r{static async test(){return document.URL.includes("/www.bilibili.com/bangumi")}async getItemList(){if(this.itemList.length>0){return this.itemList}const t=document.querySelector("meta[property='og:url']");if(t===null){Toast.error("获取番剧数据失败: 无法找到 Season ID","批量下载");return""}const e=t.getAttribute("content").match(/play\/ss(\d+)/)[1];if(e===undefined){Toast.error("获取番剧数据失败: 无法解析 Season ID","批量下载");return""}const i=await Ajax.getJson(`https://api.bilibili.com/pgc/web/season/section?season_id=${e}`);if(i.code!==0){Toast.error(`获取番剧数据失败: 无法获取番剧集数列表, message=${i.message}`,"批量下载");return""}this.itemList=i.result.main_section.episodes.map((t,e)=>{return{aid:t.aid,cid:t.cid,title:t.long_title?`${t.title} - ${t.long_title}`:`${e+1} - ${t.title}`}});return this.itemList}async collectData(t){const e=[];for(const i of(await this.getItemList()).filter(this.itemFilter)){const r=`https://api.bilibili.com/pgc/player/web/playurl?avid=${i.aid}&cid=${i.cid}&qn=${t}&otype=json`;const s=await Ajax.getJsonWithCredentials(r);const n=s.data||s.result||s;if(n.quality!==t){console.warn(`${i.title} 不支持所选画质, 已回退到较低画质. (quality=${n.quality})`)}const a=n.durl.map(t=>{return{length:t.length,size:t.size,url:t.url}});e.push({fragments:a,title:i.title,totalSize:a.map(t=>t.size).reduce((t,e)=>t+e),cid:i.cid,referer:document.URL.replace(window.location.search,"")})}return JSON.stringify(e)}}const a=[n,s];let o=null;class l{constructor(){this.itemFilter=(()=>true)}static async test(){for(const t of a){if(await t.test()===true){o=t;return true}}o=null;return false}getExtractor(){if(o===null){logError("[批量下载] 未找到合适的解析模块.");throw new Error(`[Batch Download] module not found.`)}const t=new o;t.itemFilter=this.itemFilter;return t}async getItemList(){const t=this.getExtractor();return await t.getItemList()}async collectData(t,e){const i=this.getExtractor();const r=await i.collectData(t.quality);e.dismiss();return r}async collectAria2(t,e,i){const r=this.getExtractor();const s=await r.collectAria2(t.quality,i);e.dismiss();return s}}return{export:{BatchExtractor:l}}}})();
|
||||
(()=>{return(t,e)=>{const i=12;class r{constructor(){this.itemList=[];this.itemFilter=(()=>true)}async getItemList(){}async collectData(){}async collectAria2(r,s){const n=JSON.parse(await this.collectData(r));if(s){const r=t.aria2RpcOption;const{sendRpc:s}=await e.importAsync("aria2-rpc");for(const t of n){const e=t.fragments.map((e,s)=>{let n="";if(t.fragments.length>1){n=" - "+(s+1)}const a=[];if(r.secretKey!==""){a.push(`token:${r.secretKey}`)}a.push([e.url]);a.push({referer:document.URL.replace(window.location.search,""),"user-agent":UserAgent,out:`${t.title}${n}.flv`,split:i,dir:r.baseDir+r.dir||undefined,"max-download-limit":r.maxDownloadLimit||undefined});const o=encodeURIComponent(`${t.title}${n}`);return{params:a,id:o}});await s(e,true)}}else{return`\n# Generated by Bilibili Evolved Video Export\n# https://github.com/the1812/Bilibili-Evolved/\n${n.map(t=>{return t.fragments.map(e=>{return`\n${e.url}\nreferer=${t.referer}\nuser-agent=${UserAgent}\nout=${t.title}.flv\nsplit=${i}\n`.trim()})}).join("\n")}\n`.trim()}}}class s extends r{static async test(){if(!document.URL.includes("/www.bilibili.com/video/av")){return false}return await SpinQuery.select("#multi_page")!==null}async getItemList(){if(this.itemList.length>0){return this.itemList}const t=`https://api.bilibili.com/x/web-interface/view?aid=${unsafeWindow.aid}`;const e=await Ajax.getJson(t);if(e.code!==0){Toast.error(`获取视频选集列表失败, message=${e.message}`,"批量下载");return""}const i=e.data.pages;if(i===undefined){Toast.error(`获取视频选集列表失败, 没有找到选集信息.`,"批量下载");return""}this.itemList=i.map(t=>{return{title:`P${t.page} ${t.part}`,cid:t.cid,aid:unsafeWindow.aid}});return this.itemList}async collectData(t){const e=[];for(const i of(await this.getItemList()).filter(this.itemFilter)){const r=`https://api.bilibili.com/x/player/playurl?avid=${i.aid}&cid=${i.cid}&qn=${t}&otype=json`;const s=await Ajax.getJsonWithCredentials(r);const n=s.data||s.result||s;if(n.quality!==t){console.warn(`${i.title} 不支持所选画质, 已回退到较低画质. (quality=${n.quality})`)}const a=n.durl.map(t=>{return{length:t.length,size:t.size,url:t.url}});e.push({fragments:a,title:i.title.replace(/[\/\\:\*\?"<>\|]/g,""),totalSize:a.map(t=>t.size).reduce((t,e)=>t+e),cid:i.cid,referer:document.URL.replace(window.location.search,"")})}return JSON.stringify(e)}}class n extends r{static async test(){return document.URL.includes("/www.bilibili.com/bangumi")}async getItemList(){if(this.itemList.length>0){return this.itemList}const t=document.querySelector("meta[property='og:url']");if(t===null){Toast.error("获取番剧数据失败: 无法找到 Season ID","批量下载");return""}const e=t.getAttribute("content").match(/play\/ss(\d+)/)[1];if(e===undefined){Toast.error("获取番剧数据失败: 无法解析 Season ID","批量下载");return""}const i=await Ajax.getJson(`https://api.bilibili.com/pgc/web/season/section?season_id=${e}`);if(i.code!==0){Toast.error(`获取番剧数据失败: 无法获取番剧集数列表, message=${i.message}`,"批量下载");return""}this.itemList=i.result.main_section.episodes.map((t,e)=>{return{aid:t.aid,cid:t.cid,title:t.long_title?`${t.title} - ${t.long_title}`:`${e+1} - ${t.title}`}});return this.itemList}async collectData(t){const e=[];for(const i of(await this.getItemList()).filter(this.itemFilter)){const r=`https://api.bilibili.com/pgc/player/web/playurl?avid=${i.aid}&cid=${i.cid}&qn=${t}&otype=json`;const s=await Ajax.getJsonWithCredentials(r);const n=s.data||s.result||s;if(n.quality!==t){console.warn(`${i.title} 不支持所选画质, 已回退到较低画质. (quality=${n.quality})`)}const a=n.durl.map(t=>{return{length:t.length,size:t.size,url:t.url}});e.push({fragments:a,title:i.title.replace(/[\/\\:\*\?"<>\|]/g,""),totalSize:a.map(t=>t.size).reduce((t,e)=>t+e),cid:i.cid,referer:document.URL.replace(window.location.search,"")})}return JSON.stringify(e)}}const a=[n,s];let o=null;class c{constructor(){this.itemFilter=(()=>true)}static async test(){for(const t of a){if(await t.test()===true){o=t;return true}}o=null;return false}getExtractor(){if(o===null){logError("[批量下载] 未找到合适的解析模块.");throw new Error(`[Batch Download] module not found.`)}const t=new o;t.itemFilter=this.itemFilter;return t}async getItemList(){const t=this.getExtractor();return await t.getItemList()}async collectData(t,e){const i=this.getExtractor();const r=await i.collectData(t.quality);e.dismiss();return r}async collectAria2(t,e,i){const r=this.getExtractor();const s=await r.collectAria2(t.quality,i);e.dismiss();return s}}return{export:{BatchExtractor:c}}}})();
|
||||
2
min/biliplus-redirect.min.js
vendored
2
min/biliplus-redirect.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(i,e)=>{const n=`hd.biliplus.com`;const c=["bilibili.com/video/av","bilibili.com/bangumi/play","bilibili.com/bangumi/media","space.bilibili.com"];return{widget:{condition:()=>{return c.some(i=>document.URL.includes(i))},content:`\n <button class="gui-settings-flat-button" id="biliplus-redirect">\n <i class="icon-biliplus"></i>\n <span>转到BiliPlus</span>\n </button>`,success:()=>{const i=document.querySelector("#biliplus-redirect");i.addEventListener("click",()=>{if(location.host==="space.bilibili.com"){location.assign(document.URL.replace("space.bilibili.com/",`${n}/space/`))}else if(document.URL.includes("/bangumi/")){const i=unsafeWindow.aid||document.querySelector(".av-link,.info-sec-av").innerText.replace(/[aAvV]/g,"");location.assign(`https://${n}/video/av${i}/`)}else{location.host=n}})}}}}})();
|
||||
(()=>{return(i,e)=>{const n=`hd.biliplus.com`;const c=["bilibili.com/video/av","bilibili.com/bangumi/play","bilibili.com/bangumi/media","space.bilibili.com"];return{widget:{condition:()=>{return c.some(i=>document.URL.includes(i))},content:`\n<button class="gui-settings-flat-button" id="biliplus-redirect">\n<i class="icon-biliplus"></i>\n<span>转到BiliPlus</span>\n</button>`,success:()=>{const i=document.querySelector("#biliplus-redirect");i.addEventListener("click",()=>{if(location.host==="space.bilibili.com"){location.assign(document.URL.replace("space.bilibili.com/",`${n}/space/`))}else if(document.URL.includes("/bangumi/")){const i=unsafeWindow.aid||document.querySelector(".av-link,.info-sec-av").innerText.replace(/[aAvV]/g,"");location.assign(`https://${n}/video/av${i}/`)}else{location.host=n}})}}}}})();
|
||||
133
min/bundle.json
133
min/bundle.json
@ -1,16 +1,20 @@
|
||||
{
|
||||
"about.min.css": "839FB8FA5429AFB22AAE52B0B1114EB5474333D12082554BAD790E75936CF48C",
|
||||
"about.min.html": "AE18D23499F4B636B32267440FAE92D67700FCA2F2AA2FBB4E2692018D66DD5F",
|
||||
"about.min.html": "E44CC2091973A839E5A533B397EF8C78DD573DAB9AF0C4D19E63748DCB9450DB",
|
||||
"about.min.js": "112689A1206CFA88EFA9AB144D6F0806E8D66C198B39EBC939F9721F9DB99391",
|
||||
"activity-apis.min.js": "459D26DB0BB447FEFE6F1842541A119E67C63573A800E56AD7FEC71D20087CEF",
|
||||
"activity-image-saver.min.js": "92C4CF9A70836EA93FA6C7188F89ABF567C04E24656CD64C59FA254F167AD71C",
|
||||
"aria2-rpc-profile-item.vue.min.js": "61DCAD1D440E036B89C22E00C51C8357DBB529612CB428D55C3804410D2AD059",
|
||||
"aria2-rpc-profiles.vue.min.js": "CBF3D159566A694BC543EAB5B9E743A13B571743EBDDB8C558AE036483E3AF5A",
|
||||
"aria2-rpc.min.js": "B13E731DDD503A645A19BB243FF0148BEAC313F0A54454752A07387176F04046",
|
||||
"auto-continue.min.js": "96CD47C367D7397CE1467A69764409BAEFF16E8F535BC8E15523CD0B8A86687E",
|
||||
"auto-draw.min.js": "AE72CF2623DF2D15AD4AF82D125FFAF7EF5B1E6B36D9E9AC646AC98AA6AA8698",
|
||||
"auto-play.min.js": "DC9938AC15DADDC9D88DCA0C9BE64BE142C37D32CB85E42E23DAB2A7378531E5",
|
||||
"batch-download.min.js": "530C04A19539496385F033F01AFDB1291F96F63E396D938F277901A9D74A3B13",
|
||||
"biliplus-redirect.min.js": "B40E8AD06B180C2E8CCC4C67D17907D2FE6388EC1F1B1E2DDAF80B3F517B3C60",
|
||||
"batch-download.min.js": "0CEE55633B43264D8A5D69E8BE19931AD73A70327B164D745A14DF26BF45EEDF",
|
||||
"biliplus-redirect.min.js": "9882D14DAC5C103212A101A5168883C41B4B3B2737FD5F222DC343D0304FF8AF",
|
||||
"blur-video-control.min.css": "B72FA7AD198ED1C9A9620A83881441F96F9FF3083ED12203A324B9753A7CCFFD",
|
||||
"blur-video-control.min.js": "00A2AC837FC455DF2AED7D0C350265C7438CC6F5C203F085E19639DDB86D0E11",
|
||||
"clear-cache.min.js": "B25E550E96C9F991E3DCD0D6D81A95B913F029C5651F5FB3CDFB18CC7CB8F6F4",
|
||||
"clear-cache.min.js": "44EA6B2597B887B6FAC42A82E1CCE39A64494ABFC813AC984A90476ED10BA714",
|
||||
"combo-like.min.js": "239FC1F3AC50C9BBF3788E9C3ECADEEB0CA0F435D1EA7AD4A4AB471C8549A0C2",
|
||||
"comment-dark.min.css": "E980508E86203743C36FEE4F7149BFF53961ECBC4EC140E8C162D18D395B940A",
|
||||
"comment.min.css": "CEDA2E6733E294A608812309FA6629045ABBC55A55C7677B6B60F019C0B62CAB",
|
||||
@ -18,16 +22,16 @@
|
||||
"compact-layout.min.css": "CAC8B0DBA8E90B38D31F0811B7B469709052204AC36D5D3F20FE5D0899FDDCCB",
|
||||
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
|
||||
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
|
||||
"custom-control-background.min.js": "6B6B7E99E88E9242AB4AB3A0B108AADBF48BD43D6A8F11F0E281F476A7D84C47",
|
||||
"custom-control-background.min.js": "FDE5A3B22CFAE291187974C8B56A2C86A368ACF2DFE6A0E3E5C683CFB7D1B9BD",
|
||||
"custom-navbar.min.css": "7F3E0B8527072498AF3A3E093963F591B8BFD09FE5E5BF03B619698EFFCE6220",
|
||||
"custom-navbar.min.html": "72A66BCE1D82163555AFBEAC651A0BB42A661338878C55B9BE8CE3655767A3CC",
|
||||
"custom-navbar.min.js": "34D0620E1625BC637A7A3FF99EC5197B38F521FAE1E1DF22D72884528445D3D5",
|
||||
"danmaku-converter.min.js": "E056FD0E80469D3EC4C11BDD78435A1EBFA319DA8DAD9063286E1CA50037EA94",
|
||||
"dark-important.min.css": "7FC057E91B5BE14BF91A549EB33D9828D044546DBC5F47EF8E7829CD64BD5774",
|
||||
"dark-navbar.min.css": "C02A4001942DE8E26C61520C2499D80512D8CBA0BBA81E7065BA219C4DF9C11D",
|
||||
"custom-navbar.min.html": "8A5332791C9693A571F7B885D6367616F519054CACEDA2DDA147735638EDEE15",
|
||||
"custom-navbar.min.js": "42C134E8BB2F984AC711C68A8FD89367468F216E80E8A4085CB1D5F011445431",
|
||||
"danmaku-converter.min.js": "FDAB4DB2E3C79730A39CDA7C5FD193693621FED206C6549E9B8F13778080CC12",
|
||||
"dark-important.min.css": "241B733A5B0570FF9EE1EF039E3652DBBC92F742B3C403B38B2DDDEEF5C0A655",
|
||||
"dark-navbar.min.css": "A2D91F11127D165571ACCC53004EDDB118CEE110F9B020D7E0541E1C8FAEA478",
|
||||
"dark-schedule.min.js": "853C446547603F4F0425F19F09F73335C9EC451A790C1C07E5E5B88A09E9B453",
|
||||
"dark-styles.min.js": "A6CFEC32B3F78FD2BD5DBB2347A517F9A633802098DF458F70CBE094F9CAD854",
|
||||
"dark.min.css": "07BC6EA399E66512DB7C2D038B3073B632AEF72DBDFFE0FFB1019BEBBF6A1DFA",
|
||||
"dark-styles.min.js": "C62AFBB47DDC1E2F3F45D688B0F98394E471A423BE26BF47504D5C7D069ADBA1",
|
||||
"dark.min.css": "6B708756F3C94D92370DF688A92EEA369A763E8BF4FAEA4D2A418EDDB9A41524",
|
||||
"debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA",
|
||||
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",
|
||||
"default-danmaku-settings.min.js": "30A8D36137B5A4D560BD47F7A264F77C7DD4428291DF3E7EBD8D632B2AE9973E",
|
||||
@ -36,11 +40,11 @@
|
||||
"default-video-quality.min.js": "D423D80B3151ACA49D8F769054E0F839DA2367E7F7C0590EFD60F71B4A6BEADB",
|
||||
"default-video-speed.min.js": "34E3D2BC8BD5BBC2534EDE6D7B02DE6D5F4A01879641A9E128B4C24124759D77",
|
||||
"double-click-fullscreen.min.js": "09C035FC7E281ABB042A4200F69757AB093079DBCC9939BE8C53C23EE2EDE41C",
|
||||
"download-audio.min.js": "DD226915B2B9A2368CF2B9E0AA9EA367C1A21ADA9A378C225E78DE1D4C60C9A7",
|
||||
"download-danmaku.min.js": "8A39F93E266A7BE09091D06EF3CC40803CD2F813AEDD1EC3C822D64151770D6E",
|
||||
"download-video.min.css": "544D7CA625C22BA021D3F3629E129253E7A9BF97C51C590987C3A18DB0597CC2",
|
||||
"download-video.min.html": "DA50CED55A3DF543AFC3048EBD73C9C27664BDAA637614E6C7F318E9B201ABFC",
|
||||
"download-video.min.js": "BC38D7BBDAAF888A52D4E275CC4433CC9E29DF0D5817BED8AE5B3A66EC082A8C",
|
||||
"download-audio.min.js": "96245533BB7FCB3297F0049198BB29B3D41CE85B4BE77DA2AE20931A25C7401E",
|
||||
"download-danmaku.min.js": "B462990C301C924B64687A734A02396B621A939EAC422B96868F49D615D77927",
|
||||
"download-video.min.css": "3C542A4ADB01F1E93DFFFAA9789287EE6712897DB6DFB5764F47E3DFAD51959E",
|
||||
"download-video.min.html": "7C1028DB1E93B27C5E17A3DFC97CB7C9FB0F69FD8CE412721CE2B4E4CAD4DE08",
|
||||
"download-video.min.js": "FDB1116D7C4B37BE8133FB1D08C2B00358B3AF42C1B513B03B31F9CB5D17A705",
|
||||
"dpi-img.vue.min.js": "D4833A242EBDD84834B11DB4CEB68B8807BDFC9693C3E1AAE73071986FE26F78",
|
||||
"expand-danmaku.min.js": "B21658C40085AEA8DC49652AE62EB8610BB2EBEAF7A9C9AF69EF3B11E08EEC8D",
|
||||
"expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224",
|
||||
@ -52,98 +56,107 @@
|
||||
"frame-playback.min.css": "07231E8699FA0542C1FD36BE278E2201016AA30C91E9EAC116B2D074B20BFCD7",
|
||||
"frame-playback.min.html": "4089BD1D954155EA91D39C33E22D7585A87C3F8A9B4A6BA4CE5D97B51763C971",
|
||||
"frame-playback.min.js": "57B34757FD03B9164B27DB48A1D6F4E3633086C27CD1E3246FCEDDCD7768F05E",
|
||||
"full-activity-content.min.js": "B4E8EBB9259E13801368A29F91C4575339540C72F5C76C1B91FE150C1DCA3A8F",
|
||||
"full-page-title.min.css": "C4E50EBCFEDD0050DDAFFC7A9568625E417DF46F3A312CFF6CD6734B2B038D56",
|
||||
"full-page-title.min.js": "D761A0C4A8B0A25CC0A23A10C495C2A5E6028BC19C6460C8ABB8D4B0B855E748",
|
||||
"full-tweets-title.min.css": "13A0CF1C96F374CED3FA59A532E28B4B620D7A4C374385A363F32AD1A7656764",
|
||||
"full-tweets-title.min.js": "DD57BB732ABEF7739CA84AEFF97E86F8984FCC4A8A75B957213622350B2A7C37",
|
||||
"gui-settings.min.css": "DB583E6B4DFDE26678BC00DEC23714FBEFEC13D1BC21CA0DA6292EA9A679A14F",
|
||||
"gui-settings.min.html": "3CA6BC8AE8E1481A84B931E9CA126682B7C85C382679442A5133B9954A0AA503",
|
||||
"gui-settings.min.js": "BE5C8F6D75F1AAF9DEBC1FA4D3F4CC3834F0EF647BDBECFC3C8A44E72CE177BF",
|
||||
"haruna-scale.min.js": "7B0F89A664B6A3D0BE21F7501660058DE3DC0881A81FCDA44B9F3C31BBD73D30",
|
||||
"hide-bangumi-reviews.min.js": "CC3CE6B3F1606F8AB0A4ADAD3B16E6DA9245D0676ACF74B97FB143FBFF0C7223",
|
||||
"hide-banner.min.css": "FF157AF84741AF0564FE2930CC49F524F99A41739DB4C44DC944EC6F4F620A0F",
|
||||
"full-tweets-title.min.js": "1324DFC332C42B98B9C7A19BFFE0103E16E8084048F88BC09ADA04B18778502D",
|
||||
"gui-settings.min.css": "C2807BC955820558881C18CF5200E9E5B50D787392373000B21A560EB3B3967F",
|
||||
"gui-settings.min.html": "B728355C0042253A54C46BE9A3FC66EB4862A1ED41DB088B090488A918C3D4DF",
|
||||
"gui-settings.min.js": "9C91523086D7931161F3E857674C5C20FDE21892EDEB382063FAF506B6020B56",
|
||||
"haruna-scale.min.js": "D08CAF281E752FBD52CA59A244C970AB0276036A9BBADB439B639FE61AA02D70",
|
||||
"hide-bangumi-reviews.min.js": "1B29E9D48F1FE416DBBE557EBC7051DC51F2070E28BE8125B3E11C8F717B091F",
|
||||
"hide-banner.min.css": "7743BCCFD244206FE6CEE402F2179B1310643BFD2154E7ECD56BE02E41E24BBB",
|
||||
"hide-banner.min.js": "465C175B25E19BC69A8CCD6DEA73447B290692BA4798D4D1B84DEF7261A921C4",
|
||||
"hide-category.min.js": "64125DCFE1F7DB269049CB839B52E38B4E2D574E7A1AF6A5439BF0B77EB93EC1",
|
||||
"hide-category.min.css": "2EB4AB96C9EA12E91910AB3F1EAAFD76CFED77890CF2138232388415E1418C46",
|
||||
"hide-category.min.js": "BF5D4FD416CB8D71EEAF5941D009EDA5DE34FC793C9009CFEE8C9F4E86B0BB55",
|
||||
"hide-old-entry.min.js": "82C5BB63906A244E1A8CAF2162F502A31188E8437387829B4AC9950E8836100E",
|
||||
"hide-top-search.min.js": "19641CCB6A883DB5DD143A768606DEF0C571572D91CCD3FD5A9302A2A916E19B",
|
||||
"home-video.vue.min.js": "ACD3918903369692BF0AA0ADBE3E77B8D6B942EA1DAAB7138B362D263E9DC1F4",
|
||||
"i18n.de-DE.min.js": "5BDAC5F0493F447A98B4D308817B21AB2787BEF9E3929EA37F0D2ACD3D879337",
|
||||
"i18n.en-US.min.js": "9DF9263CB0D4CA8FDB17A75F6ECA0D48F8B34540947C70C4FEA0403613DD1C43",
|
||||
"i18n.ja-JP.min.js": "9D924D58A6CD265EB95DA29B7E64885CD74089EC14A07C36CF3EAF42C8BEE33B",
|
||||
"i18n.min.css": "6B6A1C2F3E222CF1B686BF94F939B494471C979CC6A5F53CFBAC2F4E32048DD4",
|
||||
"i18n.en-US.min.js": "0F58C7C07054A79EF645ED830A47C7C6A1A3BCB4B58880C1D7EB28D73486781E",
|
||||
"i18n.ja-JP.min.js": "E82C701C0CD68B36B256E272616E81ACFC44707D33DB59A2D6ECF8993EA4179C",
|
||||
"i18n.min.css": "84C5CFA1266E26CF58DE40D91C55A94821F1CE0E94DAD8DE2A2D99BC3F7C5225",
|
||||
"i18n.min.js": "7FCB933FD43C05A152B672D4BD721F3ECEBA6AD29648379947DAAFC403907B38",
|
||||
"i18n.zh-TW.min.js": "803F67270809E3258E2B302ADE542B12EF222C83EDC67FB8C68301C5F4E3A1CC",
|
||||
"icon.vue.min.js": "CE58414705A3B895ED015EA6CF3DD4FD3FC1FD30C20D5A19078CA3CB8D35ED89",
|
||||
"icons.min.css": "CE45E84BCB125A434F3DE11F992BED59D39643B4A7314705809B285732615994",
|
||||
"icon.vue.min.js": "B4A82F32A4F68300D4BAE98795466E7136E6633E70986B00C0B4D09716D30C8B",
|
||||
"icons.min.css": "CA6478DC41BEA3E99C45E01D3CD6FC6D05F933D91A3EE9200AD5DC39828E5A17",
|
||||
"image-resolution.min.js": "0D9679DD7D7CF2709368FC4811F03CC0379EE7286432B98DB7AAB45227D20C76",
|
||||
"image-viewer.min.css": "219E206912EC6FCB0E9F0EC447D19073272A959F66A782D9DF55522FD8A488B5",
|
||||
"image-viewer.min.html": "763742E79923A7918F281AEBB3CEE76FE2A0AE94CACE325AE4BEE1AED451DAEA",
|
||||
"index.min.html": "94B83D9EBB9005C1286A7E0759A7683932F8DADA20D07E5E9D8FF867B04D4B95",
|
||||
"keymap.min.js": "A8EE3D74A3B47DFEE2842B8719DBB13FC7A2E6A5C268E42A606642B1EC036887",
|
||||
"magic-grid.min.js": "83C4A66DE2E0EB3C4335241E4105AD0A95906F7B5EA129B4CD80E9985D2E09B4",
|
||||
"keymap.min.js": "F39362AB35FB28ECEF4EFC8F44103D3B0605F1F8007848A3EA62BD093CE6CC06",
|
||||
"magic-grid.min.js": "30BA27115FAC84B018A5A8C64031939DF1E324AE199F2F3675925ECF427CBFFC",
|
||||
"mdi.min.js": "8A22F2F37F88F74FC07CE2FECA7CE135182058BE24409BAF3DEF0D5845B0BE1A",
|
||||
"medal-helper.min.css": "205A02CC6E8B2DBDA222A0660D83EA6E4B24F0B5A753E269FED099AB8AE31B6C",
|
||||
"medal-helper.min.html": "5D7057259368BE97DED3375DD904695B245AA2BF338C5E18CB3CF61DD913617C",
|
||||
"medal-helper.min.js": "33751914C5DE205D79E059F7BF285E325E4D6DBFC68AE7E4D4B6307672F23B6E",
|
||||
"minimal-home.vue.min.js": "D2415F3A5133375033DA383D4DAF77C52A8D85491DBF556DAB74F059974CC3D4",
|
||||
"narrow-danmaku.min.js": "12475431A527EFF15100AF57C9C53D0603BC27723126D966CB01240917602253",
|
||||
"medal-helper.min.js": "558A17832A4F12CD240DC69E21E9D8FF1411713D980490A3AE4CDB37DB9A8AF2",
|
||||
"minimal-home.vue.min.js": "D57B319D596F36FF077B7E4D831E2D627C93B8BBED3639DD4199C661B82E9D9A",
|
||||
"narrow-danmaku.min.js": "FB1584C871972076D8CE973E3FF0B9AD4EE892AD310A0ECD0393299A4F33F582",
|
||||
"new-styles.min.js": "3D7E8E25C5B5B6BD3F784BC05D403C35F0658E67197F878874A9554C2FF5127B",
|
||||
"no-banner.min.css": "DA096F94E7FA26992F3F71245E704D69A1C222D0ADA6F1990FA5D948507CE15F",
|
||||
"no-live-autoplay.min.js": "EE4E05A1A2BCB96EA50C2F3891AC3EBBE65D2660103A244DB0297CC5F05D9BAE",
|
||||
"no-mini-video-autoplay.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
|
||||
"notify-new-version.min.js": "C7F6A165710C4DC7D312B5D0AF3B96350EF7C3AD0E8AB4F99E5DEA8C00547057",
|
||||
"old-tweets.min.js": "CF1E860AEA12A798884DE63BC8FAE1FEF84FEE526C3F896CA3D37D3B55AE84A6",
|
||||
"notify-new-version.min.js": "B657B4A67D791FC413E1DBF2BBC59A79EE453582F44F17BF9157D927891BAE96",
|
||||
"old-tweets.min.js": "387152B26384B0900985F527112841CC00A48F507EAA8FA634D13FFA83447A72",
|
||||
"old.min.css": "4C8C918BEBE59E9EE19D5E383234767EE2A2F1DB72E86F0C9F9CE01F26DD193C",
|
||||
"outer-watchlater.min.css": "B40E94BADA1A9BC96422777B33150780330763098B539921DA05F9D3BA487424",
|
||||
"outer-watchlater.min.js": "ACC9CC9A95B70FA65E5E944F996A7E586C9D6F033C50B687376505E9E308430E",
|
||||
"outer-watchlater.min.js": "B6D702917A31B4028464CB9B89CB45EB1ABF38E6EE8E682CF8812546EE8194DC",
|
||||
"override-navbar.min.css": "E5AA612841281169CA367A238FB934F807900A385CE2298B7352FF3CA4623757",
|
||||
"override-navbar.min.js": "5EC6A7D1D2ADE38FEA0BDE3FBBDB5A4054A05FE2FC386FB3339CD9AD3AF7F4DE",
|
||||
"override-navbar.min.js": "F5CE3084B234311F233009A02E2FA253E01878DEFE106C32F2057AD012ADD55B",
|
||||
"player-focus.min.js": "2C849315D6FE5968908ACC2F0CD6252C8D5988485B10C1FD09C96D2E397FD30D",
|
||||
"player-shadow.min.js": "918D2127907BC2C164CB86BF7F9C2501CF3B9CD236FEEDE5155B9B5D932F3415",
|
||||
"player-shadow.min.js": "881CA9DC9C282EA5DE48136C41FD16A8778A4E1345666507238388DCAA28C876",
|
||||
"rank-list.vue.min.js": "8789E4642F9FF9AB40879F4E91936E089697BB10DF60D73CB7BD16A9ED27487E",
|
||||
"remove-promotions.min.css": "FC6AA1EE75AFD8C82E8AFBC68FD898364AD8EB3720503B1A7A613CAB2B38C5EC",
|
||||
"remove-promotions.min.js": "A10C64F78511BC75B9BBA2DFFEBF7FCC4C6C505EF2F75DC0C7AFEF3E162BEA1E",
|
||||
"remove-promotions.min.js": "AC8A11C2575FF6AB4B13052BD88D92AE80C54159A7FC9718EEAA022C3AFE819E",
|
||||
"remove-top-mask.min.js": "A15C1EC10D2E1A61845B1ADAE51860553F96427059E10443B1E53FAF48F45304",
|
||||
"remove-watermark.min.js": "EF8A48E379DE9400E7FCEA7A455EC966B56ADCE31D722FF02C8111FB92A148AF",
|
||||
"remove-watermark.min.js": "6CFDACB9A8E3A96134F362B2B3AE99631D696A99303358149AEC305706A181CD",
|
||||
"screenshot.min.css": "C8BFD4B0A76A758477B767338ABA1D0A49408EDBA861351EA5CB57070515CE76",
|
||||
"screenshot.min.js": "655DE531468A00BCE2F78B406B9A79C6D00F22A299D37BFC8F5C775E15D26DDC",
|
||||
"screenshot.min.js": "67F277D0C836FB27367B6D04C30BCE6DE0EC490B83BDFB9DAD7EBDCCCB6C83C1",
|
||||
"scrollbar.min.css": "9792340121B6EE6E618A3F62AABD9C992D9C325803DF4879C8A74F02DA0E2213",
|
||||
"search.vue.min.js": "050019AC283F730181913EBE2D4AD0F89D6E1F0D607A06482652937946390B86",
|
||||
"seeds-to-coins.min.js": "3F1D383501A6E989255808A82850903EB10931CBE0ADE652AADED69FB9502C57",
|
||||
"seeds-to-coins.min.js": "31F9375D93CF291A332458311F0D8EE5B8019AD5380F6873EA46EB34C778C036",
|
||||
"selectable-column-text.min.js": "09694A9E5BA787634FDCA96BF073BB83C599AA44D259BA442E22AACC54A7CB78",
|
||||
"settings-search.min.js": "C3B605AF2581F562415B6AA30F7B1D825A74EB0B2B83A5F17A303B7B5646E261",
|
||||
"settings-side-bar.min.js": "B299CF87359B416711F4DED3BCF0A32A4CA4C9B1B96D045B383A20C641C6C1C7",
|
||||
"settings-tooltip.en-US.min.js": "44E33B86E82D55BF0575D9AF28EADF12B6CDB05A822C0344CFC2B56076E85F61",
|
||||
"settings-tooltip.ja-JP.min.js": "E02B7D9AD4AD241AF6EBA5F15B11AC6DC2214A1BBDB868A1F0AB7FF0B373BB74",
|
||||
"settings-side-bar.min.js": "6CBC03ABE6E913FEF3AE09C9EAB67AD636C7E102F6F521ED273C5997103184B1",
|
||||
"settings-tooltip.en-US.min.js": "44BCE57BE4824F222BAF409B0A20635351A0713CC59C9417D655C0B9ED623A04",
|
||||
"settings-tooltip.ja-JP.min.js": "A7ED1759012425A11A383395BB8CF1809F1B59C862921D5DFB3C2C16AFB470AA",
|
||||
"settings-tooltip.loader.min.js": "B3941A6B9A5AC693832EA49015397114DC95137E12E6D1ABC311EFF3A3D6F319",
|
||||
"settings-tooltip.min.css": "0C138D5CF16B9068E73D173D229B2B458C15F50272DA73D6A580921C5A848845",
|
||||
"settings-tooltip.min.js": "E9ABA72B3C29CA850342109E57B055B193F3356DD59876B202E8E908AE6247C9",
|
||||
"settings-tooltip.zh-CN.min.js": "8C32C96C69AC6BFD43725CF243EEE37043351E2FD96B84347AC087D39AA221B3",
|
||||
"show-dead-video-title.min.js": "945C4F0E5FB2C62DB21C42FCE01829BAE7B13F4FBD90731CB85C38B82801B1A8",
|
||||
"settings-tooltip.zh-CN.min.js": "D33153BE6C6CD8C54F203A981A816C66A1B24A43FCA2C45DFE33023A920A02AD",
|
||||
"show-dead-video-title.min.js": "8D591930421EBA43A1BDF50DC8B645C1BD1A17E109FB1CFBCD6B78E6C74E1D68",
|
||||
"simple-home.vue.min.js": "F64C88FB33612D715A4ED98A398E6D0E003DCDBF7A2CEDBA9FEC56A63E761A3C",
|
||||
"simplify-home.min.css": "37DC1F7ABDA7BD514F1DF5B3D470C620CEDC4AD1D9EFDFD8D9E43F6A45B3CEB3",
|
||||
"simplify-home.min.js": "A81F7063A6EBA963E80673B0E285173D142C354388894AB4A872BFC73DEA4789",
|
||||
"simplify-home.vue.min.js": "B3B67BA62EE1A8525DBE3D8777AFC3772C32C70C24C39291A51F4E4F8F8E6F24",
|
||||
"simplify-liveroom.min.css": "0F24C08B156121AF7B321448572996B29519881CC08D2EAA340BE2510E90B458",
|
||||
"simplify-liveroom.min.js": "5830D4C0A222EFDEAFE5D49989F3C0F8D1E8900D9ECC461961E4B51D499C2C92",
|
||||
"simplify-home.min.css": "C12B89218065EB887D4330C93747822115B31AD93073FF9F89AA585AEC9752CD",
|
||||
"simplify-home.min.js": "F6D7F8E0D45847C3E056711AECE3832785603E7EF85A4B995C028F5CBE539C94",
|
||||
"simplify-home.vue.min.js": "073A24094C480D6DD79006C3704002563AD9DF1BA496FF937DFE4A25869722E8",
|
||||
"simplify-liveroom.min.css": "97060C7E91C8BC39534EC6A415C20AC2E5A29697A88E93F995EA112E145245D7",
|
||||
"simplify-liveroom.min.js": "16C7DFF5204E5A020371C5F050A9557C65C8B25283145FBC6BBD892E82016C35",
|
||||
"skip-charge-list.min.css": "D3C988CE131CEBFAC8A60360529C83EC4AE1B9EA122F9A6924F19963E25A4FE9",
|
||||
"skip-charge-list.min.js": "D057258F8EE77D949147174585B1A8C640DDB74E0C0B711A50AEAC8D6792F49F",
|
||||
"slip.min.js": "0905C7F3B0BFA6535D48CA9A4D2DDCE0EDD83E66AA3D19AA3C1A6A53ECDD15FE",
|
||||
"style.min.css": "27223BD1ABBB5D8E529B13C009B5099F53F75B26AA713E4C660C205C1121495B",
|
||||
"superchat-translate.min.css": "F4874FE716A750AE0D21DA44393F286E5AABFFA949476E2FA06CDBE2748CF095",
|
||||
"superchat-translate.min.js": "06FA00F803DEEEB27ACD6983D52C1D17E7A8CA79EA7F301524DDAF58BBA9D6B3",
|
||||
"text-validate.min.js": "3F523485A3EAB6F5BB5C81570A8F4796F13EA00E4A229CFD24CB10DC5B5B61C0",
|
||||
"theme-colors.min.js": "3001D5DAD0EFBAEC7F96C51FD3BE2C4677E358AD70D8DD019D2280EA450A34E7",
|
||||
"title.min.js": "0F738220A30AB7707BD1F7EA0380279E55295DDE500D313E8AC39EF713385B2C",
|
||||
"title.min.js": "7E4C78056159D3DCCA2CAC003B20ED0D75A559694A05460ED4E9B2FCFE6E9850",
|
||||
"toast.min.css": "6F4343B67FF70C0A1217051F92BC854EE7A510A5AD5F115D98203C61C5A57D27",
|
||||
"toast.min.js": "9B71F0AC57C75F8BDD267839101881ACAC61ED52EC67DEE30B97965D4CB21713",
|
||||
"toast.min.js": "C15A9041B3D714D689CD0498B88C101DDAD9E99F1D275FCBB1ABC491636A534C",
|
||||
"touch-navbar.min.js": "21EF203296CF795E2471D04E7C44F5FA734FC7EB3EF6187B5AC6D562572D2649",
|
||||
"touch-player.min.css": "C1988B4756185611653E666C0C9E825C9B6AA36FA47D362CC2CD9390DC1E2281",
|
||||
"touch-player.min.js": "8DFD1BAC99C5CE691DAF319BDA55CF628BE27F300AD7A0110D925945ADD0F608",
|
||||
"touch-player.min.js": "5CA0C5A0621330ABBD62B31042ADDF9019D27DEA7D58B69CB959C90B25D8C8F5",
|
||||
"tweets.min.css": "9015C1F165C91B9205ABBE4E8A3B5FA83DB1EB4B5CF2442846AF61E44FF178A8",
|
||||
"v-checkbox.vue.min.js": "A23C35D5627009A29FD396A024442A19E37DEE70674BF3CE0FA377D781ED2231",
|
||||
"v-dropdown.vue.min.js": "66C883695F6653412980050A23F7581557407A2859214BF0CAAEC7001D0B5DDB",
|
||||
"video-card.vue.min.js": "C5C2871A956D9312D4AD9EDB813F355C77CD428710B5F8A9E391F8CD78D60E83",
|
||||
"video-card.vue.min.js": "E6FE8542E8910ED47A8D677533D213934682318A71A071BEF2BD4DFB7E01F33E",
|
||||
"video-dash.min.js": "9684C74C7782FA18DB45C262F8C41460ABB973C8B1868A5FBBD1DD2608E3C90D",
|
||||
"video-downloader-fragment.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
|
||||
"video-info.min.js": "7234A74CA28A772A31E41BBD4925FC2B22C6701419ADFD511402C6A9D6D9E5FA",
|
||||
"video-list.vue.min.js": "3949826DB0DB7A563F7F239F3DF0E51D048ADCAD06D91CC8E5C0EE8A8D4E10DE",
|
||||
"video-story.min.js": "F9D4D2D80997DF5F11BF0CFA4D389B77BDBF1566EA6002E47174B68B440F3C0D",
|
||||
"view-cover.min.js": "C458AD430FB767111D2F8E1F63BF85C3047FC7FDDED82D00C0D8EEA9542BD945",
|
||||
"watchlater-api.min.js": "33466718EEB3796E3330F85BA16624428F7BBFC1D7B293A6F431373BED7773CE",
|
||||
"view-cover.min.js": "15FD7850E0D084507E99A959FA651F50E1B24D44B065584F6D9296D2DE2CB8ED",
|
||||
"watchlater-api.min.js": "78500DA05FB09B9A1158697454627738BAF5111F39E76CCBF4136188BBE7792E",
|
||||
"watchlater-expire-warnings.min.js": "81F440FEC135D6FD2ADD55E5661C82C50F4B37B891D1BB0524CF9F20089E9F5D",
|
||||
"watchlater.min.js": "B74FB2BE4B9B416C09FF8C2BABD36CB5971A4382C4143495065E94DEA1D5CBF9"
|
||||
}
|
||||
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
2
min/clear-cache.min.js
vendored
2
min/clear-cache.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(n,c)=>{return{widget:{content:`\n <button\n class="gui-settings-flat-button"\n id="clear-cache">\n <i class="icon-clear"></i>\n <span>清除缓存</span>\n </button>`,condition:()=>typeof offlineData==="undefined",success:()=>{$("#clear-cache").on("click",()=>{n.cache={};Toast.success("已删除全部缓存.","清除缓存",5e3)})}}}}})();
|
||||
(()=>{return(n,c)=>{return{widget:{content:`\n<button\nclass="gui-settings-flat-button"\nid="clear-cache">\n<i class="icon-clear"></i>\n<span>清除缓存</span>\n</button>`,condition:()=>typeof offlineData==="undefined",success:()=>{$("#clear-cache").on("click",()=>{n.cache={};Toast.success("已删除全部缓存.","清除缓存",5e3)})}}}}})();
|
||||
2
min/custom-control-background.min.js
vendored
2
min/custom-control-background.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(o,t)=>{document.body.style.setProperty("--custom-control-background-opacity",o.customControlBackgroundOpacity);addSettingsListener("customControlBackgroundOpacity",o=>{document.body.style.setProperty("--custom-control-background-opacity",o)});const n=()=>{t.applyStyle("customControlBackgroundStyle");if(!o.touchVideoPlayer){t.applyImportantStyleFromText(`\n <style id="control-background-non-touch">\n .bilibili-player-video-control-bottom\n {\n margin: 7px 0 0 0 !important;\n padding: 8px 0 0 !important;\n }\n </style>\n `)}};n();return{reload:n,unload:()=>{t.removeStyle("customControlBackgroundStyle");const o=document.getElementById("control-background-non-touch");o&&o.remove()}}}})();
|
||||
(()=>{return(o,t)=>{document.body.style.setProperty("--custom-control-background-opacity",o.customControlBackgroundOpacity);addSettingsListener("customControlBackgroundOpacity",o=>{document.body.style.setProperty("--custom-control-background-opacity",o)});const n=()=>{t.applyStyle("customControlBackgroundStyle");if(!o.touchVideoPlayer){t.applyImportantStyleFromText(`\n<style id="control-background-non-touch">\n.bilibili-player-video-control-bottom\n{\nmargin: 7px 0 0 0 !important;\npadding: 8px 0 0 !important;\n}\n</style>\n`)}};n();return{reload:n,unload:()=>{t.removeStyle("customControlBackgroundStyle");const o=document.getElementById("control-background-non-touch");o&&o.remove()}}}})();
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/danmaku-converter.min.js
vendored
2
min/danmaku-converter.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/dark-important.min.css
vendored
2
min/dark-important.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/dark-navbar.min.css
vendored
2
min/dark-navbar.min.css
vendored
@ -1 +1 @@
|
||||
#link-navbar-vm>.link-navbar .nav-item:hover,.bili-header-m .nav-menu .nav-con .nav-item:hover,.right-part>.shortcuts-ctnr .shortcut-item:hover,.uns_box ul.menu li:not(.b-post):hover,.z_top .z_top_nav ul li:hover{background-color:#222}.link-navbar .nav-item:hover,.nav-header-wrapper .nav-header .nav-header-search-bar,.search-bar-ctnr .search-bar,.shortcuts-ctnr .shortcut-item:hover{background-color:#222!important}#app>.link-navbar,#app>.nav-header-wrapper,#link-navbar-vm>.link-navbar,#navbar-vm>.link-navbar,.b-header-mask-wrp .b-header-mask,.bili-header-m .nav-menu .nav-mask,.bili-header-m .nav-menu.blur-black .nav-mask{background-color:#444}.link-navbar{background-color:#444!important}.z_top .i-link:hover,.z_top .z_top_nav ul li.home:hover{background-color:transparent}#app>.nav-header-wrapper>.nav-header{background:0 0}#app>.link-navbar .main-ctnr .nav-logo,#app>.link-navbar .nav-item.selected .label,#app>.link-navbar .nav-item:hover .icon-font,#app>.nav-header-wrapper>.nav-header .nav-header-mainsite,#app>.nav-header-wrapper>.nav-header .order-center,#link-navbar-vm>.link-navbar .main-ctnr .nav-logo,#link-navbar-vm>.link-navbar .nav-item:hover,.bili-header-m .nav-menu .nav-con .nav-item .t,.link-navbar .main-ctnr .custom-link>a,.my-link-btn .label,.right-part>.shortcuts-ctnr,.right-part>.shortcuts-ctnr .shortcut-item:hover,.shortcut-item .list-item span,.shortcuts-ctnr .shortcut-item,.uns_box li.u-i a.i-link,.z_top a,.z_top.b-header-blur .uns_box li.u-i a.i-link,.z_top.b-header-blur .z_top_nav li a.i-link{color:#eee}.link-navbar .main-ctnr .nav-logo,.nav-header-wrapper .nav-header .nav-header-search-bar,.search-bar-ctnr .search-bar input{color:#eee!important}.search-bar-ctnr .search-bar .placeholder,.search-bar-ctnr .search-bar .search-btn,.search-bar-ctnr .search-bar input::placeholder{color:#878787!important}.uns_box li.u-i:hover a.i-link,.z_top .i-link:hover{color:var(--theme-color)}.link-navbar,.link-navbar-ctnr{box-shadow:none!important}.link-navbar .main-ctnr .nav-logo::before,.nav-header-wrapper .nav-header .order-icon{filter:brightness(0) invert(1)!important}.search-bar-ctnr .search-bar{border-color:transparent!important;box-shadow:0 2px 10px 1px #0002}
|
||||
#link-navbar-vm>.link-navbar .nav-item:hover,.bili-header-m .nav-menu .nav-con .nav-item:hover,.link-navbar .nav-item:hover,.nav-header-wrapper .nav-header .nav-header-search-bar,.right-part>.shortcuts-ctnr .shortcut-item:hover,.search-bar-ctnr .search-bar,.shortcuts-ctnr .shortcut-item:hover,.uns_box ul.menu li:not(.b-post):hover,.z_top .z_top_nav ul li:hover{background-color:#222!important}#app>.link-navbar,#app>.nav-header-wrapper,#link-navbar-vm>.link-navbar,#navbar-vm>.link-navbar,.b-header-mask-wrp .b-header-mask,.bili-header-m .nav-menu .nav-mask,.bili-header-m .nav-menu.blur-black .nav-mask,.link-navbar{background-color:#444!important}.z_top .i-link:hover,.z_top .z_top_nav ul li.home:hover{background-color:transparent!important}#app>.nav-header-wrapper>.nav-header{background:0 0!important}#app>.link-navbar .main-ctnr .nav-logo,#app>.link-navbar .nav-item.selected .label,#app>.link-navbar .nav-item:hover .icon-font,#app>.nav-header-wrapper>.nav-header .nav-header-mainsite,#app>.nav-header-wrapper>.nav-header .order-center,#link-navbar-vm>.link-navbar .main-ctnr .nav-logo,#link-navbar-vm>.link-navbar .nav-item:hover,.bili-header-m .nav-menu .nav-con .nav-item .t,.link-navbar .main-ctnr .custom-link>a,.link-navbar .main-ctnr .nav-logo,.my-link-btn .label,.nav-header-wrapper .nav-header .nav-header-search-bar,.right-part>.shortcuts-ctnr,.right-part>.shortcuts-ctnr .shortcut-item:hover,.search-bar-ctnr .search-bar input,.shortcut-item .list-item span,.shortcuts-ctnr .shortcut-item,.uns_box li.u-i a.i-link,.z_top a,.z_top.b-header-blur .uns_box li.u-i a.i-link,.z_top.b-header-blur .z_top_nav li a.i-link{color:#eee!important}.search-bar-ctnr .search-bar .placeholder,.search-bar-ctnr .search-bar .search-btn,.search-bar-ctnr .search-bar input::placeholder{color:#878787!important}.uns_box li.u-i:hover a.i-link,.z_top .i-link:hover{color:var(--theme-color)}.link-navbar,.link-navbar-ctnr{box-shadow:none!important}.link-navbar .main-ctnr .nav-logo::before,.nav-header-wrapper .nav-header .order-icon{filter:brightness(0) invert(1)!important}.search-bar-ctnr .search-bar{border-color:transparent!important;box-shadow:0 2px 10px 1px #0002}
|
||||
2
min/dark-styles.min.js
vendored
2
min/dark-styles.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(r,e)=>{SpinQuery.any(()=>$(".custom-scrollbar"),r=>r.removeClass("custom-scrollbar"));const l=()=>{document.body.classList.add("dark");e.applyStyle("scrollbarStyle");SpinQuery.any(()=>$(".custom-scrollbar"),r=>r.removeClass("custom-scrollbar"));if(r.hideBanner){e.applyImportantStyle("darkStyleNavBar")}e.applyStyle("darkStyle");e.applyImportantStyle("darkStyleImportant")};l();return{reload:l,unload:()=>{e.removeStyle("scrollbarStyle");e.removeStyle("darkStyleNavBar");e.removeStyle("darkStyle");e.removeStyle("darkStyleImportant");document.body.classList.remove("dark")}}}})();
|
||||
(()=>{return(e,t)=>{const l=()=>{SpinQuery.select(".custom-scrollbar").then(e=>e&&e.classList.remove("custom-scrollbar"))};const r=()=>{document.body.classList.add("dark");l();t.applyStyle("scrollbarStyle");t.applyImportantStyle("darkStyleNavBar");t.applyStyle("darkStyle");t.applyImportantStyle("darkStyleImportant")};r();return{reload:r,unload:()=>{document.body.classList.remove("dark");t.removeStyle("scrollbarStyle");t.removeStyle("darkStyleNavBar");t.removeStyle("darkStyle");t.removeStyle("darkStyleImportant")}}}})();
|
||||
2
min/dark.min.css
vendored
2
min/dark.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/download-audio.min.js
vendored
2
min/download-audio.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{class n{constructor(){this.sid=null;this.progress=null}async getDownloadUrl(){const e=`https://www.bilibili.com/audio/music-service-c/web/url?sid=${this.sid}&privilege=2&quality=2`;const t=await Ajax.getJsonWithCredentials(e);if(t.code===0){return t.data.cdns.shift()}else{logError("获取下载链接失败, 请确保当前账号有下载权限.","下载音频",1e4);return null}}async download(){const e=await this.getDownloadUrl();return new Promise((t,n)=>{const s=new XMLHttpRequest;s.open("GET",e);s.responseType="blob";s.addEventListener("load",()=>t(s.response));s.addEventListener("error",()=>n(s.status));s.addEventListener("progress",e=>this.progress&&this.progress(100*e.loaded/e.total));s.send()})}}const s="下载音频";return{export:n,widget:{content:`\n <button\n disabled\n class="gui-settings-flat-button"\n id="download-audio">\n <i class="icon-download"></i>\n <span>${s}</span>\n <a id="download-audio-link" style="display: none"></a>\n </button>`,condition:()=>document.URL.includes("bilibili.com/audio"),success:async()=>{await SpinQuery.select(()=>document.querySelector("#app"));const e=document.querySelector("#download-audio");const t=e.querySelector("span");const o=new n;o.progress=(e=>{t.innerHTML=`${Math.round(e)}%`});const i=document.querySelector("#download-audio-link");e.addEventListener("click",async e=>{if(o.sid===null||e.target===i){return}const n=await o.download();t.innerHTML=s;const r=i.getAttribute("href");if(r){URL.revokeObjectURL(r)}i.setAttribute("href",URL.createObjectURL(n));const d=(()=>{const e=document.querySelector(".song-title");if(e){return e.getAttribute("title")}else{return"神秘音频"}})();i.setAttribute("download",d+".m4a");i.click()});Observer.childList("#app",()=>{const t=document.URL.match(/bilibili\.com\/audio\/au([\d]+)/);if(t&&t[1]){e.disabled=false;o.sid=t[1]}else{e.disabled=true}})}}}}})();
|
||||
(()=>{return(e,t)=>{class n{constructor(){this.sid=null;this.progress=null}async getDownloadUrl(){const e=`https://www.bilibili.com/audio/music-service-c/web/url?sid=${this.sid}&privilege=2&quality=2`;const t=await Ajax.getJsonWithCredentials(e);if(t.code===0){return t.data.cdns.shift()}else{logError("获取下载链接失败, 请确保当前账号有下载权限.","下载音频",1e4);return null}}async download(){const e=await this.getDownloadUrl();return new Promise((t,n)=>{const s=new XMLHttpRequest;s.open("GET",e);s.responseType="blob";s.addEventListener("load",()=>t(s.response));s.addEventListener("error",()=>n(s.status));s.addEventListener("progress",e=>this.progress&&this.progress(100*e.loaded/e.total));s.send()})}}const s="下载音频";return{export:n,widget:{content:`\n<button\ndisabled\nclass="gui-settings-flat-button"\nid="download-audio">\n<i class="icon-download"></i>\n<span>${s}</span>\n<a id="download-audio-link" style="display: none"></a>\n</button>`,condition:()=>document.URL.includes("bilibili.com/audio"),success:async()=>{await SpinQuery.select(()=>document.querySelector("#app"));const e=document.querySelector("#download-audio");const t=e.querySelector("span");const o=new n;o.progress=(e=>{t.innerHTML=`${Math.round(e)}%`});const i=document.querySelector("#download-audio-link");e.addEventListener("click",async e=>{if(o.sid===null||e.target===i){return}const n=await o.download();t.innerHTML=s;const r=i.getAttribute("href");if(r){URL.revokeObjectURL(r)}i.setAttribute("href",URL.createObjectURL(n));const d=(()=>{const e=document.querySelector(".song-title");if(e){return e.getAttribute("title")}else{return"神秘音频"}})();i.setAttribute("download",d+".m4a");i.click()});Observer.childList("#app",()=>{const t=document.URL.match(/bilibili\.com\/audio\/au([\d]+)/);if(t&&t[1]){e.disabled=false;o.sid=t[1]}else{e.disabled=true}})}}}}})();
|
||||
2
min/download-danmaku.min.js
vendored
2
min/download-danmaku.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{const{getFriendlyTitle:n}=e.import("title");const{DanmakuInfo:i}=e.import("video-info");const{DanmakuConverter:a}=e.import("danmaku-converter");async function o(t){const e=n();let i={title:e};try{await loadDanmakuSettingsPanel();const t=t=>{const e=parseFloat(dq(t).style.transform.replace(/translateX\(([\d\.]+)/,"$1"));const n={0:0,44:1,94:2,144:3,188:4}[e];return n};i.font=dq(".bilibili-player-video-danmaku-setting-right-font .bui-select-result").innerText;i.alpha=parseFloat(dq(".bilibili-player-setting-opacity .bui-bar").style.transform.replace(/scaleX\(([\d\.]+)\)/,"$1"));i.duration=(()=>{const e=[18,14,10,8,6][t(".bilibili-player-setting-speedplus .bui-thumb")];return t=>{switch(t.type){case 4:case 5:return 4;default:return e}}})();i.blockTypes=(()=>{let t=[];const e={".bilibili-player-block-filter-type[ftype=scroll]":[1,2,3],".bilibili-player-block-filter-type[ftype=top]":[5],".bilibili-player-block-filter-type[ftype=bottom]":[4],".bilibili-player-block-filter-type[ftype=color]":["color"]};for(const[n,i]of Object.entries(e)){if(dq(n).classList.contains("disabled")){t=t.concat(i)}}return t.concat(7,8)})();const e=[1.4,1.2,1,.8,.6][t(".bilibili-player-setting-fontsize .bui-thumb")];i.resolution={x:1920*e,y:1080*e};i.bottomMarginPercent=[.75,.5,.25,0,0][t(".bilibili-player-setting-area .bui-thumb")];if(i.bottomMarginPercent===0&&dq(".bilibili-player-video-danmaku-setting-left-preventshade input").checked){i.bottomMarginPercent=.15}i.bold=dq(".bilibili-player-video-danmaku-setting-right-font-bold input").checked}catch(t){i={font:"微软雅黑",alpha:.6,duration:t=>{switch(t.type){case 4:case 5:return 4;default:return 6}},blockTypes:[7,8],resolution:{x:1920,y:1080},bottomMarginPercent:.15,bold:false}}const o=new a(i);const l=o.convertToAssDocument(t);return l.generateAss()}async function l(t,e){const a=n();const l=new i((unsafeWindow||window).cid);await l.fetchInfo();const r=await(async()=>{if(t===true){return new Blob([await o(l.rawXML)],{type:"text/plain"})}else{return new Blob([l.rawXML],{type:"text/plain"})}})();const s=URL.createObjectURL(r);const c=dq("#danmaku-link");const d=c.getAttribute("href");if(d){URL.revokeObjectURL(d)}clearTimeout(e);dq("#download-danmaku>span").innerHTML="下载弹幕";c.setAttribute("download",`${a}.${t?"ass":"xml"}`);c.setAttribute("href",s);c.click()}return{export:{downloadDanmaku:l,convertToAss:o},widget:{content:`\n <button\n class="gui-settings-flat-button"\n id="download-danmaku">\n <i class="icon-danmaku"></i>\n <span>下载弹幕</span>\n <a id="danmaku-link" style="display:none"></a>\n </button>`,condition:async()=>{let t=await SpinQuery.select(()=>(unsafeWindow||window).cid);return Boolean(t)},success:()=>{const t=document.querySelector("#danmaku-link");dq("#download-danmaku").addEventListener("click",e=>{if(e.target!==t){const t=setTimeout(()=>dq("#download-danmaku>span").innerHTML="请稍侯...",200);l(e.shiftKey,t)}})}}}}})();
|
||||
(()=>{return(t,e)=>{const{getFriendlyTitle:n}=e.import("title");const{DanmakuInfo:i}=e.import("video-info");const{DanmakuConverter:a}=e.import("danmaku-converter");async function o(t){const e=n();let i={title:e};try{await loadDanmakuSettingsPanel();const t=t=>{const e=parseFloat(dq(t).style.transform.replace(/translateX\(([\d\.]+)/,"$1"));const n={0:0,44:1,94:2,144:3,188:4}[e];return n};i.font=dq(".bilibili-player-video-danmaku-setting-right-font .bui-select-result").innerText;i.alpha=parseFloat(dq(".bilibili-player-setting-opacity .bui-bar").style.transform.replace(/scaleX\(([\d\.]+)\)/,"$1"));i.duration=(()=>{const e=[18,14,10,8,6][t(".bilibili-player-setting-speedplus .bui-thumb")];return t=>{switch(t.type){case 4:case 5:return 4;default:return e}}})();i.blockTypes=(()=>{let t=[];const e={".bilibili-player-block-filter-type[ftype=scroll]":[1,2,3],".bilibili-player-block-filter-type[ftype=top]":[5],".bilibili-player-block-filter-type[ftype=bottom]":[4],".bilibili-player-block-filter-type[ftype=color]":["color"]};for(const[n,i]of Object.entries(e)){if(dq(n).classList.contains("disabled")){t=t.concat(i)}}return t.concat(7,8)})();const e=[1.4,1.2,1,.8,.6][t(".bilibili-player-setting-fontsize .bui-thumb")];i.resolution={x:1920*e,y:1080*e};i.bottomMarginPercent=[.75,.5,.25,0,0][t(".bilibili-player-setting-area .bui-thumb")];if(i.bottomMarginPercent===0&&dq(".bilibili-player-video-danmaku-setting-left-preventshade input").checked){i.bottomMarginPercent=.15}i.bold=dq(".bilibili-player-video-danmaku-setting-right-font-bold input").checked}catch(t){i={font:"微软雅黑",alpha:.6,duration:t=>{switch(t.type){case 4:case 5:return 4;default:return 6}},blockTypes:[7,8],resolution:{x:1920,y:1080},bottomMarginPercent:.15,bold:false}}const o=new a(i);const l=o.convertToAssDocument(t);return l.generateAss()}async function l(t,e){const a=n();const l=new i((unsafeWindow||window).cid);await l.fetchInfo();const r=await(async()=>{if(t===true){return new Blob([await o(l.rawXML)],{type:"text/plain"})}else{return new Blob([l.rawXML],{type:"text/plain"})}})();const s=URL.createObjectURL(r);const c=dq("#danmaku-link");const d=c.getAttribute("href");if(d){URL.revokeObjectURL(d)}clearTimeout(e);dq("#download-danmaku>span").innerHTML="下载弹幕";c.setAttribute("download",`${a}.${t?"ass":"xml"}`);c.setAttribute("href",s);c.click()}return{export:{downloadDanmaku:l,convertToAss:o},widget:{content:`\n<button\nclass="gui-settings-flat-button"\nid="download-danmaku">\n<i class="icon-danmaku"></i>\n<span>下载弹幕</span>\n<a id="danmaku-link" style="display:none"></a>\n</button>`,condition:async()=>{let t=await SpinQuery.select(()=>(unsafeWindow||window).cid);return Boolean(t)},success:()=>{const t=document.querySelector("#danmaku-link");dq("#download-danmaku").addEventListener("click",e=>{if(e.target!==t){const t=setTimeout(()=>dq("#download-danmaku>span").innerHTML="请稍侯...",200);l(e.shiftKey,t)}})}}}}})();
|
||||
2
min/download-video.min.css
vendored
2
min/download-video.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<div class=download-video><a v-bind:href=blobUrl id=video-complete style="display: none"></a><div class=header><h1>下载视频</h1><i class="mdi mdi-close"v-on:click=close()></i></div><div v-if=batch class=tabs><div class="tab download-single"v-bind:class="{active: downloadSingle}"v-on:click="downloadSingle = true">单个视频</div><div class="tab download-batch"v-bind:class="{active: !downloadSingle}"v-on:click="downloadSingle = false">批量导出</div></div><div v-show=downloadSingle class=info><img v-bind:src=coverUrl class=cover><div class=title><span class=size><div v-if=sizeWarning class=size-warning><i class="mdi mdi-alert-circle"></i><div class=size-warning-tip>警告: 过大的视频大小会在直接下载时占用大量内存, 并可能导致浏览器标签页崩溃. 请考虑降低清晰度或使用导出选项.</div></div>预计大小: {{displaySize}}</span></div></div><div class=options><div class=option-item>清晰度<v-dropdown v-on:change=formatChange() v-bind:items=qualityModel.items v-bind:value.sync=qualityModel.value></v-dropdown></div><div class=option-item>弹幕<v-dropdown v-on:change=danmakuOptionChange() v-bind:items=danmakuModel.items v-bind:value.sync=danmakuModel.value></v-dropdown></div></div><div class=separator></div><div v-show=downloadSingle class=direct-download><div class=direct-download-header><h2>直接下载</h2><span class=download-speed>{{speed}}</span></div><button v-if=!downloading class="primary start-download"v-on:click=startDownload()>开始</button><button v-else class="primary cancel-download"v-on:click=cancelDownload()>取消</button><div class=progress><div class=background><div class=foreground v-bind:style="{width: progressPercent + '%'}"></div></div><span class=percent>{{progressPercent}}%</span></div></div><div v-show=!downloadSingle class=batch-download><div class=episode-header><h2>选集</h2><button class=list-tool title=全选 v-on:click=selectAllEpisodes()><i class="mdi mdi-checkbox-multiple-marked-circle"></i></button><button class=list-tool title=全不选 v-on:click=unselectAllEpisodes()><i class="mdi mdi-checkbox-multiple-blank-circle-outline"></i></button><button class=list-tool title=反选 v-on:click=inverseAllEpisodes()><i class="mdi mdi-circle-slice-4"></i></button><span class=selected-count>{{selectedEpisodeCount}}/{{episodeList.length}}</span></div><div class=episode-list><v-checkbox v-for="ep of episodeList"v-bind:key=ep.index v-bind:title=ep.title v-bind:checked.sync=ep.checked></v-checkbox></div></div><div class=separator></div><div class=exports><h2>导出</h2><div class=actions v-bind:class="{busy: busy}"><button class=idm-export disabled=disabled title="暂不支持导出IDM, 详见 GitHub issue #149">IDM</button><button class=aria2-file v-on:click="exportData('aria2')">aria2</button><div class="button aria2-rpc"v-on:click.self=toggleRpcSettings()>{{showRpcSettings ? '取消' : 'aria2 RPC'}}<i :class="{'mdi-close': showRpcSettings, 'mdi-chevron-right': !showRpcSettings}"class=mdi v-on:click.self=toggleRpcSettings()></i><div class=rpc-settings v-bind:class="{show: showRpcSettings}"><h1>aria2 RPC 配置</h1><div class=rpc-settings-item>主机<input type=text v-model=rpcSettings.host placeholder=127.0.0.1></div><div class=rpc-settings-item>端口<input type=text v-model=rpcSettings.port placeholder=6800></div><div class=rpc-settings-item>密钥<input type=text v-model=rpcSettings.secretKey></div><div class=rpc-settings-item>限速<input type=text v-model=rpcSettings.maxDownloadLimit placeholder=无></div><div class=rpc-settings-item>路径<input type=text v-model=rpcSettings.dir></div><div class=rpc-settings-item>方法<v-dropdown style="text-transform: uppercase;"v-bind:items="['get', 'post']"v-bind:value.sync=rpcSettings.method></v-dropdown></div><div class="primary button"v-on:click="saveRpcSettings();toggleRpcSettings();exportData('aria2RPC')">确定</div></div></div></div></div></div>
|
||||
<div class=download-video><a v-bind:href=blobUrl id=video-complete style="display: none"></a><div class=header><h1>下载视频</h1><i class="mdi mdi-close"v-on:click=close()></i></div><div v-if=batch class=tabs><div class="tab download-single"v-bind:class="{active: downloadSingle}"v-on:click="downloadSingle = true">单个视频</div><div class="tab download-batch"v-bind:class="{active: !downloadSingle}"v-on:click="downloadSingle = false">批量导出</div></div><div v-show=downloadSingle class=info><img v-bind:src=coverUrl class=cover><div class=title><span class=size><div v-if=sizeWarning class=size-warning><i class="mdi mdi-alert-circle"></i><div class=size-warning-tip>警告: 过大的视频大小会在直接下载时占用大量内存, 并可能导致浏览器标签页崩溃. 请考虑降低清晰度或使用导出选项.</div></div>预计大小: {{displaySize}}</span></div></div><div class=options><div class=option-item v-if=enableDash>格式<v-dropdown style="text-transform: uppercase;"v-on:change=dashChange() v-bind:items=dashModel.items v-bind:value.sync=dashModel.value></v-dropdown></div><div class=option-item>清晰度<v-dropdown v-on:change=formatChange() v-bind:items=qualityModel.items v-bind:value.sync=qualityModel.value></v-dropdown></div><div class=option-item>弹幕<v-dropdown v-on:change=danmakuOptionChange() v-bind:items=danmakuModel.items v-bind:value.sync=danmakuModel.value></v-dropdown></div></div><div class=separator></div><div v-show=downloadSingle class=direct-download><div class=direct-download-header><h2>直接下载</h2><span class=download-speed>{{speed}}</span></div><button v-if=!downloading class="primary start-download"v-on:click=startDownload()>开始</button><button v-else class="primary cancel-download"v-on:click=cancelDownload()>取消</button><div class=progress><div class=background><div class=foreground v-bind:style="{width: progressPercent + '%'}"></div></div><span class=percent>{{progressPercent}}%</span></div></div><div v-show=!downloadSingle class=batch-download><div class=episode-header><h2>选集</h2><button class=list-tool title=全选 v-on:click=selectAllEpisodes()><i class="mdi mdi-checkbox-multiple-marked-circle"></i></button><button class=list-tool title=全不选 v-on:click=unselectAllEpisodes()><i class="mdi mdi-checkbox-multiple-blank-circle-outline"></i></button><button class=list-tool title=反选 v-on:click=inverseAllEpisodes()><i class="mdi mdi-circle-slice-4"></i></button><span class=selected-count>{{selectedEpisodeCount}}/{{episodeList.length}}</span></div><div class=episode-list><v-checkbox v-for="ep of episodeList"v-bind:key=ep.index v-bind:title=ep.title v-bind:checked.sync=ep.checked></v-checkbox></div></div><div class=separator></div><div class=exports><h2>导出</h2><div class=actions v-bind:class="{busy: busy}"><button class=copy-link v-bind:disabled="downloadSingle ? null : 'disabled'"v-on:click="exportData('copyLink')">复制链接</button><button class=aria2-file v-on:click="exportData('aria2')">aria2</button><div class="button aria2-rpc"v-on:click.self=toggleRpcSettings()>{{showRpcSettings ? '取消' : 'aria2 RPC'}}<i :class="{'mdi-close': showRpcSettings, 'mdi-chevron-right': !showRpcSettings}"class=mdi v-on:click.self=toggleRpcSettings()></i><div class=rpc-settings v-bind:class="{show: showRpcSettings}"><h1>aria2 RPC</h1><rpc-profiles @profile-change=updateProfile></rpc-profiles><h2>配置</h2><div class=rpc-settings-item>主机<input type=text v-model=rpcSettings.host placeholder=127.0.0.1></div><div class=rpc-settings-item>端口<input type=text v-model=rpcSettings.port placeholder=6800></div><div class=rpc-settings-item>密钥<input type=text v-model=rpcSettings.secretKey></div><div class=rpc-settings-item>限速<input type=text v-model=rpcSettings.maxDownloadLimit placeholder=无></div><div class=rpc-settings-item>默认路径<input type=text v-model=rpcSettings.baseDir></div><div class=rpc-settings-item>路径<input type=text v-model=rpcSettings.dir></div><div class=final-dir>最终路径: {{rpcSettings.baseDir + rpcSettings.dir}}</div><div class=rpc-settings-item>方法<v-dropdown style="text-transform: uppercase;"v-bind:items="['get', 'post']"v-bind:value.sync=rpcSettings.method></v-dropdown></div><div class=operations><div class="primary button"v-on:click="saveRpcSettings();toggleRpcSettings();exportData('aria2RPC')">开始下载</div><div class=button v-on:click=saveRpcSettings()>{{saveRpcSettingsText}}</div></div></div></div></div></div></div>
|
||||
2
min/download-video.min.js
vendored
2
min/download-video.min.js
vendored
File diff suppressed because one or more lines are too long
1
min/full-activity-content.min.js
vendored
Normal file
1
min/full-activity-content.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(n,t)=>{const e=`\n.card .main-content .expand-btn,\n.card .main-content .content-ellipsis {\ndisplay: none !important;\n}\n.card .main-content .content-full{\ndisplay: block !important;\n}\n`;return t.toggleStyle(e,"full-activity-content")}})();
|
||||
2
min/full-tweets-title.min.js
vendored
2
min/full-tweets-title.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\n height: auto !important;\n}\n.dynamic-m .info a {\n white-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\n display: block !important;\n max-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\n height: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})();
|
||||
(()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\nheight: auto !important;\n}\n.dynamic-m .info a {\nwhite-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\ndisplay: block !important;\nmax-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\nheight: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})();
|
||||
2
min/gui-settings.min.css
vendored
2
min/gui-settings.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/gui-settings.min.js
vendored
2
min/gui-settings.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let r=[];function a(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){r.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});r.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");a(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});r.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function p(){if(typeof offlineData!=="undefined"){}}function f(){if(!CSS.supports("backdrop-filter","blur(24px)")&&!CSS.supports("-webkit-backdrop-filter","blur(24px)")){o.find(e=>e.getAttribute("key")==="blurVideoControl").disabled=true;e.blurVideoControl=false}if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function b(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const e=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(e){document.querySelector(".gui-settings-icon-panel").style.display="none"}const s=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",s);const{style:a}=await t.importAsync("mdi");if(!a){document.body.insertAdjacentHTML("afterbegin",`<link rel="stylesheet" href="//cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css">`)}const m=document.querySelector(".widgets-container");const y=m.querySelector(".empty-tip");Observer.childList(m,()=>{if(m.childElementCount<=1){y.classList.add("show")}else{y.classList.remove("show")}});const h=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const E=document.querySelector(".gui-settings-icon-panel");E.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(E,"be:load");raiseEvent(dq(".bilibili-evolved-about"),"be:about-load");(new n).setupDom();h.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");r=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();p();l();g();u();f();b();new i},{once:true})})()}})();
|
||||
(()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function r(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");r(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function m(){if(typeof offlineData!=="undefined"){}}function f(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function p(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const s=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(s){document.querySelector(".gui-settings-icon-panel").style.display="none"}if(e.guiSettingsDockSide==="右侧"){document.body.classList.add("gui-settings-dock-right")}const r=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",r);const{style:y}=await t.importAsync("mdi");if(!y){document.body.insertAdjacentHTML("afterbegin",`<link rel="stylesheet" href="//cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css">`)}const b=document.querySelector(".widgets-container");const h=b.querySelector(".empty-tip");Observer.childList(b,()=>{if(b.childElementCount<=1){h.classList.add("show")}else{h.classList.remove("show")}});const E=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const S=document.querySelector(".gui-settings-icon-panel");S.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(S,"be:load");raiseEvent(dq(".bilibili-evolved-about"),"be:about-load");(new n).setupDom();E.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();m();l();g();u();f();p();addSettingsListener("guiSettingsDockSide",e=>{document.body.classList[e==="右侧"?"add":"remove"]("gui-settings-dock-right")});new i},{once:true})})()}})();
|
||||
2
min/haruna-scale.min.js
vendored
2
min/haruna-scale.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n `,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})();
|
||||
(()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n.haruna-ctnr,\n.avatar-btn\n{\ntransform: scale(${1/window.devicePixelRatio}) !important;\n}\n`,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})();
|
||||
2
min/hide-bangumi-reviews.min.js
vendored
2
min/hide-bangumi-reviews.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{return n.toggleStyle(`\n #review_module { display: none !important; }\n `,`hide-bangumi-reviews-style`)}})();
|
||||
(()=>{return(e,n)=>{return n.toggleStyle(`\n#review_module { display: none !important; }\n`,`hide-bangumi-reviews-style`)}})();
|
||||
2
min/hide-banner.min.css
vendored
2
min/hide-banner.min.css
vendored
@ -1 +1 @@
|
||||
#banner_link,.custom-navbar .blur-layer,.z-top-container.has-banner>.header{display:none!important}.b-header-mask-wrp .b-header-mask-bg,div.blur-bg{opacity:0!important}
|
||||
#banner_link,.custom-navbar .blur-layer,.z-top-container.has-banner>.header{display:none!important}.b-header-mask-wrp .b-header-mask-bg,div.blur-bg{opacity:0!important}.international-home .bili-banner{visibility:hidden!important;height:50px!important;min-height:unset!important}
|
||||
1
min/hide-category.min.css
vendored
Normal file
1
min/hide-category.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.bili-header-m>.bili-wrapper{visibility:hidden!important;height:18px!important}.primary-menu-itnl{visibility:hidden!important;height:24px!important;padding:0!important}
|
||||
2
min/hide-category.min.js
vendored
2
min/hide-category.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(i,t)=>{const e=`.bili-header-m>.bili-wrapper {\n visibility: hidden !important;\n height: 18px !important;\n}`;return t.toggleStyle(e,"hide-category")}})();
|
||||
(()=>{return(e,t)=>{return t.toggleStyle("hideCategoryStyle")}})();
|
||||
2
min/i18n.en-US.min.js
vendored
2
min/i18n.en-US.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/i18n.ja-JP.min.js
vendored
2
min/i18n.ja-JP.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/i18n.min.css
vendored
2
min/i18n.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/icon.vue.min.js
vendored
2
min/icon.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(o,e)=>{const n=`<i class=be-icon :class=classes></i>`;e.applyStyleFromText(`@font-face{font-family:be-main-iconfont;src:url(//s1.hdslb.com/bfs/seed/jinkela/header/asserts/iconfont.ttf) format("truetype")}@font-face{font-family:be-extended-iconfont;src:url(//s1.hdslb.com/bfs/static/jinkela/video/asserts/iconfont.4bab144.ttf) format("truetype")}@font-face{font-family:be-home-iconfont;src:url(//s1.hdslb.com/bfs/static/jinkela/international-home/asserts/iconfont.ttf) format("truetype")}.be-icon{color:inherit;font-size:24px;font-style:normal}.be-icon.be-main-iconfont{font-family:be-main-iconfont!important}.be-icon.be-extended-iconfont{font-family:be-extended-iconfont!important}.be-icon.be-home-iconfont{font-family:be-home-iconfont!important}.be-icon.be-iconfont-logo::before{content:""}.be-icon.be-iconfont-lv0::before{content:"";color:#9a9a9a}.be-icon.be-iconfont-lv1::before{content:"";color:#646464}body.dark .be-icon.be-iconfont-lv0::before{color:#777}body.dark .be-icon.be-iconfont-lv1::before{color:#ddd}.be-icon.be-iconfont-lv2::before{content:"";color:#1bc861}.be-icon.be-iconfont-lv3::before{content:"";color:#22baea}.be-icon.be-iconfont-lv4::before{content:"";color:#eaa722}.be-icon.be-iconfont-lv5::before{content:"";color:#ff7631}.be-icon.be-iconfont-lv6::before{content:"";color:#ff3131}.be-icon.be-iconfont-profile::before{content:""}.be-icon.be-iconfont-posts::before{content:""}.be-icon.be-iconfont-wallet::before{content:""}.be-icon.be-iconfont-live-center::before{content:""}.be-icon.be-iconfont-order-center::before{content:""}.be-icon.be-iconfont-logout::before{content:""}.be-icon.be-iconfont-ok::before{content:""}.be-icon.be-iconfont-cancel::before{content:""}.be-icon.be-iconfont-bind-phone::before{content:""}.be-icon.be-iconfont-bind-email::before{content:""}.be-icon.be-iconfont-coin-outline::before{content:""}.be-icon.be-iconfont-coin::before{content:""}.be-icon.be-iconfont-b-coin::before{content:""}.be-icon.be-iconfont-activity::before{content:""}.be-icon.be-iconfont-message::before{content:""}.be-icon.be-iconfont-favorites-outline::before{content:""}.be-icon.be-iconfont-favorites::before{content:""}.be-icon.be-iconfont-history::before{content:""}.be-icon.be-iconfont-vip::before{content:""}.be-icon.be-iconfont-play::before{content:""}.be-icon.be-iconfont-danmaku::before{content:""}.be-icon.be-iconfont-like::before{content:""}.be-icon.be-iconfont-like-outline::before{content:""}.be-icon.be-iconfont-up::before{content:""}.be-icon.be-iconfont-up-outline::before{content:""}`,"icon-style");return{export:Object.assign({template:n},{props:{icon:String,type:String},computed:{classes(){if(this.icon===""||this.type===""){return[]}return[`be-iconfont-${this.icon}`,`be-${this.type}-iconfont`]}}})}}})();
|
||||
(()=>{return(o,e)=>{const n=`<i class=be-icon :class=classes></i>`;e.applyStyleFromText(`@font-face{font-family:be-main-iconfont;src:url(//s1.hdslb.com/bfs/seed/jinkela/header/asserts/iconfont.ttf) format("truetype")}@font-face{font-family:be-extended-iconfont;src:url(//s1.hdslb.com/bfs/static/jinkela/video/asserts/iconfont.4bab144.ttf) format("truetype")}@font-face{font-family:be-home-iconfont;src:url(//s1.hdslb.com/bfs/static/jinkela/international-home/asserts/iconfont.ttf) format("truetype")}.be-icon{color:inherit;font-size:24px;font-style:normal;line-height:1}.be-icon.be-main-iconfont{font-family:be-main-iconfont!important}.be-icon.be-extended-iconfont{font-family:be-extended-iconfont!important}.be-icon.be-home-iconfont{font-family:be-home-iconfont!important}.be-icon.be-iconfont-logo::before{content:""}.be-icon.be-iconfont-lv0::before{content:"";color:#9a9a9a}.be-icon.be-iconfont-lv1::before{content:"";color:#646464}body.dark .be-icon.be-iconfont-lv0::before{color:#777}body.dark .be-icon.be-iconfont-lv1::before{color:#ddd}.be-icon.be-iconfont-lv2::before{content:"";color:#1bc861}.be-icon.be-iconfont-lv3::before{content:"";color:#22baea}.be-icon.be-iconfont-lv4::before{content:"";color:#eaa722}.be-icon.be-iconfont-lv5::before{content:"";color:#ff7631}.be-icon.be-iconfont-lv6::before{content:"";color:#ff3131}.be-icon.be-iconfont-profile::before{content:""}.be-icon.be-iconfont-posts::before{content:""}.be-icon.be-iconfont-wallet::before{content:""}.be-icon.be-iconfont-live-center::before{content:""}.be-icon.be-iconfont-order-center::before{content:""}.be-icon.be-iconfont-logout::before{content:""}.be-icon.be-iconfont-ok::before{content:""}.be-icon.be-iconfont-cancel::before{content:""}.be-icon.be-iconfont-bind-phone::before{content:""}.be-icon.be-iconfont-bind-email::before{content:""}.be-icon.be-iconfont-coin-outline::before{content:""}.be-icon.be-iconfont-coin::before{content:""}.be-icon.be-iconfont-b-coin::before{content:""}.be-icon.be-iconfont-activity::before{content:""}.be-icon.be-iconfont-message::before{content:""}.be-icon.be-iconfont-favorites-outline::before{content:""}.be-icon.be-iconfont-favorites::before{content:""}.be-icon.be-iconfont-history::before{content:""}.be-icon.be-iconfont-vip::before{content:""}.be-icon.be-iconfont-play::before{content:""}.be-icon.be-iconfont-danmaku::before{content:""}.be-icon.be-iconfont-like::before{content:""}.be-icon.be-iconfont-like-outline::before{content:""}.be-icon.be-iconfont-up::before{content:""}.be-icon.be-iconfont-up-outline::before{content:""}`,"icon-style");return{export:Object.assign({template:n},{props:{icon:String,type:String},computed:{classes(){if(this.icon===""||this.type===""){return[]}if(this.type==="mdi"){return["mdi",`mdi-${this.icon}`]}return[`be-iconfont-${this.icon}`,`be-${this.type}-iconfont`]}}})}}})();
|
||||
2
min/icons.min.css
vendored
2
min/icons.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/keymap.min.js
vendored
2
min/keymap.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,i)=>{const t=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(t.some(e=>document.URL.startsWith(e))){const e={w:".bilibili-player-video-web-fullscreen",t:".bilibili-player-video-btn-widescreen",r:".bilibili-player-video-btn-repeat",m:".bilibili-player-video-btn-volume .bilibili-player-iconfont-volume",l:".video-toolbar .like",c:".video-toolbar .coin,.tool-bar .coin-info",s:".video-toolbar .collect"};document.body.addEventListener("keydown",i=>{if(document.activeElement&&["input","textarea"].includes(document.activeElement.nodeName.toLowerCase())){return}const t=i.key.toLowerCase();const o=!i.shiftKey&&!i.altKey&&!i.ctrlKey;if(t in e&&o){const o=dq(e[t]);if(!o){return}i.stopPropagation();i.preventDefault();o.click()}else if(t==="d"&&o){const e=dq(".bilibili-player-video-danmaku-switch input");if(!e){return}i.stopPropagation();i.preventDefault();e.checked=!e.checked;raiseEvent(e,"change")}else if(i.shiftKey){const e=dq(".bilibili-player-video video");if(e===null){return}i.stopPropagation();i.preventDefault();const o=[.5,.75,1,1.25,1.5,2];if(t==="ArrowUp".toLowerCase()){e.playbackRate=o.find(i=>i>e.playbackRate)||o[o.length-1]}else if(t==="ArrowDown".toLowerCase()){e.playbackRate=o.find(i=>i<e.playbackRate)||o[0]}}})}}})();
|
||||
(()=>{return(e,i)=>{const t=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(t.some(e=>document.URL.startsWith(e))){const e={w:".bilibili-player-video-web-fullscreen",t:".bilibili-player-video-btn-widescreen",r:".bilibili-player-video-btn-repeat",m:".bilibili-player-video-btn-volume .bilibili-player-iconfont-volume",l:".video-toolbar .like",c:".video-toolbar .coin,.tool-bar .coin-info",s:".video-toolbar .collect"};document.body.addEventListener("keydown",i=>{if(document.activeElement&&["input","textarea"].includes(document.activeElement.nodeName.toLowerCase())){return}const t=i.key.toLowerCase();const o=!i.shiftKey&&!i.altKey&&!i.ctrlKey;if(t in e&&o){const o=dq(e[t]);if(!o){return}i.stopPropagation();i.preventDefault();o.click()}else if(t==="d"&&o){const e=dq(".bilibili-player-video-danmaku-switch input");if(!e){return}i.stopPropagation();i.preventDefault();e.checked=!e.checked;raiseEvent(e,"change")}else if(i.shiftKey){const e=dq(".bilibili-player-video video");if(e===null){return}i.stopPropagation();i.preventDefault();const o=[.5,.75,1,1.25,1.5,2];if(t===">"||t==="ArrowUp".toLowerCase()){e.playbackRate=o.find(i=>i>e.playbackRate)||o[o.length-1]}else if(t==="<"||t==="ArrowDown".toLowerCase()){e.playbackRate=o.find(i=>i<e.playbackRate)||o[0]}else if(t==="?"){e.playbackRate=1}else if(t==="w"){const e=dq(".video-toolbar .ops .watchlater,.more-ops-list .ops-watch-later");if(e!==null){e.click()}}}})}}})();
|
||||
2
min/magic-grid.min.js
vendored
2
min/magic-grid.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{const i=function(t){const e=25;if(!t){throw new Error("No config object has been provided.")}if(typeof t.useTransform!=="boolean"){t.useTransform=true}if(typeof t.gutter!=="number"){t.gutter=e}if(!t.container){s("container")}if(!t.items&&!t.static){s("items or static")}};const s=function(t){throw new Error("Missing property '"+t+"' in MagicGrid config")};const n=function(t){let e=t[0];for(const i of t){if(i.height<e.height){e=i}}return e};class o{constructor(t){i(t);if(t.container instanceof HTMLElement){this.container=t.container;this.containerClass=t.container.className}else{this.containerClass=t.container;this.container=document.querySelector(t.container)}this.items=this.container.children;this.static=t.static||false;this.size=t.items;this.gutter=t.gutter;this.maxColumns=t.maxColumns||false;this.useMin=t.useMin||false;this.useTransform=t.useTransform;this.animate=t.animate||false;this.started=false;this.init()}init(){if(!this.ready()||this.started){return}this.container.style.position="relative";for(let t=0;t<this.items.length;t++){const e=this.items[t].style;e.position="absolute";if(this.animate){e.transition=(this.useTransform?"transform":"top, left")+" 0.2s ease"}}this.started=true}colWidth(){return this.items[0].getBoundingClientRect().width+this.gutter}setup(){const t=this.container.getBoundingClientRect().width;const e=this.colWidth();let i=Math.floor(t/e)||1;const s=[];if(this.maxColumns&&i>this.maxColumns){i=this.maxColumns}for(let t=0;t<i;t++){s[t]={height:0,index:t}}const n=t-i*e+this.gutter;return{cols:s,wSpace:n}}nextCol(t,e){if(this.useMin){return n(t)}return t[e%t.length]}positionItems(){const t=this.setup();const e=t.cols;let i=t.wSpace;let s=0;const n=this.colWidth();i=Math.floor(i/2);for(let t=0;t<this.items.length;t++){const o=this.nextCol(e,t);const h=this.items[t];const r=o.height?this.gutter:0;const a=o.index*n+i+"px";const l=o.height+r+"px";if(this.useTransform){h.style.transform="translate("+a+", "+l+")"}else{h.style.top=l;h.style.left=a}o.height+=h.getBoundingClientRect().height+r;if(o.height>s){s=o.height}}this.container.style.height=s+"px"}ready(){if(this.static){return true}return this.items.length>=this.size}getReady(){const t=setInterval(()=>{this.container=document.querySelector(this.containerClass);this.items=this.container.children;if(this.ready()){clearInterval(t);this.init();this.listen()}},100)}listen(){if(this.ready()){let t;window.addEventListener("resize",()=>{if(!t){t=setTimeout(()=>{this.positionItems();t=null},200)}});this.positionItems()}else{this.getReady()}}}const h={template:`\n <div :class="[wrapper]">\n <slot></slot>\n </div>\n `,name:"magic-grid",props:{wrapper:{type:String,default:"wrapper"},gap:{type:Number,default:32},maxCols:{type:Number,default:5},maxColWidth:{type:Number,default:280},animate:{type:Boolean,default:true},useMin:{type:Boolean,default:false}},data(){return{started:false,items:[]}},mounted(){this.waitUntilReady()},updated(){this.positionItems()},methods:{waitUntilReady(){if(this.isReady()){this.positionItems()}else this.getReady()},isReady(){return this.$el&&this.items.length>0},getReady(){let t=setInterval(()=>{this.items=this.$el.children;if(this.isReady()){clearInterval(t);this.init()}},100)},init(){if(!this.isReady()||this.started)return;this.$el.style.position="relative";Array.prototype.forEach.call(this.items,t=>{t.style.position="absolute";t.style.maxWidth=this.maxColWidth+"px";if(this.animate)t.style.transition="top, left 0.2s ease"});this.started=true;this.waitUntilReady()},colWidth(){return this.items[0].getBoundingClientRect().width+this.gap},setup(){let t=this.$el.getBoundingClientRect().width;let e=Math.floor(t/this.colWidth())||1;let i=[];if(this.maxCols&&e>this.maxCols){e=this.maxCols}for(let t=0;t<e;t++){i[t]={height:0,top:0,index:t}}let s=t-e*this.colWidth()+this.gap;return{cols:i,wSpace:s}},nextCol(t,e){if(this.useMin)return this.getMin(t);return t[e%t.length]},positionItems(){let{cols:t,wSpace:e}=this.setup();e=Math.floor(e/2);Array.prototype.forEach.call(this.items,(i,s)=>{i.style.position="absolute";i.style.maxWidth=this.maxColWidth+"px";if(this.animate)i.style.transition="top, left 0.2s ease";let n=this.nextCol(t,s);let o=n.index*this.colWidth()+e;i.style.left=o+"px";i.style.top=n.height+n.top+"px";n.height+=n.top+i.getBoundingClientRect().height;n.top=this.gap});this.$el.style.height=this.getMax(t).height+"px"},getMax(t){let e=t[0];for(let i of t){if(i.height>e.height)e=i}return e},getMin(t){let e=t[0];for(let i of t){if(i.height<e.height)e=i}return e}}};return{export:{MagicGrid:o,MagicGridComponent:h}}}})();
|
||||
(()=>{return(t,e)=>{const i=function(t){const e=25;if(!t){throw new Error("No config object has been provided.")}if(typeof t.useTransform!=="boolean"){t.useTransform=true}if(typeof t.gutter!=="number"){t.gutter=e}if(!t.container){s("container")}if(!t.items&&!t.static){s("items or static")}};const s=function(t){throw new Error("Missing property '"+t+"' in MagicGrid config")};const n=function(t){let e=t[0];for(const i of t){if(i.height<e.height){e=i}}return e};class o{constructor(t){i(t);if(t.container instanceof HTMLElement){this.container=t.container;this.containerClass=t.container.className}else{this.containerClass=t.container;this.container=document.querySelector(t.container)}this.items=this.container.children;this.static=t.static||false;this.size=t.items;this.gutter=t.gutter;this.maxColumns=t.maxColumns||false;this.useMin=t.useMin||false;this.useTransform=t.useTransform;this.animate=t.animate||false;this.started=false;this.init()}init(){if(!this.ready()||this.started){return}this.container.style.position="relative";for(let t=0;t<this.items.length;t++){const e=this.items[t].style;e.position="absolute";if(this.animate){e.transition=(this.useTransform?"transform":"top, left")+" 0.2s ease"}}this.started=true}colWidth(){return this.items[0].getBoundingClientRect().width+this.gutter}setup(){const t=this.container.getBoundingClientRect().width;const e=this.colWidth();let i=Math.floor(t/e)||1;const s=[];if(this.maxColumns&&i>this.maxColumns){i=this.maxColumns}for(let t=0;t<i;t++){s[t]={height:0,index:t}}const n=t-i*e+this.gutter;return{cols:s,wSpace:n}}nextCol(t,e){if(this.useMin){return n(t)}return t[e%t.length]}positionItems(){const t=this.setup();const e=t.cols;let i=t.wSpace;let s=0;const n=this.colWidth();i=Math.floor(i/2);for(let t=0;t<this.items.length;t++){const o=this.nextCol(e,t);const h=this.items[t];const r=o.height?this.gutter:0;const a=o.index*n+i+"px";const l=o.height+r+"px";if(this.useTransform){h.style.transform="translate("+a+", "+l+")"}else{h.style.top=l;h.style.left=a}o.height+=h.getBoundingClientRect().height+r;if(o.height>s){s=o.height}}this.container.style.height=s+"px"}ready(){if(this.static){return true}return this.items.length>=this.size}getReady(){const t=setInterval(()=>{this.container=document.querySelector(this.containerClass);this.items=this.container.children;if(this.ready()){clearInterval(t);this.init();this.listen()}},100)}listen(){if(this.ready()){let t;window.addEventListener("resize",()=>{if(!t){t=setTimeout(()=>{this.positionItems();t=null},200)}});this.positionItems()}else{this.getReady()}}}const h={template:`\n<div :class="[wrapper]">\n<slot></slot>\n</div>\n`,name:"magic-grid",props:{wrapper:{type:String,default:"wrapper"},gap:{type:Number,default:32},maxCols:{type:Number,default:5},maxColWidth:{type:Number,default:280},animate:{type:Boolean,default:true},useMin:{type:Boolean,default:false}},data(){return{started:false,items:[]}},mounted(){this.waitUntilReady()},updated(){this.positionItems()},methods:{waitUntilReady(){if(this.isReady()){this.positionItems()}else this.getReady()},isReady(){return this.$el&&this.items.length>0},getReady(){let t=setInterval(()=>{this.items=this.$el.children;if(this.isReady()){clearInterval(t);this.init()}},100)},init(){if(!this.isReady()||this.started)return;this.$el.style.position="relative";Array.prototype.forEach.call(this.items,t=>{t.style.position="absolute";t.style.maxWidth=this.maxColWidth+"px";if(this.animate)t.style.transition="top, left 0.2s ease"});this.started=true;this.waitUntilReady()},colWidth(){return this.items[0].getBoundingClientRect().width+this.gap},setup(){let t=this.$el.getBoundingClientRect().width;let e=Math.floor(t/this.colWidth())||1;let i=[];if(this.maxCols&&e>this.maxCols){e=this.maxCols}for(let t=0;t<e;t++){i[t]={height:0,top:0,index:t}}let s=t-e*this.colWidth()+this.gap;return{cols:i,wSpace:s}},nextCol(t,e){if(this.useMin)return this.getMin(t);return t[e%t.length]},positionItems(){let{cols:t,wSpace:e}=this.setup();e=Math.floor(e/2);Array.prototype.forEach.call(this.items,(i,s)=>{i.style.position="absolute";i.style.maxWidth=this.maxColWidth+"px";if(this.animate)i.style.transition="top, left 0.2s ease";let n=this.nextCol(t,s);let o=n.index*this.colWidth()+e;i.style.left=o+"px";i.style.top=n.height+n.top+"px";n.height+=n.top+i.getBoundingClientRect().height;n.top=this.gap});this.$el.style.height=this.getMax(t).height+"px"},getMax(t){let e=t[0];for(let i of t){if(i.height>e.height)e=i}return e},getMin(t){let e=t[0];for(let i of t){if(i.height<e.height)e=i}return e}}};return{export:{MagicGrid:o,MagicGridComponent:h}}}})();
|
||||
2
min/medal-helper.min.js
vendored
2
min/medal-helper.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{class i{constructor(e,t){this.isActive=e;this.id=t}static parseJson(e,{successAction:t,errorMessage:i,errorAction:a}){const s=JSON.parse(e);if(s.code!==0){logError(`${i} 错误码:${s.code} ${s.message||""}`);return a(s)}return t(s)}}class a extends i{constructor({medal_id:e,status:t,level:i,medalName:a,uname:s}){super(t===1,e);this.level=i;this.name=a;this.upName=s}static async getList(){return i.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/medal?page=1&pageSize=256"),{successAction:e=>e.data.fansMedalList.map(e=>new a(e)),errorAction:()=>[],errorMessage:"无法获取勋章列表."})}static getContainer(){return document.querySelector("#medal-helper .medal-popup ul")}static getItemTemplate(e){return`<li data-id='${e.id}' ${e.isActive?"class='active'":""}>\n <label title='${e.upName}'>\n <input name='medal' type='radio' ${e.isActive?"checked":""}>\n <div class='fans-medal-item level-${e.level}'>\n <span class='label'>${e.name}</span>\n <span class='level'>${e.level}</span>\n </div>\n </label>\n </li>`}async activate(){return i.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearFansMedal?medal_id=${this.id}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴勋章失败."})}async deactivate(){return i.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWear`),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下勋章失败."})}}class s extends i{constructor({id:e,cid:t,wear:i,css:a,name:r,source:c}){super(i,a);this.tid=e;this.cid=t;this.name=r;this.source=c;s.getImageMap().then(e=>{this.imageUrl=e[this.id]})}static async getImageMap(){if(s.imageMap===undefined){return i.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/rc/v1/Title/webTitles"),{successAction(e){s.imageMap={};e.data.forEach(e=>{s.imageMap[e.identification]=e.web_pic_url});return s.imageMap},errorAction:()=>{return{}},errorMessage:"获取头衔图片失败."})}else{return s.imageMap}}static async getList(){return i.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/ajaxTitleInfo?page=1&pageSize=256&had=1"),{successAction:e=>e.data.list.map(e=>new s(e)),errorAction:()=>[],errorMessage:"无法获取头衔列表."})}static getContainer(){return document.querySelector("#title-helper .medal-popup ul")}static getItemTemplate(e){return`<li data-id='${e.id}' ${e.isActive?"class='active'":""}>\n <label title='${e.name}'>\n <input name='medal' type='radio' ${e.isActive?"checked":""}>\n <img src='${e.imageUrl}' class="title-image">\n </label>\n </li>`}async activate(){return i.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearTitle`,`id=${this.tid}&cid=${this.cid}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴头衔失败."})}async deactivate(){return i.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWearTitle`,""),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下头衔失败."})}}async function r(e){const t=e.getContainer();const i=await e.getList();const a=async()=>{const i=await e.getList();i.forEach(e=>{const i=t.querySelector(`li[data-id='${e.id}']`);if(e.isActive){i.classList.add("active")}else{i.classList.remove("active")}i.querySelector(`input`).checked=e.isActive})};i.forEach(s=>{const r=e.getItemTemplate(s);t.insertAdjacentHTML("beforeend",r);const c=t.querySelector(`li[data-id='${s.id}']`);const n=c.querySelector(`input`);c.addEventListener("click",e=>{if(e.target===n){return}if(s.isActive){s.deactivate().then(a)}else{const e=i.find(e=>e.isActive);if(e){e.isActive=false}s.activate().then(a)}})})}return{export:{Badge:i,Medal:a,Title:s},widget:{condition:()=>document.domain==="live.bilibili.com",content:t.data.medalHelperHtml.text,success:()=>{document.querySelectorAll(".medal-helper").forEach(e=>{const t=e.querySelector(".medal-popup");e.addEventListener("click",e=>{if(!t.contains(e.target)){t.classList.toggle("opened")}})});r(a);s.getImageMap().then(()=>r(s))}}}}})();
|
||||
(()=>{return(e,t)=>{class i{constructor(e,t){this.isActive=e;this.id=t}static parseJson(e,{successAction:t,errorMessage:i,errorAction:a}){const s=JSON.parse(e);if(s.code!==0){logError(`${i} 错误码:${s.code} ${s.message||""}`);return a(s)}return t(s)}}class a extends i{constructor({medal_id:e,status:t,level:i,medalName:a,uname:s}){super(t===1,e);this.level=i;this.name=a;this.upName=s}static async getList(){return i.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/medal?page=1&pageSize=256"),{successAction:e=>e.data.fansMedalList.map(e=>new a(e)),errorAction:()=>[],errorMessage:"无法获取勋章列表."})}static getContainer(){return document.querySelector("#medal-helper .medal-popup ul")}static getItemTemplate(e){return`<li data-id='${e.id}' ${e.isActive?"class='active'":""}>\n<label title='${e.upName}'>\n<input name='medal' type='radio' ${e.isActive?"checked":""}>\n<div class='fans-medal-item level-${e.level}'>\n<span class='label'>${e.name}</span>\n<span class='level'>${e.level}</span>\n</div>\n</label>\n</li>`}async activate(){return i.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearFansMedal?medal_id=${this.id}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴勋章失败."})}async deactivate(){return i.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWear`),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下勋章失败."})}}class s extends i{constructor({id:e,cid:t,wear:i,css:a,name:r,source:c}){super(i,a);this.tid=e;this.cid=t;this.name=r;this.source=c;s.getImageMap().then(e=>{this.imageUrl=e[this.id]})}static async getImageMap(){if(s.imageMap===undefined){return i.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/rc/v1/Title/webTitles"),{successAction(e){s.imageMap={};e.data.forEach(e=>{s.imageMap[e.identification]=e.web_pic_url});return s.imageMap},errorAction:()=>{return{}},errorMessage:"获取头衔图片失败."})}else{return s.imageMap}}static async getList(){return i.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/ajaxTitleInfo?page=1&pageSize=256&had=1"),{successAction:e=>e.data.list.map(e=>new s(e)),errorAction:()=>[],errorMessage:"无法获取头衔列表."})}static getContainer(){return document.querySelector("#title-helper .medal-popup ul")}static getItemTemplate(e){return`<li data-id='${e.id}' ${e.isActive?"class='active'":""}>\n<label title='${e.name}'>\n<input name='medal' type='radio' ${e.isActive?"checked":""}>\n<img src='${e.imageUrl}' class="title-image">\n</label>\n</li>`}async activate(){return i.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearTitle`,`id=${this.tid}&cid=${this.cid}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴头衔失败."})}async deactivate(){return i.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWearTitle`,""),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下头衔失败."})}}async function r(e){const t=e.getContainer();const i=await e.getList();const a=async()=>{const i=await e.getList();i.forEach(e=>{const i=t.querySelector(`li[data-id='${e.id}']`);if(e.isActive){i.classList.add("active")}else{i.classList.remove("active")}i.querySelector(`input`).checked=e.isActive})};i.forEach(s=>{const r=e.getItemTemplate(s);t.insertAdjacentHTML("beforeend",r);const c=t.querySelector(`li[data-id='${s.id}']`);const n=c.querySelector(`input`);c.addEventListener("click",e=>{if(e.target===n){return}if(s.isActive){s.deactivate().then(a)}else{const e=i.find(e=>e.isActive);if(e){e.isActive=false}s.activate().then(a)}})})}return{export:{Badge:i,Medal:a,Title:s},widget:{condition:()=>document.domain==="live.bilibili.com",content:t.data.medalHelperHtml.text,success:()=>{document.querySelectorAll(".medal-helper").forEach(e=>{const t=e.querySelector(".medal-popup");e.addEventListener("click",e=>{if(!t.contains(e.target)){t.classList.toggle("opened")}})});r(a);s.getImageMap().then(()=>r(s))}}}}})();
|
||||
2
min/minimal-home.vue.min.js
vendored
2
min/minimal-home.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(a,e)=>{const i=`<div class=minimal-home><div class=minimal-home-header><icon class=logo icon=logo type=main></icon><div class=home-tabs><div v-for="(tab, index) of tabs":key=index class=tab :class="{active: tab.active}":data-tab=tab.name @click=changeTab(tab)>{{tab.displayName}}</div></div></div><div class=minimal-home-content><transition name=minimal-home-content-transition mode=out-in><component :is=content :key=activeTab.name :rank-days=rankDays></component></transition></div></div>`;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out}.minimal-home .logo{font-size:48px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:flex-end;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#707070;opacity:.75;position:relative;cursor:pointer;margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}`,"minimal-home-style");const t=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8"},{name:"ranking7",displayName:"一周排行",active:false,more:"https://www.bilibili.com/ranking/all/0/0/7",rankDays:7},{name:"ranking3",displayName:"三日排行",active:false,more:"https://www.bilibili.com/ranking",rankDays:3},{name:"ranking1",displayName:"昨日排行",active:false,more:"https://www.bilibili.com/ranking/all/0/0/1",rankDays:1}];return{export:Object.assign({template:i},{components:{Icon:()=>e.importAsync("icon.vue"),HomeVideo:()=>e.importAsync("home-video.vue"),RankList:()=>e.importAsync("rank-list.vue")},data(){return{tabs:t,content:"HomeVideo"}},computed:{activeTab(){return this.tabs.find(a=>a.active)},rankDays(){return this.activeTab.rankDays||0}},methods:{changeTab(a){if(a.active){window.open(a.more,"_blank");return}const e=this.activeTab;e.active=false;a.active=true;this.content=a.name==="video"?"HomeVideo":"RankList"}}})}}})();
|
||||
(()=>{return(i,e)=>{const a=`<div class=minimal-home><div class=minimal-home-header><div class=home-tabs><div v-for="(tab, index) of tabs":key=index class=tab :class="{active: tab.active}":data-tab=tab.name @click=changeTab(tab)>{{tab.displayName}}</div></div></div><div class=minimal-home-content><transition name=minimal-home-content-transition mode=out-in><component :is=content :key=activeTab.name :show-rank=activeTab.showRank></component></transition></div><div class=minimal-home-footer><div class="footer-button view-more"@click=viewMore()><icon type=mdi icon=dots-horizontal-circle-outline></icon>查看更多</div><div class="footer-button go-to-top"@click=goToTop()><icon type=mdi icon=arrow-up-drop-circle-outline></icon>返回顶部</div></div></div>`;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:a},{components:{Icon:()=>e.importAsync("icon.vue"),VideoList:()=>e.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const e=this.activeTab;e.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})();
|
||||
2
min/narrow-danmaku.min.js
vendored
2
min/narrow-danmaku.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,l)=>{const i=`<style id="narrow-danmaku-style">\n@media screen and (max-width: 1200px)\n{\n .bilibili-player.mode-webfullscreen .bilibili-player-video-control-wrap .bilibili-player-video-control-bottom-center .bilibili-player-video-sendbar .bilibili-player-video-inputbar\n {\n display: flex !important;\n }\n}\n</style>`;l.applyStyleFromText(i);return{reload:()=>l.applyStyleFromText(i),unload:()=>document.getElementById("narrow-danmaku-style").remove()}}})();
|
||||
(()=>{return(e,l)=>{const i=`<style id="narrow-danmaku-style">\n@media screen and (max-width: 1200px)\n{\n.bilibili-player.mode-webfullscreen .bilibili-player-video-control-wrap .bilibili-player-video-control-bottom-center .bilibili-player-video-sendbar .bilibili-player-video-inputbar\n{\ndisplay: flex !important;\n}\n}\n</style>`;l.applyStyleFromText(i);return{reload:()=>l.applyStyleFromText(i),unload:()=>document.getElementById("narrow-danmaku-style").remove()}}})();
|
||||
2
min/notify-new-version.min.js
vendored
2
min/notify-new-version.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const n={less:-1,equal:0,greater:1,incomparable:NaN};class s{constructor(e){if(!/^[\d\.]+$/.test(e)){throw new Error("Invalid version string")}this.parts=e.split(".").map(e=>parseInt(e));this.versionString=e}compareTo(e){for(let t=0;t<this.parts.length;++t){if(e.parts.length===t){return n.greater}if(this.parts[t]===e.parts[t]){continue}if(this.parts[t]>e.parts[t]){return n.greater}return n.less}if(this.parts.length!==e.parts.length){return n.less}return n.equal}greaterThan(e){return this.compareTo(e)===n.greater}lessThan(e){return this.compareTo(e)===n.less}equals(e){return this.compareTo(e)===n.equal}}async function r(){if(typeof offlineData!=="undefined"||isIframe()){return false}try{const t=await Ajax.monkey({url:Resource.root+"version.txt"});const n=new s(t);const r=new s(e.currentVersion);const i=n.greaterThan(r);if(i){const t=`新版本<span>${n.versionString}</span>已发布. <a id="new-version-link" class="link" href="${e.latestVersionLink}">安装</a><a class="link" target="_blank" href="https://github.com/the1812/Bilibili-Evolved/releases">查看</a>`;const s=Toast.info(t,"检查更新");SpinQuery.select("#new-version-link").then(e=>e.addEventListener("click",()=>{s&&s.dismiss()}))}return i}catch(e){return false}}return{widget:{content:`\n <button class="gui-settings-flat-button" id="new-version-update">\n <a href="${e.latestVersionLink}" style="display:none"></a>\n <i class="icon-update"></i>\n <span>安装更新</span>\n </button>\n <button class="gui-settings-flat-button" id="new-version-info">\n <a target="blank" style="display:none" href="https://github.com/the1812/Bilibili-Evolved/releases"></a>\n <i class="icon-info"></i>\n <span>查看更新</span>\n </button>\n `,condition:r,success:()=>{document.querySelector("#new-version-update").addEventListener("click",e=>{if(e.target.nodeName.toLowerCase()!=="a"){document.querySelector("#new-version-update a").click()}});document.querySelector("#new-version-info").addEventListener("click",e=>{if(e.target.nodeName.toLowerCase()!=="a"){document.querySelector("#new-version-info a").click()}})}}}}})();
|
||||
(()=>{return(e,t)=>{const n={less:-1,equal:0,greater:1,incomparable:NaN};class s{constructor(e){if(!/^[\d\.]+$/.test(e)){throw new Error("Invalid version string")}this.parts=e.split(".").map(e=>parseInt(e));this.versionString=e}compareTo(e){for(let t=0;t<this.parts.length;++t){if(e.parts.length===t){return n.greater}if(this.parts[t]===e.parts[t]){continue}if(this.parts[t]>e.parts[t]){return n.greater}return n.less}if(this.parts.length!==e.parts.length){return n.less}return n.equal}greaterThan(e){return this.compareTo(e)===n.greater}lessThan(e){return this.compareTo(e)===n.less}equals(e){return this.compareTo(e)===n.equal}}async function r(){if(typeof offlineData!=="undefined"||isIframe()){return false}try{const t=await Ajax.monkey({url:Resource.root+"version.txt"});const n=new s(t);const r=new s(e.currentVersion);const i=n.greaterThan(r);if(i){const t=`新版本<span>${n.versionString}</span>已发布. <a id="new-version-link" class="link" href="${e.latestVersionLink}">安装</a><a class="link" target="_blank" href="https://github.com/the1812/Bilibili-Evolved/releases">查看</a>`;const s=Toast.info(t,"检查更新");SpinQuery.select("#new-version-link").then(e=>e.addEventListener("click",()=>{s&&s.dismiss()}))}return i}catch(e){return false}}return{widget:{content:`\n<button class="gui-settings-flat-button" id="new-version-update">\n<a href="${e.latestVersionLink}" style="display:none"></a>\n<i class="icon-update"></i>\n<span>安装更新</span>\n</button>\n<button class="gui-settings-flat-button" id="new-version-info">\n<a target="blank" style="display:none" href="https://github.com/the1812/Bilibili-Evolved/releases"></a>\n<i class="icon-info"></i>\n<span>查看更新</span>\n</button>\n`,condition:r,success:()=>{document.querySelector("#new-version-update").addEventListener("click",e=>{if(e.target.nodeName.toLowerCase()!=="a"){document.querySelector("#new-version-update a").click()}});document.querySelector("#new-version-info").addEventListener("click",e=>{if(e.target.nodeName.toLowerCase()!=="a"){document.querySelector("#new-version-info a").click()}})}}}}})();
|
||||
2
min/old-tweets.min.js
vendored
2
min/old-tweets.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{const n=[`a.read-more[href*='t.bilibili.com']`,`.link-navbar a[href*='t.bilibili.com']`,`.bili-header-m .nav-menu .nav-con .nav-item [href*='t.bilibili.com']`];const o=`https://www.bilibili.com/account/dynamic`;const e=`https://t.bilibili.com/`;const c=()=>{for(const t of n){SpinQuery.any(()=>document.querySelectorAll(t),t=>t.forEach(t=>t.setAttribute("href",o)))}};SpinQuery.select(".dynamic-m .wnd_bottom .r-l").then(t=>{if(t!==null){Observer.childList(".dynamic-m .wnd_bottom .r-l",c)}});c();const s=location.host==="t.bilibili.com";return{widget:{condition:()=>{return document.URL.startsWith(e)||document.URL.startsWith(o)},content:`\n <button class="gui-settings-flat-button" id="old-tweets">\n <i class="mdi mdi-24px mdi-swap-horizontal-variant"></i>\n <span>${s?"回到旧版":"转到新版"}</span>\n </button>`,success:()=>{const t=document.querySelector("#old-tweets");t.addEventListener("click",()=>{location.assign(s?o:e)})}}}}})();
|
||||
(()=>{return(t,i)=>{const n=[`a.read-more[href*='t.bilibili.com']`,`.link-navbar a[href*='t.bilibili.com']`,`.bili-header-m .nav-menu .nav-con .nav-item [href*='t.bilibili.com']`];const o=`https://www.bilibili.com/account/dynamic`;const e=`https://t.bilibili.com/`;const c=()=>{for(const t of n){SpinQuery.any(()=>document.querySelectorAll(t),t=>t.forEach(t=>t.setAttribute("href",o)))}};SpinQuery.select(".dynamic-m .wnd_bottom .r-l").then(t=>{if(t!==null){Observer.childList(".dynamic-m .wnd_bottom .r-l",c)}});c();const s=location.host==="t.bilibili.com";return{widget:{condition:()=>{return document.URL.startsWith(e)||document.URL.startsWith(o)},content:`\n<button class="gui-settings-flat-button" id="old-tweets">\n<i class="mdi mdi-24px mdi-swap-horizontal-variant"></i>\n<span>${s?"回到旧版":"转到新版"}</span>\n</button>`,success:()=>{const t=document.querySelector("#old-tweets");t.addEventListener("click",()=>{location.assign(s?o:e)})}}}}})();
|
||||
2
min/outer-watchlater.min.js
vendored
2
min/outer-watchlater.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{(async()=>{if(!document.URL.includes("//www.bilibili.com/video/av")){return}await SpinQuery.condition(()=>document.querySelector(".video-toolbar .ops .collect"),t=>{return t!==null&&t.innerText!=="--"});const t=document.cookie.replace(/(?:(?:^|.*\s*)bili_jct\s*\=\s*([^]*).*$)|^.*$/,"$1");const e=document.querySelector(".video-toolbar .ops .collect");if(!e){return}e.insertAdjacentHTML("afterend",`\n <span title='稍后再看' class='watchlater'>\n <i class='mdi mdi-timetable'></i>\n 稍后再看\n <div class='tip'></div>\n </span>\n `);const i=document.querySelector(".ops .watchlater");const s=document.querySelector(".ops .watchlater .tip");if(!i||!s){return}let a;const o=async()=>{const t=await SpinQuery.select(()=>unsafeWindow.aid);const e=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(e.code!==0){e.data={list:[]}}const s=e.data.list.map(t=>t.aid);if(s.includes(parseInt(t))){i.classList.add("on")}else{i.classList.remove("on")}return t};Observer.videoChange(async()=>{a=await o()});let n=0;const c=async({url:e,tipText:i})=>{const o=await Ajax.postTextWithCredentials(e,`aid=${a}&csrf=${t}`);const c=JSON.parse(o);if(c.code!==0){logError(`稍后再看操作失败: ${c.message}`);return false}else{s.innerHTML=i;s.classList.add("show");if(n!==0){clearTimeout(n)}n=setTimeout(()=>s.classList.remove("show"),2e3);return true}};i.addEventListener("click",async()=>{i.classList.toggle("on");let t;if(i.classList.contains("on")){t=await c({url:"https://api.bilibili.com/x/v2/history/toview/add",tipText:"已添加至稍后再看"})}else{t=await c({url:"https://api.bilibili.com/x/v2/history/toview/del",tipText:"已从稍后再看移除"})}if(t==false){i.classList.toggle("on")}})})()}})();
|
||||
(()=>{return(t,e)=>{(async()=>{if(!document.URL.includes("//www.bilibili.com/video/av")){return}await SpinQuery.condition(()=>document.querySelector(".video-toolbar .ops .collect"),t=>{return t!==null&&t.innerText!=="--"});const t=getCsrf();const e=document.querySelector(".video-toolbar .ops .collect");if(!e){return}e.insertAdjacentHTML("afterend",`\n<span title='稍后再看' class='watchlater'>\n<i class='mdi mdi-timetable'></i>\n稍后再看\n<div class='tip'></div>\n</span>\n`);const i=document.querySelector(".ops .watchlater");const s=document.querySelector(".ops .watchlater .tip");if(!i||!s){return}const a=async()=>{const t=await SpinQuery.select(()=>unsafeWindow.aid);if(!t){return}const e=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(e.code!==0){e.data={list:[]}}const s=e.data.list.map(t=>t.aid);if(s.includes(parseInt(t))){i.classList.add("on")}else{i.classList.remove("on")}};Observer.videoChange(async()=>{await a()});let n=0;const o=async({url:e,tipText:i})=>{const a=await Ajax.postTextWithCredentials(e,`aid=${unsafeWindow.aid}&csrf=${t}`);const o=JSON.parse(a);if(o.code!==0){logError(`稍后再看操作失败: ${o.message}`);return false}else{s.innerHTML=i;s.classList.add("show");if(n!==0){clearTimeout(n)}n=setTimeout(()=>s.classList.remove("show"),2e3);return true}};i.addEventListener("click",async()=>{i.classList.toggle("on");let t;if(i.classList.contains("on")){t=await o({url:"https://api.bilibili.com/x/v2/history/toview/add",tipText:"已添加至稍后再看"})}else{t=await o({url:"https://api.bilibili.com/x/v2/history/toview/del",tipText:"已从稍后再看移除"})}if(t===false){i.classList.toggle("on")}})})()}})();
|
||||
2
min/override-navbar.min.js
vendored
2
min/override-navbar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{if(document.querySelector(`.z_header`)!==null){n.removeStyle("tweetsStyle");return}SpinQuery.any(()=>$(".head-content.bili-wrapper>div.search:not(.filter-item)"),e=>{const n=$(document.querySelector(".nav-con.fr"));e.detach().insertAfter(n)});if(e.preserveRank){SpinQuery.select(()=>document.querySelector(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.classList.add("preserve-rank");if(!e.querySelector("a.icons-enabled")){e.insertAdjacentHTML("afterbegin",`\n <a title="排行榜"\n class="icons-enabled"\n href="https://www.bilibili.com/ranking"\n target="_blank">\n <i class="icon-rank"></i>\n </a>\n `)}})}else{SpinQuery.select(()=>document.querySelector(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.classList.remove("preserve-rank");const n=e.querySelector("a.icons-enabled");n&&n.remove()})}SpinQuery.any(()=>$("#banner_link"),()=>n.removeStyle("tweetsStyle"));if(!e.showBanner){n.applyStyle("noBannerStyle")}else{n.removeStyle("noBannerStyle")}}})();
|
||||
(()=>{return(e,n)=>{if(document.querySelector(`.z_header`)!==null){n.removeStyle("tweetsStyle");return}SpinQuery.any(()=>$(".head-content.bili-wrapper>div.search:not(.filter-item)"),e=>{const n=$(document.querySelector(".nav-con.fr"));e.detach().insertAfter(n)});if(e.preserveRank){SpinQuery.select(()=>document.querySelector(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.classList.add("preserve-rank");if(!e.querySelector("a.icons-enabled")){e.insertAdjacentHTML("afterbegin",`\n<a title="排行榜"\nclass="icons-enabled"\nhref="https://www.bilibili.com/ranking"\ntarget="_blank">\n<i class="icon-rank"></i>\n</a>\n`)}})}else{SpinQuery.select(()=>document.querySelector(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.classList.remove("preserve-rank");const n=e.querySelector("a.icons-enabled");n&&n.remove()})}SpinQuery.any(()=>$("#banner_link"),()=>n.removeStyle("tweetsStyle"));if(!e.showBanner){n.applyStyle("noBannerStyle")}else{n.removeStyle("noBannerStyle")}}})();
|
||||
2
min/player-shadow.min.js
vendored
2
min/player-shadow.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,o)=>{const r=`<style id="player-shadow-style">\n #bilibiliPlayer,\n #bofqi.mini-player::before\n {\n box-shadow: 0px 2px 8px 0px var(--theme-color-30) !important;\n }\n body.dark #bilibiliPlayer,\n body.dark #bofqi.mini-player::before\n {\n box-shadow: 0px 2px 8px 0px var(--theme-color-20) !important;\n }\n</style>`;o.applyStyleFromText(r);return{reload:()=>o.applyStyleFromText(r),unload:()=>document.getElementById("player-shadow-style").remove()}}})();
|
||||
(()=>{return(e,o)=>{const r=`<style id="player-shadow-style">\n#bilibiliPlayer,\n#bofqi.mini-player::before\n{\nbox-shadow: 0px 2px 8px 0px var(--theme-color-30) !important;\n}\nbody.dark #bilibiliPlayer,\nbody.dark #bofqi.mini-player::before\n{\nbox-shadow: 0px 2px 8px 0px var(--theme-color-20) !important;\n}\n</style>`;o.applyStyleFromText(r);return{reload:()=>o.applyStyleFromText(r),unload:()=>document.getElementById("player-shadow-style").remove()}}})();
|
||||
2
min/remove-promotions.min.js
vendored
2
min/remove-promotions.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{SpinQuery.any(()=>dqa(".gg-pic"),t=>{t.forEach(t=>{const n=t.parentElement;n.style.display="none";const l=[...n.parentElement.childNodes].indexOf(n)+1;const i=n.parentElement.parentElement.querySelector(`.pic li:nth-child(${l})`);if(i){i.style.display="flex";const t=i.querySelector("a:not(.more-text)");t.insertAdjacentHTML("afterend",`\n <div class="blocked-ads">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n `);t.style.visibility="hidden";i.querySelector("a.more-text").style.display="none";i.querySelector("img").style.display="none"}})})}})();
|
||||
(()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://www.bilibili.com/"){SpinQuery.any(()=>dqa(".gg-pic"),t=>{t.forEach(t=>{const n=t.parentElement;n.style.display="none";const l=[...n.parentElement.childNodes].indexOf(n)+1;const i=n.parentElement.parentElement.querySelector(`.pic li:nth-child(${l})`);if(i){i.style.display="flex";const t=i.querySelector("a:not(.more-text)");t.insertAdjacentHTML("afterend",`\n<div class="blocked-ads">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`);t.style.visibility="hidden";i.querySelector("a.more-text").style.display="none";i.querySelector("img").style.display="none"}})})}SpinQuery.select(".gg-carousel.home-slide").then(e=>{if(!e){return}[...e.querySelectorAll(".gg-icon")].map(e=>e.parentElement.parentElement.parentElement).forEach(e=>e.style.display="none")})}})();
|
||||
2
min/remove-watermark.min.js
vendored
2
min/remove-watermark.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{const t="remove-live-watermark";const l=()=>{if(document.getElementById(t)===null){n.applyStyleFromText(`\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n `,t)}};l();return{reload:l,unload:()=>{const e=document.getElementById(t);e&&e.remove()}}}})();
|
||||
(()=>{return(e,n)=>{const t="remove-live-watermark";const l=()=>{if(document.getElementById(t)===null){n.applyStyleFromText(`\n.bilibili-live-player-video-logo\n{\ndisplay: none !important;\n}\n`,t)}};l();return{reload:l,unload:()=>{const e=document.getElementById(t);e&&e.remove()}}}})();
|
||||
2
min/screenshot.min.js
vendored
2
min/screenshot.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/seeds-to-coins.min.js
vendored
2
min/seeds-to-coins.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(s,e)=>{const t=`https://api.live.bilibili.com/pay/v1/Exchange/silver2coin`;return{widget:{content:`\n <button\n class="gui-settings-flat-button"\n id="seeds-to-coins">\n <i class="mdi mdi-24px mdi-seed-outline"></i>\n <span>瓜子换硬币</span>\n </button>`,success:()=>{const s=async()=>{const s=await Ajax.getJsonWithCredentials(t);if(s.code!==0){Toast.info(s.message,"瓜子换硬币",3e3)}else{Toast.success(`${s.message}\n剩余银瓜子:${s.data.silver}`,"瓜子换硬币",3e3)}};const e=dq("#seeds-to-coins");e.addEventListener("click",async()=>{try{e.disabled=true;await s()}finally{e.disabled=false}})}}}}})();
|
||||
(()=>{return(s,e)=>{const t=`https://api.live.bilibili.com/pay/v1/Exchange/silver2coin`;return{widget:{content:`\n<button\nclass="gui-settings-flat-button"\nid="seeds-to-coins">\n<i class="mdi mdi-24px mdi-seed-outline"></i>\n<span>瓜子换硬币</span>\n</button>`,success:()=>{const s=async()=>{const s=await Ajax.getJsonWithCredentials(t);if(s.code!==0){Toast.info(s.message,"瓜子换硬币",3e3)}else{Toast.success(`${s.message}\n剩余银瓜子:${s.data.silver}`,"瓜子换硬币",3e3)}};const e=dq("#seeds-to-coins");e.addEventListener("click",async()=>{try{e.disabled=true;await s()}finally{e.disabled=false}})}}}}})();
|
||||
1
min/selectable-column-text.min.js
vendored
Normal file
1
min/selectable-column-text.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(e,t)=>{const n=`.article-holder { user-select: text !important }`;const r="selectable-column-text-style";const l=()=>{t.applyStyleFromText(n,r);SpinQuery.unsafeJquery().then(async()=>{if(!unsafeWindow.$){return}await SpinQuery.select(".article-holder");unsafeWindow.$(".article-holder").unbind("copy")})};l();return{reload:l,unload:()=>{document.getElementById(r).remove()}}}})();
|
||||
2
min/settings-side-bar.min.js
vendored
2
min/settings-side-bar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{if(document.querySelector(".gui-settings-icon-panel")===null){document.body.insertAdjacentHTML("beforeend",`\n <div class='gui-settings-icon-panel icons-enabled'>\n <div class='gui-settings-widgets' title='附加功能'>\n <i class="icon-widgets"></i>\n </div>\n <div class='gui-settings' title='设置'>\n <i class="icon-settings"></i>\n </div>\n </div>`);dq(".gui-settings").addEventListener("click",e=>{if(e.shiftKey===false){dqa(".gui-settings-box,.gui-settings-mask").forEach(e=>e.classList.add("opened"))}else{dqa(".bilibili-evolved-about,.gui-settings-mask").forEach(e=>e.classList.add("opened"));raiseEvent(dq(".bilibili-evolved-about"),"be:about-load-community")}});dq(".gui-settings-widgets").addEventListener("click",e=>{if(e.shiftKey===false){dqa(".gui-settings-widgets-box,.gui-settings-mask").forEach(e=>e.classList.add("opened"))}else{debugger}});const e=dq(".gui-settings-icon-panel .gui-settings-widgets>i");const t=dq(".gui-settings-icon-panel .gui-settings>i");let i=false;let s=false;const n=()=>{t.classList.remove("icon-info");t.classList.add("icon-settings");t.parentElement.title="设置";e.classList.remove("icon-time");e.classList.add("icon-widgets");e.parentElement.title="附加功能";i=false;s=false};const d=()=>{t.classList.remove("icon-settings");t.classList.add("icon-info");t.parentElement.title="关于";e.classList.remove("icon-widgets");e.classList.add("icon-time");e.parentElement.title="「ザ・ワールド」";if(!i){document.body.addEventListener("keyup",n,{once:true});i=true}if(!s){window.addEventListener("blur",n,{once:true});s=true}};document.body.addEventListener("keydown",e=>{if(document.activeElement&&["input","textarea"].includes(document.activeElement.nodeName.toLowerCase())){return}if(e.shiftKey===true){d()}})}const i=(t=e.sideBarOffset)=>{document.body.style.setProperty("--side-bar-offset",t+"%")};addSettingsListener("sideBarOffset",i);i()}})();
|
||||
(()=>{return(e,t)=>{if(document.querySelector(".gui-settings-icon-panel")===null){document.body.insertAdjacentHTML("beforeend",`\n<div class='gui-settings-icon-panel icons-enabled'>\n<div class='gui-settings-widgets' title='附加功能'>\n<i class="icon-widgets"></i>\n</div>\n<div class='gui-settings' title='设置'>\n<i class="icon-settings"></i>\n</div>\n</div>`);dq(".gui-settings").addEventListener("click",e=>{if(e.shiftKey===false){dqa(".gui-settings-box,.gui-settings-mask").forEach(e=>e.classList.add("opened"))}else{dqa(".bilibili-evolved-about,.gui-settings-mask").forEach(e=>e.classList.add("opened"));raiseEvent(dq(".bilibili-evolved-about"),"be:about-load-community")}});dq(".gui-settings-widgets").addEventListener("click",e=>{if(e.shiftKey===false){dqa(".gui-settings-widgets-box,.gui-settings-mask").forEach(e=>e.classList.add("opened"))}else{debugger}});const e=dq(".gui-settings-icon-panel .gui-settings-widgets>i");const t=dq(".gui-settings-icon-panel .gui-settings>i");let i=false;let s=false;const n=()=>{t.classList.remove("icon-info");t.classList.add("icon-settings");t.parentElement.title="设置";e.classList.remove("icon-time");e.classList.add("icon-widgets");e.parentElement.title="附加功能";i=false;s=false};const d=()=>{t.classList.remove("icon-settings");t.classList.add("icon-info");t.parentElement.title="关于";e.classList.remove("icon-widgets");e.classList.add("icon-time");e.parentElement.title="「ザ・ワールド」";if(!i){document.body.addEventListener("keyup",n,{once:true});i=true}if(!s){window.addEventListener("blur",n,{once:true});s=true}};document.body.addEventListener("keydown",e=>{if(document.activeElement&&["input","textarea"].includes(document.activeElement.nodeName.toLowerCase())){return}if(e.shiftKey===true){d()}})}const i=(t=e.sideBarOffset)=>{document.body.style.setProperty("--side-bar-offset",t+"%")};addSettingsListener("sideBarOffset",i);i()}})();
|
||||
2
min/settings-tooltip.en-US.min.js
vendored
2
min/settings-tooltip.en-US.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/settings-tooltip.ja-JP.min.js
vendored
2
min/settings-tooltip.ja-JP.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/settings-tooltip.zh-CN.min.js
vendored
2
min/settings-tooltip.zh-CN.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/show-dead-video-title.min.js
vendored
2
min/show-dead-video-title.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{(async()=>{if(!document.URL.startsWith("https://space.bilibili.com")){return}class t{}class i extends t{convertToDeadVideoInfo(e,t){return{aid:e,title:t.title,cover:t.pic}}async queryInfo(e){const t=[];if(e.length<=i.MaxCountPerRequest){const s=await Ajax.getJson(`${i.BiliplusHost}/api/aidinfo?aid=${e.join(",")}`);if(s.code===0){t.push(...e.map(e=>{if(e in s.data){return this.convertToDeadVideoInfo(e,s.data[e])}else{return{aid:e,title:"已失效视频",cover:""}}}))}else{console.error(`[显示失效视频信息] Biliplus API 未成功. message=${s.message}`)}}else{t.push(...await this.queryInfo(e.slice(0,i.MaxCountPerRequest)));t.push(...await this.queryInfo(e.slice(i.MaxCountPerRequest)))}return t}}i.BiliplusHost=`https://hd.biliplus.com`;i.MaxCountPerRequest=30;class s extends t{async toggleWatchlater(e,t){for(const i of t){await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v2/history/toview/${e?"add":"del"}`,`aid=${i}&csrf=${s.csrf}`)}}async queryInfo(e){const t=[];await this.toggleWatchlater(true,e);const i=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(i.code===0){const s=i.data.list.map(e=>{return{aid:e.aid.toString(),title:e.title,cover:e.pic}});t.push(...e.map(e=>s.find(t=>t.aid===e)).filter(e=>e!==undefined));await this.toggleWatchlater(false,e)}else{console.error(`[显示失效视频信息] 稍后再看 API 未成功. message=${i.message}`)}return t}}s.csrf=document.cookie.replace(/(?:(?:^|.*;\s*)bili_jct\s*\=\s*([^;]*).*$)|^.*$/,"$1");const a=await SpinQuery.select("#app>.s-space");if(!a){return}Observer.childListSubtree(a,async()=>{const t=dqa(".disabled[data-aid]");if(t.length===0){return}const a=t.map(e=>e.getAttribute("data-aid"));const o=e.deadVideoTitleProvider==="BiliPlus"?new i:new s;const r=await o.queryInfo(a);console.log(`[显示失效视频信息]`,`deadVideos:`,t,`infos:`,r);t.forEach((t,i)=>{t.classList.remove("disabled");const s=t.getAttribute("data-aid");const a=(()=>{if(e.useBiliplusRedirect){return`https://hd.biliplus.com/video/av${s}`}else{return`//www.bilibili.com/video/av${s}`}})();const o=r.find(e=>e.aid===s);console.log(`[显示失效视频信息]`,"#"+i,o);if(o===undefined){console.error(`[显示失效视频信息]信息获取失败, aid=${s}`);return}const n=t.querySelector("a.cover");n.target="_blank";n.href=a;if(o.cover!==""){n.querySelector("img").src=o.cover.replace("http:","https:")}const l=t.querySelector("a.title");l.target="_blank";l.title=o.title;l.href=a;l.innerText=o.title})})})()}})();
|
||||
(()=>{return(e,t)=>{(async()=>{if(!document.URL.startsWith("https://space.bilibili.com")){return}class t{}class i extends t{convertToDeadVideoInfo(e,t){return{aid:e,title:t.title,cover:t.pic}}async queryInfo(e){const t=[];if(e.length<=i.MaxCountPerRequest){const s=await Ajax.getJson(`${i.BiliplusHost}/api/aidinfo?aid=${e.join(",")}`);if(s.code===0){t.push(...e.map(e=>{if(e in s.data){return this.convertToDeadVideoInfo(e,s.data[e])}else{return{aid:e,title:"已失效视频",cover:""}}}))}else{console.error(`[显示失效视频信息] Biliplus API 未成功. message=${s.message}`)}}else{t.push(...await this.queryInfo(e.slice(0,i.MaxCountPerRequest)));t.push(...await this.queryInfo(e.slice(i.MaxCountPerRequest)))}return t}}i.BiliplusHost=`https://hd.biliplus.com`;i.MaxCountPerRequest=30;class s extends t{async toggleWatchlater(e,t){for(const i of t){await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v2/history/toview/${e?"add":"del"}`,`aid=${i}&csrf=${getCsrf()}}`)}}async queryInfo(e){const t=[];await this.toggleWatchlater(true,e);const i=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(i.code===0){const s=i.data.list.map(e=>{return{aid:e.aid.toString(),title:e.title,cover:e.pic}});t.push(...e.map(e=>s.find(t=>t.aid===e)).filter(e=>e!==undefined));await this.toggleWatchlater(false,e)}else{console.error(`[显示失效视频信息] 稍后再看 API 未成功. message=${i.message}`)}return t}}const a=await SpinQuery.select("#app>.s-space");if(!a){return}Observer.childListSubtree(a,async()=>{const t=dqa(".disabled[data-aid]");if(t.length===0){return}const a=t.map(e=>e.getAttribute("data-aid"));const o=e.deadVideoTitleProvider==="BiliPlus"?new i:new s;const r=await o.queryInfo(a);console.log(`[显示失效视频信息]`,`deadVideos:`,t,`infos:`,r);t.forEach((t,i)=>{t.classList.remove("disabled");const s=t.getAttribute("data-aid");const a=(()=>{if(e.useBiliplusRedirect){return`https://hd.biliplus.com/video/av${s}`}else{return`//www.bilibili.com/video/av${s}`}})();const o=r.find(e=>e.aid===s);console.log(`[显示失效视频信息]`,"#"+i,o);if(o===undefined){console.error(`[显示失效视频信息]信息获取失败, aid=${s}`);return}const n=t.querySelector("a.cover");n.target="_blank";n.href=a;if(o.cover!==""){n.querySelector("img").src=o.cover.replace("http:","https:")}const l=t.querySelector("a.title");l.target="_blank";l.title=o.title;l.href=a;l.innerText=o.title})})})()}})();
|
||||
2
min/simplify-home.min.css
vendored
2
min/simplify-home.min.css
vendored
@ -1 +1 @@
|
||||
.international-footer,.international-header .b-wrap,.international-home>:not(.international-header){display:none!important}
|
||||
#app>.bili-wrapper,#app>.elevator-module,.bili-header-m .head-banner .head-content .head-logo,.international-footer,.international-header .b-wrap,.international-home>:not(.international-header){display:none!important}
|
||||
2
min/simplify-home.min.js
vendored
2
min/simplify-home.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,i)=>{(async()=>{if(document.URL.replace(window.location.search,"")!=="https://www.bilibili.com/"){return}const o=await i.importAsync("simplify-home.vue");document.body.insertAdjacentHTML("beforeend",`\n <simplify-home :home-style="homeStyle"></simplify-home>\n `);const t=new Vue({el:"simplify-home",components:{"simplify-home":o},data:{homeStyle:e.simplifyHomeStyle}});addSettingsListener("simplifyHomeStyle",e=>t.homeStyle=e,false)})()}})();
|
||||
(()=>{return(e,i)=>{(async()=>{if(document.URL.replace(window.location.search,"")!=="https://www.bilibili.com/"){i.removeStyle("simplifyHomeStyle");return}document.body.insertAdjacentHTML("beforeend",`\n<simplify-home :home-style="homeStyle"></simplify-home>\n`);const m=new Vue({el:"simplify-home",components:{SimplifyHome:()=>i.importAsync("simplify-home.vue")},data:{homeStyle:e.simplifyHomeStyle}});addSettingsListener("simplifyHomeStyle",e=>m.homeStyle=e,false)})()}})();
|
||||
2
min/simplify-home.vue.min.js
vendored
2
min/simplify-home.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,m)=>{const i=`<div class=simplify-home><component class=simplify-home-component :is=activeComponent></component></div>`;m.applyStyleFromText(`.simplify-home{margin-top:32px;display:flex;align-items:center;justify-content:center}.simplify-home .simplify-home-component{max-width:100%}`,"simplify-home-style");return{export:Object.assign({template:i},{components:{"minimal-home":()=>m.importAsync("minimal-home.vue"),"simple-home":()=>m.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}}})();
|
||||
(()=>{return(e,m)=>{const o=`<div class=simplify-home><component class=simplify-home-component :is=activeComponent></component></div>`;m.applyStyleFromText(`.simplify-home{margin-top:32px;display:flex;align-items:center;justify-content:center}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:o},{components:{"minimal-home":()=>m.importAsync("minimal-home.vue"),"simple-home":()=>m.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}}})();
|
||||
2
min/simplify-liveroom.min.css
vendored
2
min/simplify-liveroom.min.css
vendored
@ -1 +1 @@
|
||||
.simplify-fansMedal .fans-medal-item-ctnr,.simplify-giftMessage .chat-item.gift-item,.simplify-guard i.guard-icon,.simplify-guardPurchase .chat-item.guard-buy,.simplify-popup .chat-popups-section,.simplify-popup .link-popup-ctnr,.simplify-systemMessage .announcement-wrapper,.simplify-systemMessage .system-msg,.simplify-title .title-label,.simplify-userLevel .user-level-icon,.simplify-vip .vip-icon,.simplify-welcomeMessage .welcome-guard,.simplify-welcomeMessage .welcome-msg{display:none!important}.simplify-skin #gift-control-vm,.simplify-skin #head-info-vm,.simplify-skin #rank-list-ctnr-box{background-image:none!important}.simplify-guard .guard-danmaku::before{border-image:none!important;background-color:transparent!important}.simplify-guard .guard-danmaku{margin:0!important;padding:4px 5px!important}.simplify-guard .guard-danmaku::after{background-image:none!important}.simplify-liveroom-settings>ul>li{padding:8px 12px;display:flex;align-items:center}.simplify-liveroom-settings>ul>li:hover{background:rgba(0,0,0,.16)}.round-corner .simplify-liveroom-settings>ul>li{border-radius:var(--corner-radius)}
|
||||
.simplify-eventsBanner .activity-pushing-out,.simplify-fansMedal .fans-medal-item-ctnr,.simplify-giftMessage .chat-item.gift-item,.simplify-giftPanel .gift-control-panel .wish-icon,.simplify-giftPanel .gift-control-panel .wish-tip,.simplify-giftPanel .gift-panel,.simplify-giftPanel .gift-panel-switch,.simplify-giftPanel .gift-section.guard-ent,.simplify-giftPanel .seeds-wrap>.dp-i-block>.item:not(.seeds),.simplify-guard i.guard-icon,.simplify-guardPurchase .chat-item.guard-buy,.simplify-popup .chat-popups-section,.simplify-popup .link-popup-ctnr,.simplify-systemMessage .announcement-wrapper,.simplify-systemMessage .system-msg,.simplify-title .title-label,.simplify-userLevel .user-level-icon,.simplify-vip .vip-icon,.simplify-welcomeMessage .welcome-guard,.simplify-welcomeMessage .welcome-msg{display:none!important}.simplify-giftPanel .gift-control-panel,.simplify-giftPanel .gift-control-section{height:48px!important}.simplify-giftPanel .treasure-box{display:flex!important;align-items:center!important;padding:10px 0 0 16px!important}.simplify-giftPanel .treasure-box .box-icon{width:24px!important;height:24px!important;background-position:0 -2.5px!important}.simplify-giftPanel .treasure-box .box-icon.open{background-position:0 -1px!important}.simplify-giftPanel .treasure-box .count-down{margin-left:12px!important;padding:4px 8px!important;max-width:unset!important}.simplify-giftPanel .treasure-box .awarding-panel{bottom:42px!important}.simplify-giftPanel .gift-control-panel .right-part{height:48px!important;display:flex!important;justify-content:flex-end!important}.simplify-giftPanel .gift-control-panel .right-part>.dp-table-cell{display:flex!important;align-items:center!important}.simplify-giftPanel .gift-control-panel .right-part>.dp-table-cell .supporting-info{transform:translateY(-2px)!important}.simplify-skin #gift-control-vm,.simplify-skin #head-info-vm,.simplify-skin #rank-list-ctnr-box{background-image:none!important}.simplify-guard .guard-danmaku::before{border-image:none!important;background-color:transparent!important}.simplify-guard .guard-danmaku::before .guard-danmaku{margin:0!important;padding:4px 5px!important}.simplify-guard .guard-danmaku::before .guard-danmaku::after{background-image:none!important}.simplify-liveroom-settings>ul>li{padding:8px 12px;display:flex;align-items:center}.simplify-liveroom-settings>ul>li:hover{background:rgba(0,0,0,.16)}.round-corner .simplify-liveroom-settings>ul>li{border-radius:var(--corner-radius)}
|
||||
2
min/simplify-liveroom.min.js
vendored
2
min/simplify-liveroom.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,i)=>{const s={vip:"老爷图标",fansMedal:"粉丝勋章",title:"活动头衔",userLevel:"用户等级",guard:"舰长图标",systemMessage:"全区广播",welcomeMessage:"欢迎信息",giftMessage:"礼物弹幕",guardPurchase:"上舰提示",popup:"抽奖提示",skin:"房间皮肤"};let t=e.simplifyLiveroomSettings.skin;const n=["#head-info-vm","#gift-control-vm","#rank-list-vm","#rank-list-ctnr-box",".gift-panel.base-panel",".gift-panel.extend-panel",".seeds-wrap>div:first-child",".gift-section>div:last-child",".z-gift-package>div>div",".right-action"];const c="live-skin-coloration-area";n.forEach(e=>{SpinQuery.select(e,i=>{Observer.attributes(e,e=>{e.forEach(e=>{if(e.attributeName==="class"){if(t&&i.classList.contains(c)){i.classList.remove(c)}else if(!t&&!i.classList.contains(c)){i.classList.add(c)}}})})})});const o=(e,i)=>{document.body.classList[e?"add":"remove"](`simplify-${i}`);if(i==="skin"){t=e;n.forEach(i=>{SpinQuery.select(i,i=>i.classList[e?"remove":"add"]("live-skin-coloration-area"))})}};const a=()=>document.URL.startsWith(`https://live.bilibili.com/`);if(a()){Object.keys(s).forEach(i=>{const s=e.simplifyLiveroomSettings[i];o(s,i)})}return{widget:{condition:a,content:`\n <div class="gui-settings-flat-button" style="position: relative" id="simplify-liveroom">\n <i class="mdi mdi-24px mdi-settings"></i>\n <span>简化直播间</span>\n <div class="simplify-liveroom-settings popup">\n <ul>\n <li v-for="item in items" v-on:click="itemClick(item)">\n <i class="mdi mdi-18px" v-bind:class="{'mdi-eye': !item.checked, 'mdi-eye-off': item.checked}"></i>\n {{item.name}}\n </li>\n </ul>\n </div>\n </div>\n `,success:()=>{const i=document.querySelector("#simplify-liveroom");const t=document.querySelector(".gui-settings-mask");i.addEventListener("click",e=>{const i=document.querySelector(".simplify-liveroom-settings");if(i.contains(e.target)||e.target===i){return}i.classList.toggle("opened")});i.addEventListener("mouseenter",()=>t.classList.add("transparent"));i.addEventListener("mouseleave",()=>t.classList.remove("transparent"));new Vue({el:".simplify-liveroom-settings",data:{items:Object.entries(s).map(([i,s])=>{const t=e.simplifyLiveroomSettings[i];o(t,i);return{key:i,name:s,checked:t}})},methods:{itemClick(i){i.checked=!i.checked;o(i.checked,i.key);e.simplifyLiveroomSettings=Object.assign(e.simplifyLiveroomSettings,{[i.key]:i.checked})}}})}}}}})();
|
||||
(()=>{return(e,i)=>{const s={vip:"老爷图标",fansMedal:"粉丝勋章",title:"活动头衔",userLevel:"用户等级",guard:"舰长图标",systemMessage:"全区广播",welcomeMessage:"欢迎信息",giftMessage:"礼物弹幕",guardPurchase:"上舰提示",giftPanel:"付费礼物",eventsBanner:"活动横幅",popup:"抽奖提示",skin:"房间皮肤"};class t{constructor(i,s){this.skinDisabled=e.simplifyLiveroomSettings.skin;this.skinSelectors=i;this.skinClass=s;i.forEach(e=>{SpinQuery.select(e,i=>{Observer.attributes(e,e=>{e.forEach(e=>{if(e.attributeName==="class"){if(this.skinDisabled&&i.classList.contains(s)){i.classList.remove(s)}else if(!this.skinDisabled&&!i.classList.contains(s)){i.classList.add(s)}}})})})})}setSkin(e){this.skinDisabled=!e;this.skinSelectors.forEach(i=>{SpinQuery.select(i,i=>i.classList[e?"add":"remove"](this.skinClass))})}}const n=[new t(["#head-info-vm","#gift-control-vm","#rank-list-vm","#rank-list-ctnr-box",".gift-panel.base-panel",".gift-panel.extend-panel",".seeds-wrap>div:first-child",".gift-section>div:last-child",".z-gift-package>div>div",".right-action"],"live-skin-coloration-area"),new t([".rank-list-ctnr .tabs"],"isHundred"),new t([".rank-list-ctnr .tab-content > div"],"hundred")];const a=(e,i)=>{document.body.classList[e?"add":"remove"](`simplify-${i}`);if(i==="skin"){n.forEach(i=>i.setSkin(!e))}};const c=()=>document.URL.startsWith(`https://live.bilibili.com/`);if(c()){Object.keys(s).forEach(i=>{const s=e.simplifyLiveroomSettings[i];a(s,i)})}return{widget:{condition:c,content:`\n<div class="gui-settings-flat-button" style="position: relative" id="simplify-liveroom">\n<i class="mdi mdi-24px mdi-settings"></i>\n<span>简化直播间</span>\n<div class="simplify-liveroom-settings popup">\n<ul>\n<li v-for="item in items" v-on:click="itemClick(item)">\n<i class="mdi mdi-18px" v-bind:class="{'mdi-eye': !item.checked, 'mdi-eye-off': item.checked}"></i>\n{{item.name}}\n</li>\n</ul>\n</div>\n</div>\n`,success:()=>{const i=document.querySelector("#simplify-liveroom");const t=document.querySelector(".gui-settings-mask");i.addEventListener("click",e=>{const i=document.querySelector(".simplify-liveroom-settings");if(i.contains(e.target)||e.target===i){return}i.classList.toggle("opened")});i.addEventListener("mouseenter",()=>t.classList.add("transparent"));i.addEventListener("mouseleave",()=>t.classList.remove("transparent"));new Vue({el:".simplify-liveroom-settings",data:{items:Object.entries(s).map(([i,s])=>{const t=e.simplifyLiveroomSettings[i];a(t,i);return{key:i,name:s,checked:t}})},methods:{itemClick(i){i.checked=!i.checked;a(i.checked,i.key);e.simplifyLiveroomSettings=Object.assign(e.simplifyLiveroomSettings,{[i.key]:i.checked})}}})}}}}})();
|
||||
1
min/superchat-translate.min.css
vendored
Normal file
1
min/superchat-translate.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.chat-history-panel .chat-item.superChat-card-detail .input-contain .text{display:block!important}
|
||||
1
min/superchat-translate.min.js
vendored
Normal file
1
min/superchat-translate.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(t,n)=>{(async()=>{if(!document.URL.startsWith("https://live.bilibili.com/")){return}const t=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!t){return}const e=t[1];const a=await SpinQuery.select(".chat-history-list");if(a===null){console.warn("chatList not found");return}n.applyStyle("superchatTranslateStyle");const s=async()=>{const t=await Ajax.getJson(`https://api.live.bilibili.com/av/v1/SuperChat/getMessageList?room_id=${e}&jpn=1`);if(t.code!==0){console.warn(`getMessageList api failed with ${t.code}`);return[]}return _.get(t,"data.list",[])};const i=async t=>{const n=await Ajax.getJson(`https://api.live.bilibili.com/av/v1/SuperChat/messageInfo?id=${t}`);if(n.code!==0){console.warn(`messageInfo api failed with ${n.code}`);return""}return _.get(n,"data.message_jpn","")};Observer.childListSubtree(".pay-note-panel",async()=>{console.log(".pay-note-panel");const t=dq(".detail-info .input-contain .text:not(.original):not(.jpn)");if(!t){return}const n=await s();const e=n.find(n=>n.message===t.innerText);if(!e){console.warn("message not found");return}const a=e.message_jpn||await i(e.id);t.classList.add("original");const o=document.createElement("span");o.classList.add("text","jpn");o.style.opacity=".5";o.innerText=a;t.insertAdjacentElement("afterend",o);console.log(`inserted translation: `,{original:e.message,translation:a})});Observer.childList(a,t=>{console.log("chat-list");t.forEach(t=>{t.addedNodes.forEach(async t=>{if(t instanceof HTMLElement&&t.classList.contains("superChat-card-detail")){const n=t.getAttribute("data-danmaku");if(!n){console.warn("original not found");return}const e=await s();const a=e.find(t=>t.message===n);if(!a){console.warn("message not found");return}const o=a.message_jpn||await i(a.id);const r=await SpinQuery.select(`.superChat-card-detail[data-danmaku='${n}'] .input-contain .text:not(.original):not(.jpn)`);if(!r){console.warn("textElement not found");return}r.classList.add("original");const c=document.createElement("span");c.classList.add("text","jpn");c.style.opacity=".5";c.innerText=o;r.insertAdjacentElement("afterend",c);console.log(`inserted translation: `,{original:a.message,translation:o})}})})})})()}})();
|
||||
2
min/title.min.js
vendored
2
min/title.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{function i(e=true){const t=document.title.replace("_番剧_bilibili_哔哩哔哩","").replace("_电影_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(" - 哔哩哔哩直播,二次元弹幕直播平台","").replace(/[\/\\:\*\?"<>\|]/g,"").trim();if(!e||document.URL.indexOf("/bangumi")!==-1){return t}else{const e=document.querySelector("#multi_page .cur-list>ul li.on a");if(e===null){return t}else{const i=e.getAttribute("title");return t+" - "+i}}}function l(e,t=true){const i=new Date;const l={title:document.title.replace(t?/:([^:]+?)_番剧_bilibili_哔哩哔哩/:"_番剧_bilibili_哔哩哔哩","").replace(t?/:([^:]+?)_电影_bilibili_哔哩哔哩/:"_电影_bilibili_哔哩哔哩","").replace(t?/:([^:]+?)_纪录片_bilibili_哔哩哔哩/:"_纪录片_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(/(.*?) - (.*?) - 哔哩哔哩直播,二次元弹幕直播平台/,"$1").trim(),ep:(()=>{if(!t){return null}const e=dq("#eplist_module li.cursor .ep-title");if(e!==null){return e.innerText}const i=document.querySelector("#multi_page .cur-list>ul li.on a");if(i!==null){return i.getAttribute("title")}return null})(),aid:unsafeWindow.aid,cid:unsafeWindow.cid,lid:document.URL.replace(/https:\/\/live\.bilibili\.com\/(\d+).*/,"$1"),y:i.getFullYear().toString(),M:(i.getMonth()+1).toString().padStart(2,"0"),d:i.getDate().toString().padStart(2,"0"),h:i.getHours().toString().padStart(2,"0"),m:i.getMinutes().toString().padStart(2,"0"),s:i.getSeconds().toString().padStart(2,"0"),ms:i.getMilliseconds().toString().substr(0,3)};const r=Object.keys(l).reduce((e,t)=>{return e.replace(new RegExp(`\\[([^\\[\\]]*?)${t}([^\\[\\]]*?)\\]`,"g"),l[t]?`$1${l[t]}$2`:"")},e);return r.replace(/[\/\\:\*\?"<>\|]/g,"")}function r(t=true){if(e.filenameFormat===undefined){return i(t)}return l(e.filenameFormat,t)}return{export:{getFriendlyTitle:r,formatTitle:l}}}})();
|
||||
(()=>{return(e,t)=>{function i(e=true){const t=document.title.replace("_番剧_bilibili_哔哩哔哩","").replace("_电影_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(" - 哔哩哔哩直播,二次元弹幕直播平台","").replace(/[\/\\:\*\?"<>\|]/g,"").trim();if(!e||document.URL.indexOf("/bangumi")!==-1){return t}else{const e=document.querySelector("#multi_page .cur-list>ul li.on a");if(e===null){return t}else{const i=e.getAttribute("title");return t+" - "+i}}}function l(e,t=true){const i=new Date;const l={title:document.title.replace(t?/:([^:]+?)_番剧_bilibili_哔哩哔哩/:"_番剧_bilibili_哔哩哔哩","").replace(t?/:([^:]+?)_国创_bilibili_哔哩哔哩/:"_国创_bilibili_哔哩哔哩","").replace(t?/:([^:]+?)_电影_bilibili_哔哩哔哩/:"_电影_bilibili_哔哩哔哩","").replace(t?/:([^:]+?)_纪录片_bilibili_哔哩哔哩/:"_纪录片_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(/(.*?) - (.*?) - 哔哩哔哩直播,二次元弹幕直播平台/,"$1").trim(),ep:(()=>{if(!t){return null}const e=dq("#eplist_module li.cursor .ep-title");if(e!==null){return e.innerText}const i=document.querySelector("#multi_page .cur-list>ul li.on a");if(i!==null){return i.getAttribute("title")}return null})(),aid:unsafeWindow.aid,cid:unsafeWindow.cid,lid:document.URL.replace(/https:\/\/live\.bilibili\.com\/(\d+).*/,"$1"),y:i.getFullYear().toString(),M:(i.getMonth()+1).toString().padStart(2,"0"),d:i.getDate().toString().padStart(2,"0"),h:i.getHours().toString().padStart(2,"0"),m:i.getMinutes().toString().padStart(2,"0"),s:i.getSeconds().toString().padStart(2,"0"),ms:i.getMilliseconds().toString().substr(0,3)};const r=Object.keys(l).reduce((e,t)=>{return e.replace(new RegExp(`\\[([^\\[\\]]*?)${t}([^\\[\\]]*?)\\]`,"g"),l[t]?`$1${l[t]}$2`:"")},e);return r.replace(/[\/\\:\*\?"<>\|]/g,"")}function r(t=true){if(e.filenameFormat===undefined){return i(t)}return l(e.filenameFormat,t)}return{export:{getFriendlyTitle:r,formatTitle:l}}}})();
|
||||
2
min/toast.min.js
vendored
2
min/toast.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,s)=>{var a;(function(t){t["Default"]="default";t["Info"]="info";t["Success"]="success";t["Error"]="error"})(a||(a={}));let e;class r{constructor(t="",s="",e=a.Default){this.creationTime=new Date;this.type=e;this.message=t;this.title=s;this.duration=3e3}show(){r.containerVM.cards.splice(0,0,this);if(this.duration!==undefined){setTimeout(()=>this.dismiss(),this.duration)}}dismiss(){if(r.containerVM.cards.includes(this)){r.containerVM.cards.splice(r.containerVM.cards.indexOf(this),1)}}get element(){return dq(`.toast-card[key='${this.key}']`)}get key(){return this.creationTime.toISOString()}static get containerVM(){if(!e){r.createToastContainer()}return e}static createToastContainer(){if(!document.querySelector(".toast-card-container")){document.body.insertAdjacentHTML("beforeend",`\n <transition-group class="toast-card-container" name="toast-card-container" tag="div">\n <toast-card v-for="card of cards" v-bind:key="card.key" v-bind:card="card"></toast-card>\n </transition-group>`);e=new Vue({el:".toast-card-container",components:{"toast-card":{props:["card"],template:`\n <div class="toast-card icons-enabled visible" v-bind:class="'toast-' + card.type">\n <div class="toast-card-border"></div>\n <div class="toast-card-header">\n <h1 class="toast-card-title">{{card.title}}</h1>\n <div class="toast-card-dismiss" v-on:click="card.dismiss()">\n <svg style="width:22px;height:22px" viewBox="0 0 24 24">\n <path\n d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />\n </svg>\n </div>\n </div>\n <div class="toast-card-message" v-html="card.message"></div>\n </div>\n `}},data:{cards:[]}})}}static internalShow(t,s,a,e){const n=new r(t,s,e);n.duration=a;n.show();return n}static show(t,s,e){return this.internalShow(t,s,e,a.Default)}static info(t,s,e){return this.internalShow(t,s,e,a.Info)}static success(t,s,e){return this.internalShow(t,s,e,a.Success)}static error(t,s,e){return this.internalShow(t,s,e,a.Error)}}s.applyStyle("toastStyle");return{export:r}}})();
|
||||
(()=>{return(t,s)=>{var a;(function(t){t["Default"]="default";t["Info"]="info";t["Success"]="success";t["Error"]="error"})(a||(a={}));let e;class r{constructor(t="",s="",e=a.Default){this.creationTime=new Date;this.type=e;this.message=t;this.title=s;this.duration=3e3}show(){r.containerVM.cards.splice(0,0,this);if(this.duration!==undefined){setTimeout(()=>this.dismiss(),this.duration)}}dismiss(){if(r.containerVM.cards.includes(this)){r.containerVM.cards.splice(r.containerVM.cards.indexOf(this),1)}}get element(){return dq(`.toast-card[key='${this.key}']`)}get key(){return this.creationTime.toISOString()}static get containerVM(){if(!e){r.createToastContainer()}return e}static createToastContainer(){if(!document.querySelector(".toast-card-container")){document.body.insertAdjacentHTML("beforeend",`\n<transition-group class="toast-card-container" name="toast-card-container" tag="div">\n<toast-card v-for="card of cards" v-bind:key="card.key" v-bind:card="card"></toast-card>\n</transition-group>`);e=new Vue({el:".toast-card-container",components:{"toast-card":{props:["card"],template:`\n<div class="toast-card icons-enabled visible" v-bind:class="'toast-' + card.type">\n<div class="toast-card-border"></div>\n<div class="toast-card-header">\n<h1 class="toast-card-title">{{card.title}}</h1>\n<div class="toast-card-dismiss" v-on:click="card.dismiss()">\n<svg style="width:22px;height:22px" viewBox="0 0 24 24">\n<path\nd="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />\n</svg>\n</div>\n</div>\n<div class="toast-card-message" v-html="card.message"></div>\n</div>\n`}},data:{cards:[]}})}}static internalShow(t,s,a,e){const n=new r(t,s,e);n.duration=a;n.show();return n}static show(t,s,e){return this.internalShow(t,s,e,a.Default)}static info(t,s,e){return this.internalShow(t,s,e,a.Info)}static success(t,s,e){return this.internalShow(t,s,e,a.Success)}static error(t,s,e){return this.internalShow(t,s,e,a.Error)}}s.applyStyle("toastStyle");return{export:r}}})();
|
||||
2
min/touch-player.min.js
vendored
2
min/touch-player.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/video-card.vue.min.js
vendored
2
min/video-card.vue.min.js
vendored
File diff suppressed because one or more lines are too long
1
min/video-dash.min.js
vendored
Normal file
1
min/video-dash.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(t,r)=>{const e=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const a=async(t,r,e)=>{const a=`https://api.bilibili.com/pgc/player/web/playurl?avid=${t}&cid=${r}&qn=${e}&otype=json&fourk=1&fnver=0&fnval=16`;const d=await Ajax.getJsonWithCredentials(a);if(d.code!==0||d.result.type!=="DASH"){throw new Error("DASH api failed")}const o=d.result.accept_quality;if(!o.includes(e)){throw new Error("没有找到请求的清晰度")}if(d.result.quality!==e){throw new Error("无法获取请求的清晰度, 请确认当前账号有相应的权限")}const n=d.result.accept_description;const i=n[o.indexOf(e)];const c=d.result.dash.duration;const s=d.result.dash.video.filter(t=>t.id===e).map(t=>{const r={quality:e,qualityText:i,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:t.backupUrl,downloadUrl:t.baseUrl,duration:c};return r});const l=d.result.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:t.backupUrl,downloadUrl:t.baseUrl,duration:c}});return{videoDashes:s,audioDashes:l}};return{export:{getDashInfo:a,dashToFragment:e}}}})();
|
||||
1
min/video-downloader-fragment.min.js
vendored
Normal file
1
min/video-downloader-fragment.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(r,e)=>{}})();
|
||||
1
min/video-list.vue.min.js
vendored
Normal file
1
min/video-list.vue.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(i,t)=>{const a=`<div class=video-list><div class=loading v-if=loading><i class="mdi mdi-18px mdi-loading mdi-spin"></i>加载中...</div><div class=cards :class="{'show-rank': showRank}"v-else-if=cards.length><video-card v-for="card of cards":key=card.id :data=card></video-card></div><div class=empty v-else>空空如也哦 = ̄ω ̄=</div></div>`;t.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"昨日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],loading:true}},methods:{async getRankList(){const i=async i=>{const a=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/web-interface/ranking/index?day=${i}`);const{getWatchlaterList:e}=await t.importAsync("watchlater-api");const o=await e();if(a.code!==0){throw new Error(a.message)}this.cards.push(...a.data.map(t=>{return{id:t.aid+"-"+i,aid:parseInt(t.aid),title:t.title,upID:t.mid,upName:t.author,coverUrl:t.pic.replace("http://","https://"),description:t.description,durationText:t.duration,playCount:formatCount(t.play),coins:formatCount(t.coins),favorites:formatCount(t.favorites),watchlater:o.includes(t.aid)}}))};await Promise.all([1,3,7].map(i))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);const{getWatchlaterList:a}=await t.importAsync("watchlater-api");const e=await a();if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.map(i=>{const t=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:t.aid,title:t.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:t.dynamic,like:formatCount(i.desc.like),duration:t.duration,durationText:formatDuration(t.duration,0),playCount:formatCount(t.stat.view),danmakuCount:formatCount(t.stat.danmaku),watchlater:e.includes(t.aid)}})}},async mounted(){try{if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})();
|
||||
2
min/view-cover.min.js
vendored
2
min/view-cover.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const{VideoInfo:i}=t.import("video-info");const{getFriendlyTitle:n}=t.import("title");class o{constructor(e){this.url=e;if(document.querySelector(".image-viewer")===null){this.createContainer()}this.viewer=document.querySelector(".image-viewer-container");this.downloadImage();addSettingsListener("filenameFormat",()=>{this.viewer.querySelector(".download").setAttribute("download",this.filename)})}createContainer(){document.body.insertAdjacentHTML("beforeend",t.import("imageViewerHtml"));document.querySelector(".image-viewer-container .close").addEventListener("click",()=>this.hide());t.applyStyle("imageViewerStyle")}downloadImage(){document.querySelector("#view-cover").style.display=this.url?"flex":"none";if(this.url===""){return}const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=URL.createObjectURL(e.response);if(this.imageData){URL.revokeObjectURL(this.imageData)}this.imageData=t;const i=this.viewer.querySelector(".download");i.setAttribute("href",t);i.setAttribute("download",this.filename);this.viewer.querySelector(".copy-link").addEventListener("click",()=>GM_setClipboard(this.url));this.viewer.querySelector(".new-tab").setAttribute("href",this.url);this.viewer.querySelector(".image").src=t});e.send()}show(){this.viewer.classList.add("opened")}hide(){this.viewer.classList.remove("opened")}get filename(){return n(document.URL.includes("/www.bilibili.com/bangumi/"))+this.url.substring(this.url.lastIndexOf("."))}}return(()=>{if(!document.URL.includes("live.bilibili.com")){return{widget:{content:`\n <button\n class="gui-settings-flat-button"\n id="view-cover">\n <i class="icon-view"></i>\n <span>查看封面</span>\n </button>`,condition:async()=>{const e=await SpinQuery.select(()=>(unsafeWindow||window).aid);return Boolean(e)},success:async()=>{async function e(){const e=(unsafeWindow||window).aid;const t=new i(e);try{await t.fetchInfo()}catch(e){return""}return t.coverUrl}let t=new o(await e());document.querySelector("#view-cover").addEventListener("click",()=>{t.show()});const n=async()=>{t=new o(await e())};Observer.videoChange(n)}}}}else{return{widget:{content:`\n <button\n class="gui-settings-flat-button"\n id="view-cover">\n <i class="icon-view"></i>\n <span>查看封面</span>\n </button>`,condition:async()=>{const e=await SpinQuery.select(()=>document.querySelector(".header-info-ctnr .room-cover"));return Boolean(e)},success:async()=>{const e=document.querySelector(".header-info-ctnr .room-cover");const t=e.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${e}`;const n=await Ajax.getJson(i);const r=n.data.cover;const s=new o(r);document.querySelector("#view-cover").addEventListener("click",()=>{s.show()})}}}}}})()}})();
|
||||
(()=>{return(e,t)=>{const{VideoInfo:i}=t.import("video-info");const{getFriendlyTitle:n}=t.import("title");class o{constructor(e){this.url=e;if(document.querySelector(".image-viewer")===null){this.createContainer()}this.viewer=document.querySelector(".image-viewer-container");this.downloadImage();addSettingsListener("filenameFormat",()=>{this.viewer.querySelector(".download").setAttribute("download",this.filename)})}createContainer(){document.body.insertAdjacentHTML("beforeend",t.import("imageViewerHtml"));document.querySelector(".image-viewer-container .close").addEventListener("click",()=>this.hide());t.applyStyle("imageViewerStyle")}downloadImage(){document.querySelector("#view-cover").style.display=this.url?"flex":"none";if(this.url===""){return}const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=URL.createObjectURL(e.response);if(this.imageData){URL.revokeObjectURL(this.imageData)}this.imageData=t;const i=this.viewer.querySelector(".download");i.setAttribute("href",t);i.setAttribute("download",this.filename);this.viewer.querySelector(".copy-link").addEventListener("click",()=>GM_setClipboard(this.url));this.viewer.querySelector(".new-tab").setAttribute("href",this.url);this.viewer.querySelector(".image").src=t});e.send()}show(){this.viewer.classList.add("opened")}hide(){this.viewer.classList.remove("opened")}get filename(){return n(document.URL.includes("/www.bilibili.com/bangumi/"))+this.url.substring(this.url.lastIndexOf("."))}}return(()=>{if(!document.URL.includes("live.bilibili.com")){return{widget:{content:`\n<button\nclass="gui-settings-flat-button"\nid="view-cover">\n<i class="icon-view"></i>\n<span>查看封面</span>\n</button>`,condition:async()=>{const e=await SpinQuery.select(()=>(unsafeWindow||window).aid);return Boolean(e)},success:async()=>{async function e(){const e=(unsafeWindow||window).aid;const t=new i(e);try{await t.fetchInfo()}catch(e){return""}return t.coverUrl}let t=new o(await e());document.querySelector("#view-cover").addEventListener("click",()=>{t.show()});const n=async()=>{t=new o(await e())};Observer.videoChange(n)}}}}else{return{widget:{content:`\n<button\nclass="gui-settings-flat-button"\nid="view-cover">\n<i class="icon-view"></i>\n<span>查看封面</span>\n</button>`,condition:async()=>{const e=await SpinQuery.select(()=>document.querySelector(".header-info-ctnr .room-cover"));return Boolean(e)},success:async()=>{const e=document.querySelector(".header-info-ctnr .room-cover");const t=e.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${e}`;const n=await Ajax.getJson(i);const r=n.data.cover;const s=new o(r);document.querySelector("#view-cover").addEventListener("click",()=>{s.show()})}}}}}})()}})();
|
||||
2
min/watchlater-api.min.js
vendored
2
min/watchlater-api.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{const e=async(t,i)=>{const e=i?"https://api.bilibili.com/x/v2/history/toview/add":"https://api.bilibili.com/x/v2/history/toview/del";const s=document.cookie.replace(/(?:(?:^|.*\s*)bili_jct\s*\=\s*([^]*).*$)|^.*$/,"$1");const a=await Ajax.postTextWithCredentials(e,`aid=${t}&csrf=${s}`);const o=JSON.parse(a);if(o.code!==0){throw new Error(`稍后再看操作失败: ${o.message}`)}};const s=async(t=false)=>{const i=`https://api.bilibili.com/x/v2/history/toview/web`;const e=await Ajax.getJsonWithCredentials(i);if(e.code!==0){throw new Error(`获取稍后再看列表失败: ${e.message}`)}if(t===true){return e.data}if(!e.data.list){return[]}return e.data.list.map(t=>t.aid)};return{export:{toggleWatchlater:e,getWatchlaterList:s}}}})();
|
||||
(()=>{return(t,i)=>{const e=async(t,i)=>{const e=i?"https://api.bilibili.com/x/v2/history/toview/add":"https://api.bilibili.com/x/v2/history/toview/del";const a=getCsrf();const s=await Ajax.postTextWithCredentials(e,`aid=${t}&csrf=${a}`);const r=JSON.parse(s);if(r.code!==0){throw new Error(`稍后再看操作失败: ${r.message}`)}};async function a(t){const i=`https://api.bilibili.com/x/v2/history/toview/web`;const e=await Ajax.getJsonWithCredentials(i);if(e.code!==0){throw new Error(`获取稍后再看列表失败: ${e.message}`)}if(!e.data.list){return[]}if(t){return e.data.list}return e.data.list.map(t=>t.aid)}return{export:{toggleWatchlater:e,getWatchlaterList:a}}}})();
|
||||
1
min/watchlater-expire-warnings.min.js
vendored
Normal file
1
min/watchlater-expire-warnings.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(e,n)=>{(async()=>{if(!["//www.bilibili.com/watchlater/#/list"].some(e=>document.URL.includes(e))){return}const{getWatchlaterList:t}=await n.importAsync("watchlater-api");const i=await SpinQuery.select(".watch-later-list .list-box");if(i===null){return}n.applyStyleFromText(`\n.expire-warning {\npadding: 3px 25px;\ncolor: #F78C6C;\ndisplay: inline-flex;\nalign-items: center;\n}\n.expire-warning .mdi {\nline-height: 1;\nmargin-right: 8px;\nfont-size: 16px;\n}\n`,"watchlater-expire-warning-style");const r=e.watchlaterExpireWarningDays;const a=24*3600*1e3;const l=e=>{return(e-Number(new Date))/a};Observer.childListSubtree(i,async()=>{const e=[...i.querySelectorAll(".av-item .state")];const n=await t(true);e.forEach((e,t)=>{const i=n[t].add_at*1e3+60*a;const c=l(i);console.log(n[t].aid,c);if(c<r){if(e.querySelector(".expire-warning")===null){const n=-Math.floor(-c);e.insertAdjacentHTML("afterbegin",`\n<span class="expire-warning" title="到期时间: ${new Date(i).toLocaleString()}"><i class="mdi mdi-alert-circle-outline"></i>还剩${n}天过期</span>`)}}else{e.querySelectorAll(".expire-warning").forEach(e=>e.remove())}})})})()}})();
|
||||
@ -2,8 +2,7 @@
|
||||
"name": "bilibili-evolved",
|
||||
"description": "「 强大的哔哩哔哩增强脚本 」",
|
||||
"main": "bilibili-evolved.user.js",
|
||||
"dependencies": {
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/jquery": "^3.3.31",
|
||||
"@types/lodash": "^4.14.138",
|
||||
@ -33,4 +32,4 @@
|
||||
"url": "https://github.com/the1812/Bilibili-Evolved/issues"
|
||||
},
|
||||
"homepage": "https://github.com/the1812/Bilibili-Evolved#readme"
|
||||
}
|
||||
}
|
||||
85
src/activity/activity-apis.ts
Normal file
85
src/activity/activity-apis.ts
Normal file
@ -0,0 +1,85 @@
|
||||
interface ActivityCard {
|
||||
id: string
|
||||
username: string
|
||||
text: string
|
||||
reposts: number
|
||||
comments: number
|
||||
likes: number
|
||||
}
|
||||
class ActivityCardsManager extends EventTarget {
|
||||
cards: ActivityCard[] = []
|
||||
addCard(node: Node) {
|
||||
if (node instanceof Element && node.classList.contains('card')) {
|
||||
if (node.querySelector('.skeleton') !== null) {
|
||||
const obs = Observer.childList(node, () => {
|
||||
if (node.querySelector('.skeleton') === null) {
|
||||
obs.forEach(it => it.stop())
|
||||
this.addCard(node)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const card = this.parseCard(node)
|
||||
this.cards.push(card)
|
||||
const event = new CustomEvent('addCard', { detail: card })
|
||||
this.dispatchEvent(event)
|
||||
}
|
||||
}
|
||||
}
|
||||
removeCard(node: Node) {
|
||||
if (node instanceof Element && node.classList.contains('card')) {
|
||||
const id = this.parseCard(node).id
|
||||
const index = this.cards.findIndex(c => c.id === id)
|
||||
const card = this.cards[index]
|
||||
this.cards.splice(index, 1)
|
||||
const event = new CustomEvent('removeCard', { detail: card })
|
||||
this.dispatchEvent(event)
|
||||
}
|
||||
}
|
||||
parseCard(element: Element): ActivityCard {
|
||||
const getText = (selector: string) => {
|
||||
if (element.querySelector(selector) === null) {
|
||||
// console.log(element, selector)
|
||||
return ''
|
||||
}
|
||||
return (element.querySelector(selector) as HTMLElement).innerText
|
||||
}
|
||||
const getNumber = (selector: string) => {
|
||||
const result = parseInt(getText(selector))
|
||||
if (isNaN(result)) {
|
||||
return 0
|
||||
}
|
||||
return result
|
||||
}
|
||||
const card = {
|
||||
id: element.getAttribute('data-did') as string,
|
||||
username: getText('.main-content .user-name'),
|
||||
text: getText('.card-content .text.description'),
|
||||
reposts: getNumber('.button-bar .single-button:nth-child(1) .text-offset'),
|
||||
comments: getNumber('.button-bar .single-button:nth-child(2) .text-offset'),
|
||||
likes: getNumber('.button-bar .single-button:nth-child(3) .text-offset'),
|
||||
}
|
||||
return card
|
||||
}
|
||||
async startWatching() {
|
||||
const cardsList = await SpinQuery.select('.card-list .content') as HTMLDivElement
|
||||
if (!cardsList) {
|
||||
return false
|
||||
}
|
||||
const cards = [...cardsList.querySelectorAll('.content>.card')]
|
||||
cards.forEach(it => this.addCard(it))
|
||||
Observer.childList(cardsList, records => {
|
||||
records.forEach(record => {
|
||||
record.addedNodes.forEach(node => this.addCard(node))
|
||||
record.removedNodes.forEach(node => this.removeCard(node))
|
||||
})
|
||||
})
|
||||
return true
|
||||
}
|
||||
}
|
||||
export const activityCardsManager = new ActivityCardsManager()
|
||||
|
||||
export default {
|
||||
export: {
|
||||
activityCardsManager
|
||||
},
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user