mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
commit
a51a114e2d
12
@types/global/index.d.ts
vendored
12
@types/global/index.d.ts
vendored
@ -37,6 +37,7 @@ declare global {
|
||||
type DanmakuOption = '无' | 'XML' | 'ASS'
|
||||
type DashCodec = 'AVC/H.264' | 'HEVC/H.265'
|
||||
type Pattern = string
|
||||
type Dropdown = { key: string; items: string[] }
|
||||
interface RpcOption {
|
||||
secretKey: string
|
||||
baseDir: string
|
||||
@ -164,6 +165,7 @@ declare global {
|
||||
interface Window {
|
||||
aid: string | undefined
|
||||
cid: string | undefined
|
||||
bvid: string | undefined
|
||||
pageno: string | number | undefined
|
||||
$: JQueryStatic
|
||||
[key: string]: any
|
||||
@ -202,14 +204,14 @@ declare global {
|
||||
dependencies: Array<Resource>
|
||||
styles: Array<Resource>
|
||||
displayName: string
|
||||
dropdown: object
|
||||
dropdown: Dropdown | Dropdown[]
|
||||
downloaded: boolean
|
||||
constructor(url: string, styles?: Resource[])
|
||||
download(): Promise<string>
|
||||
getStyle(id: string): string
|
||||
getPriorStyle(): any
|
||||
applyStyle(id: string, important: boolean): void
|
||||
static all: object
|
||||
static all: { [key: string]: Resource }
|
||||
static displayNames: object
|
||||
static manifest: object
|
||||
static root: string
|
||||
@ -436,8 +438,12 @@ declare global {
|
||||
feedsTranslateProvider: 'Bing' | 'Google' | 'Baidu' | 'GoogleCN',
|
||||
feedsTranslateLanguage: string,
|
||||
downloadLiveRecords: boolean
|
||||
forceHighQualityLive: boolean
|
||||
defaultLiveQuality: '原画' | '蓝光' | '超清' | '高清' | '流畅'
|
||||
useDefaultLiveQuality: boolean,
|
||||
recordLiveDanmaku: boolean,
|
||||
foregroundColorMode: '自动' | '白色' | '黑色'
|
||||
preserveEventBanner: boolean
|
||||
bvidConvert: boolean
|
||||
latestVersionLink: string,
|
||||
currentVersion: string,
|
||||
}
|
||||
|
||||
11
README.md
11
README.md
@ -106,6 +106,12 @@ UWP 版 Edge 已经不再支持了(就是 Windows 10 自带的那个), 请使用
|
||||
- [jQuery](http://jquery.com/)
|
||||
- [MDI](https://materialdesignicons.com)
|
||||
|
||||
# 已知问题
|
||||
- 和`解除B站区域限制`一同使用时, 两个脚本功能互相没有任何问题, 但有的人会遇到没弹幕的状况. 单独使用各脚本时正常, 目前未找到原因.
|
||||
- 可能无法很好地适应窄屏幕, 请尽量以1400px以上的宽度使用此脚本.
|
||||
- ASS弹幕下载不能包含高级弹幕, 字幕弹幕等.
|
||||
- `简化首页`可能会有无法加载`活动`栏目的情况, 目前未找到原因.
|
||||
|
||||
# 相关推荐
|
||||
这些脚本/插件同样能够改善您在B站的体验, 相同的功能将不会整合到 Bilibili Evolved, 但会尽可能地适配并保持无冲突.
|
||||
|
||||
@ -119,6 +125,11 @@ UWP 版 Edge 已经不再支持了(就是 Windows 10 自带的那个), 请使用
|
||||
- [GitHub](https://github.com/indefined/UserScripts/tree/master/bilibiliHome)
|
||||
- [GreasyFork](https://greasyfork.org/zh-CN/scripts/368446-bilibili%E7%BD%91%E9%A1%B5%E7%AB%AF%E6%B7%BB%E5%8A%A0app%E9%A6%96%E9%A1%B5%E6%8E%A8%E8%8D%90)
|
||||
|
||||
## pakku.js 哔哩哔哩弹幕过滤器
|
||||
作者: [xmcp](https://github.com/xmcp)
|
||||
- [主页](https://s.xmcp.ml/pakkujs/)
|
||||
- [GitHub](https://github.com/xmcp/pakku.js)
|
||||
|
||||
----
|
||||
|
||||
**喜欢的话就点个⭐Star吧(°∀°)ノ**
|
||||
|
||||
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
@ -14,10 +14,13 @@
|
||||
# 历史
|
||||
|
||||
(列表是手动维护的, 可能无法及时更新)
|
||||
<!--'单号'在支付宝中为'收款单号'-->
|
||||
<!--'单号'在支付宝中为'收款单号'/'交易订单号'-->
|
||||
|
||||
| 时间 | 用户名 | 单号后4位 | 金额 |
|
||||
| ------------------- | -------- | --------- | ------ |
|
||||
| 2020.03.21 15:40:35 | *涛 | 0476 | ¥10.00 |
|
||||
| 2020.03.18 19:33:28 | *. | 6551 | ¥5.00 |
|
||||
| 2020.03.09 18:24:10 | *柳 | 2522 | ¥10.00 |
|
||||
| 2020.02.14 20:00:17 | pandline | 3302 | ¥5.00 |
|
||||
| 2020.02.09 02:05:35 | Lucky9 | 0233 | ¥10.00 |
|
||||
| 2020.02.06 20:56:15 | *凯 | 2251 | ¥5.00 |
|
||||
|
||||
157
features.md
157
features.md
@ -281,30 +281,6 @@
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>简化直播间</strong></summary>
|
||||
|
||||
- 隐藏姥爷图标
|
||||
- 隐藏粉丝勋章
|
||||
- 隐藏活动头衔
|
||||
- 隐藏用户等级
|
||||
- 隐藏舰长图标
|
||||
- 隐藏全区广播
|
||||
- 隐藏欢迎信息 (xxx姥爷进入直播间)
|
||||
- 隐藏入场特效
|
||||
- 隐藏礼物弹幕 (仅弹幕列表, 特殊效果如节奏风暴不受影响)
|
||||
- 隐藏上舰提示 (弹幕列表里的 xxx开通了舰长)
|
||||
- 隐藏付费礼物 (播放器下面的各种金瓜子礼物, 以及许愿瓶, 上舰等)
|
||||
- 隐藏活动横幅
|
||||
- 隐藏排行榜
|
||||
- 隐藏抽奖提示 (开通舰长, 小飞船抽奖等)
|
||||
- 禁用直播间皮肤
|
||||
|
||||
每一项都可以在`附加功能`中单独选择是否隐藏. 图片中展示的是全部隐藏时的弹幕区效果对比.
|
||||
|
||||
<img height="500" alt="简化直播间" src="images/compressed/simplify-liveroom.jpg">
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>简化首页</strong></summary>
|
||||
@ -354,24 +330,6 @@
|
||||
**启用后**
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>缩放直播看板娘</strong></summary>
|
||||
|
||||
根据屏幕DPI缩放直播看板娘的大小以提高像素的清晰度, DPI缩放为100%的用户不需要此功能.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>收起直播间侧栏</strong></summary>
|
||||
|
||||
自动收起直播间的侧边栏.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>删除直播水印</strong></summary>
|
||||
|
||||
删除观看直播时角落的水印.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>删除视频标题层</strong></summary>
|
||||
@ -460,6 +418,92 @@
|
||||
|
||||
按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片. 注意目前仅仅在全部动态里生效, 切换到别的类别时无效.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>动态翻译</strong></summary>
|
||||
|
||||
在动态首页和动态详情页中, 每条动态下方添加翻译按钮, 可将动态的文字机器翻译为中文. 若开启了界面翻译, 则会翻译成界面翻译里设定的语言.
|
||||
|
||||
可以使用的翻译器如下:
|
||||
- Bing: 必应翻译
|
||||
- Google: 谷歌翻译
|
||||
- GoogleCN: 谷歌中国翻译(google.cn)
|
||||
|
||||
</details>
|
||||
|
||||
<h2 align="center">直播</h2>
|
||||
<div align="center">各种直播相关功能</div>
|
||||
|
||||
|
||||
<details>
|
||||
<summary><strong>简化直播间</strong></summary>
|
||||
|
||||
- 隐藏姥爷图标
|
||||
- 隐藏粉丝勋章
|
||||
- 隐藏活动头衔
|
||||
- 隐藏用户等级
|
||||
- 隐藏舰长图标
|
||||
- 隐藏全区广播
|
||||
- 隐藏欢迎信息 (xxx姥爷进入直播间)
|
||||
- 隐藏入场特效
|
||||
- 隐藏礼物弹幕 (仅弹幕列表, 特殊效果如节奏风暴不受影响)
|
||||
- 隐藏上舰提示 (弹幕列表里的 xxx开通了舰长)
|
||||
- 隐藏付费礼物 (播放器下面的各种金瓜子礼物, 以及许愿瓶, 上舰等)
|
||||
- 隐藏活动横幅
|
||||
- 隐藏排行榜
|
||||
- 隐藏抽奖提示 (开通舰长, 小飞船抽奖等)
|
||||
- 禁用直播间皮肤
|
||||
|
||||
每一项都可以在`附加功能`中单独选择是否隐藏. 图片中展示的是全部隐藏时的弹幕区效果对比.
|
||||
|
||||
<img height="500" alt="简化直播间" src="images/compressed/simplify-liveroom.jpg">
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>缩放直播看板娘</strong></summary>
|
||||
|
||||
根据屏幕DPI缩放直播看板娘的大小以提高像素的清晰度, DPI缩放为100%的用户不需要此功能.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>收起直播间侧栏</strong></summary>
|
||||
|
||||
自动收起直播间的侧边栏.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>删除直播水印</strong></summary>
|
||||
|
||||
删除观看直播时角落的水印.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>禁止直播首页自动播放</strong></summary>
|
||||
|
||||
禁止直播首页的推荐直播间自动开始播放, 开启后, 还可以通过`隐藏首页推荐直播`直接隐藏掉这个推荐板块.
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>直播间自动领奖</strong></summary>
|
||||
|
||||
在当前直播间有抽奖活动时, 自动点击抽奖按钮. 注意只适用于少量抽奖, 那种99+限量抽奖可能跟不上其他人的手速.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>自动选择当前直播间勋章</strong></summary>
|
||||
|
||||
如果拥有当前直播间的勋章, 则自动佩戴, 否则佩戴上次手动选择的勋章.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>直播弹幕记录器(实验性)</strong></summary>
|
||||
|
||||
开启后, 在直播间里可以从附加功能中启动弹幕记录器, 会记录启动后所有收到的弹幕, 并可以导出为XML弹幕文件.
|
||||
|
||||
> 弹幕的发送时间是相对于直播开始时间确定的.
|
||||
|
||||
</details>
|
||||
|
||||
<h2 align="center">工具</h2>
|
||||
@ -530,26 +574,12 @@
|
||||
|
||||
> 如果希望贡献翻译, 请参阅[翻译指南](https://github.com/the1812/Bilibili-Evolved/blob/preview/src/utils/i18n/i18n.md). 在文件中添加翻译文本后即可发送 Pull Request (到 preview 分支), 不需要编译. ~~因为本项目的开发环境弄得很烂, 请不要把时间和精力浪费在搭建开发环境上.~~
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>禁止直播首页自动播放</strong></summary>
|
||||
|
||||
禁止直播首页的推荐直播间自动开始播放, 开启后, 还可以通过`隐藏首页推荐直播`直接隐藏掉这个推荐板块.
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>瓜子换硬币</strong></summary>
|
||||
|
||||
在附加功能中添加`瓜子换硬币`的按钮, 点击可以将700银瓜子换成1个硬币, 每天限1次.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>直播间自动领奖</strong></summary>
|
||||
|
||||
在当前直播间有抽奖活动时, 自动点击抽奖按钮. 注意只适用于少量抽奖, 那种99+限量抽奖可能跟不上其他人的手速.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>专栏文字选择</strong></summary>
|
||||
@ -562,12 +592,6 @@
|
||||
|
||||
稍后再看里的视频添加后60天会过期自动删除. 开启此功能可在期限不足14天时在稍后再看列表里显示过期警告.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>自动选择当前直播间勋章</strong></summary>
|
||||
|
||||
如果拥有当前直播间的勋章, 则自动佩戴, 否则佩戴上次手动选择的勋章.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>网址参数清理</strong></summary>
|
||||
@ -575,15 +599,6 @@
|
||||
自动删除链接中的多余跟踪参数, 例如`spm_id_from`, `from_source`, `share_source`等.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>直播弹幕记录器</strong></summary>
|
||||
|
||||
开启后, 在直播间里可以从附加功能中启动弹幕记录器, 会记录启动后所有收到的弹幕, 并可以导出为XML弹幕文件.
|
||||
|
||||
> 弹幕的发送时间是相对于直播开始时间确定的.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<h2 align="center">触摸</h2>
|
||||
<div align="center">为支持触屏的设备特别设计的功能</div>
|
||||
|
||||
2
min/activity-image-saver.min.js
vendored
2
min/activity-image-saver.min.js
vendored
@ -1 +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)})})})()}})();
|
||||
(()=>{return(t,e)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com")&&!document.URL.startsWith("space.bilibili.com")){return}const t=t=>{const e=t.querySelector(".image-viewer");if(e===null){console.log(t)}else{e.addEventListener("contextmenu",()=>{setTimeout(()=>{const t=dq(".pop-message .toast-text");if(t&&t.innerHTML.includes("作者设置了禁止保存")){Toast.success(`<img src="${e.src}" width="200">`,"解除动态存图限制")}},200)})}};[...document.body.children].filter(t=>t.classList.contains("photo-imager-container")).forEach(t);Observer.childList(document.body,e=>{e.forEach(e=>{const s=[...e.addedNodes].filter(t=>t instanceof Element&&t.classList.contains("photo-imager-container"));s.forEach(t)})})})()}})();
|
||||
2
min/batch-download.min.js
vendored
2
min/batch-download.min.js
vendored
File diff suppressed because one or more lines are too long
124
min/bundle.json
124
min/bundle.json
@ -3,7 +3,7 @@
|
||||
"about.min.html": "E44CC2091973A839E5A533B397EF8C78DD573DAB9AF0C4D19E63748DCB9450DB",
|
||||
"about.min.js": "0627502F941D4CBB75DBBF8EA6BBCC0B050ADC2807CE4303D7E0154BE24519D3",
|
||||
"activity-apis.min.js": "459D26DB0BB447FEFE6F1842541A119E67C63573A800E56AD7FEC71D20087CEF",
|
||||
"activity-image-saver.min.js": "92C4CF9A70836EA93FA6C7188F89ABF567C04E24656CD64C59FA254F167AD71C",
|
||||
"activity-image-saver.min.js": "4117EDC0D59C15461083B2EB56F5061DCABAA5EA9699C438DD0E221FEAAFA8B3",
|
||||
"aria2-rpc.min.js": "133AE00F1BD5C68E52385D170FA2983A7A82F0326D8C42C4E3CDA14ED4F3626F",
|
||||
"aria2-rpc-profile-item.vue.min.js": "61DCAD1D440E036B89C22E00C51C8357DBB529612CB428D55C3804410D2AD059",
|
||||
"aria2-rpc-profiles.vue.min.js": "CBF3D159566A694BC543EAB5B9E743A13B571743EBDDB8C558AE036483E3AF5A",
|
||||
@ -12,76 +12,80 @@
|
||||
"auto-draw.min.js": "AE72CF2623DF2D15AD4AF82D125FFAF7EF5B1E6B36D9E9AC646AC98AA6AA8698",
|
||||
"auto-play.min.js": "DC9938AC15DADDC9D88DCA0C9BE64BE142C37D32CB85E42E23DAB2A7378531E5",
|
||||
"bangumi-timeline.vue.min.js": "753B8C96AFB3E6AC4C9507576D12B6CBB207BC1CC3FE5885C419E99C65BCD547",
|
||||
"batch-download.min.js": "862A3881DD8C246806FC3E640CF4058EDD3A86EF9C1D64B4E6F06704A7D9BA91",
|
||||
"batch-download.min.js": "754CA4B25CE98C10EF70E4BA6DA2E9D9C3633CDE14C82BD8D8D85400A2012627",
|
||||
"biliplus-redirect.min.js": "9882D14DAC5C103212A101A5168883C41B4B3B2737FD5F222DC343D0304FF8AF",
|
||||
"blackboard.min.js": "8BB9CCDE72302AE7DE39D66F9231EFB82BA27DDA799BA4AAAC06F6DE802661BF",
|
||||
"blackboard.vue.min.js": "84A30D5A6F322A3C083FC1100E9FF51233ECD08AFBD89A6449AD2388ACCC8522",
|
||||
"blur-video-control.min.css": "B72FA7AD198ED1C9A9620A83881441F96F9FF3083ED12203A324B9753A7CCFFD",
|
||||
"blur-video-control.min.js": "00A2AC837FC455DF2AED7D0C350265C7438CC6F5C203F085E19639DDB86D0E11",
|
||||
"category-regions.min.js": "97785B412B0476116FAFD3F56340945A2A991C844416685D85A52ED6AE7AC683",
|
||||
"bvid-convert.min.css": "DC588791A7A191BCBAFD3C166523413101FA992EDEB24B81892D06B9868D67E1",
|
||||
"bvid-convert.min.js": "0D7F799AD10FCD94C0C451264E03FAFF786F0BB9919E9AE6E10D13FD3957B849",
|
||||
"category-regions.min.js": "59666AFFFA63B942AC05B05C95E22BF6D655E3BA7DE3E46D8F86CEC79D0CA904",
|
||||
"clear-cache.min.js": "9AB1536D8278DA681831A589AD1414425BF206B36AE109FB4EC1E8A685BB2A9F",
|
||||
"collapse-live-side-bar.min.css": "22348786547D2D8DB659A306AF2E9C1F2050D66488778C71545AAEF785FD57E6",
|
||||
"collapse-live-side-bar.min.js": "BB1B1CF157099A70F1AEA3F154C84D9CA1A84A29B5F6E42357CA9F51FFC4965C",
|
||||
"combo-like.min.js": "239FC1F3AC50C9BBF3788E9C3ECADEEB0CA0F435D1EA7AD4A4AB471C8549A0C2",
|
||||
"comment.min.css": "CEDA2E6733E294A608812309FA6629045ABBC55A55C7677B6B60F019C0B62CAB",
|
||||
"combo-like.min.js": "368DA34768E947628099D258ED23BC5FFFCFFD25A47346E086C7975C8A52F997",
|
||||
"comment.min.css": "5B14E1F83A771D501B5B4DB455D00D95EECAB9AF2856BC5001DAEA6A3DA9F719",
|
||||
"comment.min.js": "64F7B6951861C25799C48BB1ABCF2A73F79BCBBFC1E9D3BD45EC1F16F94F6451",
|
||||
"comment-dark.min.css": "E980508E86203743C36FEE4F7149BFF53961ECBC4EC140E8C162D18D395B940A",
|
||||
"compact-layout.min.css": "CAC8B0DBA8E90B38D31F0811B7B469709052204AC36D5D3F20FE5D0899FDDCCB",
|
||||
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
|
||||
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
|
||||
"custom-control-background.min.js": "2A439B045A51D24F5115DD25995ED37E3D0371A074199FE6C727F2235F39C4D9",
|
||||
"custom-navbar.min.css": "570D309DFD6243607AB20F0FFA10C8C56434415E4A8D84FFB22390C445C6B4B2",
|
||||
"custom-navbar.min.html": "17FD1B1727E8D62E7997F10002FE7BF23472F390042D44DE3376A7A5A5FF2FDF",
|
||||
"custom-navbar.min.js": "1C0AA734393EC68E0B03E9E39F3BA40259FEE4E83580E98412B8DC108971FB43",
|
||||
"custom-navbar-activities.min.js": "7CCA4AF4555CF9E9D338FE7285879C9F1396112F1FCD7293AD92EEE965E656C3",
|
||||
"custom-navbar.min.css": "F17DB373E033CCBACAB332A24868FED6A010B2E5CA43396C36648D1A7093A01F",
|
||||
"custom-navbar.min.html": "FA6ACF1CA1DB6D3BD2BE310646B89B028756A36BF434BEBABE2BF00789581A09",
|
||||
"custom-navbar.min.js": "8AB481710497558D4A152A6D7E0226FDA78675729A3EFC6AA6AC5B0AA5404D17",
|
||||
"custom-navbar-activities.min.js": "DEC76A6C7527330CAA0B89B400C071E155B64D602A6A118A96BCAC451ED6FDBF",
|
||||
"custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3",
|
||||
"custom-navbar-category.min.js": "4CF38ACE1D0501217266D1E35DFCBF9D5C1D9A3838C54D53C614878BB8CF55E2",
|
||||
"custom-navbar-component.min.js": "D1B98EDF5C32D19E4A009D2303F69207B35ED35DD06E0F161E7D0BBB313F3C37",
|
||||
"custom-navbar-favorites-list.min.js": "D6CD723DE302DEBFFFFCC531F16D19FF5632CEEBEAE770B0309B9B6CAA04B1C9",
|
||||
"custom-navbar-history-list.min.js": "885C53603D2CBA3EF722A7AF037D059ED037060D3EDCF6D4B6C57B34247760C4",
|
||||
"custom-navbar-iframe.min.js": "C4EE469EC09655F9FF535ACBBD2A5F7C332DA2081936F8F485F5FB015EBD794B",
|
||||
"custom-navbar-category.min.js": "A8A6190C090C92525EBA0A3C0C70EFC37AC7D1AFEEAB2834F1D69934C1B1F4D1",
|
||||
"custom-navbar-component.min.js": "111FC82161C042AE5D3FA73570D87DBB4C2301B62EF56840915BC0EAA9DE65BC",
|
||||
"custom-navbar-favorites-list.min.js": "71931EEBCF0BA3B33D8E72FF56BD92F2A089907F7E54E863D1EDDE0EAA9242FE",
|
||||
"custom-navbar-history-list.min.js": "117EA03267C36C7DFCA17FE3270851135AA1FB8E49C9D2E875C3783B710B9BD6",
|
||||
"custom-navbar-iframe.min.js": "DBE5844C2AA36057DBD33BBC5724D7D7F881AB15EC45A80228961942CD810A32",
|
||||
"custom-navbar-logo.min.js": "236CCC887A3917A6D4840889B7380B648197765B8CDA27CB233F3F1E3215F7BB",
|
||||
"custom-navbar-messages.min.js": "D7B315A4D8FD9E2EF9C1E40C1F3CA7EC18C5A87AC7A9410049061A0D851868DE",
|
||||
"custom-navbar-search-box.min.js": "F91CB1678AE6E353148134A16184BDC67C8310099000986451F3668E7F505345",
|
||||
"custom-navbar-settings.min.js": "BF251CA22EF6F8B681C70F9CC5C9DC3A31D6AAE3968CA3990722A0191B06AB13",
|
||||
"custom-navbar-search-box.min.js": "36C9187C51A0715BACC9D9E82D6B0733D6C818453D1150F235E9C649E5529E2C",
|
||||
"custom-navbar-settings.min.js": "474924B0C90EE6B3DF924D73DFD02DFC2BCF5BAD1F6A4E539A6263D3A751506C",
|
||||
"custom-navbar-simple-link.min.js": "0960197FB525733551435B07D7B024272C21BDD2D8B4F47027046FCE7B3468C5",
|
||||
"custom-navbar-subscriptions.min.js": "40F7ACEB501462A72D6BC15D1814DFD8A75B9FA6867748F362593CB00260C51E",
|
||||
"custom-navbar-subscriptions.min.js": "8664608EA96BA5E3CC0202F3ED095823B8D2A3DFCDC6D87C192FEA652D0DD554",
|
||||
"custom-navbar-upload.min.js": "0CDEEA46DCF0D6187C86BB12DE8CD36737116EF171AA1F63AB20C5DC7549C976",
|
||||
"custom-navbar-user-info.min.js": "C9C5A8211E7E2B1D2438AA02DD3A8B81DC78A2F606747B90DC3F6D33662F84E6",
|
||||
"custom-navbar-user-info.min.js": "585AA81644C40565C0722BF37A6BF631F82DF6278AFFD5157C41D65026785A18",
|
||||
"custom-navbar-video-list.min.js": "08D6713144E910C1303CB610A5890A5663B92BE82630BDA3C8E6299FB4A429E2",
|
||||
"custom-navbar-watchlater-list.min.js": "2742EAFAA8C716A9E937F70DE1D222DAA97A83EA6323B56DA001F609757240DE",
|
||||
"danmaku-converter.min.js": "FDAB4DB2E3C79730A39CDA7C5FD193693621FED206C6549E9B8F13778080CC12",
|
||||
"dark.min.css": "962EF3ACE3D0349369FCAECB65266667FD07A3E42EDFF179760725F261B361D8",
|
||||
"dark-important.min.css": "B30D1AAD647103126D47740D67FFA472DE7B385420BB5E8050100BE759114A93",
|
||||
"custom-navbar-watchlater-list.min.js": "623DA447FAFCF271E34C1A1D19B2721B78C7BC478A38C04ECF2DCA6427D006F0",
|
||||
"danmaku-converter.min.js": "908389A7D4E5F8546075B74F41BF03BD974073B4203723A575CF22082B358692",
|
||||
"dark.min.css": "F5B7B0F2322AD760AF7F735750B0A7B5A1837313926C35942019C597952C22A4",
|
||||
"dark-important.min.css": "9381B563726BCA701DD77C7AD572793538A45CB839F56008A55EE46821EA1B05",
|
||||
"dark-navbar.min.css": "A2D91F11127D165571ACCC53004EDDB118CEE110F9B020D7E0541E1C8FAEA478",
|
||||
"dark-schedule.min.js": "853C446547603F4F0425F19F09F73335C9EC451A790C1C07E5E5B88A09E9B453",
|
||||
"dark-styles.min.js": "71AF9CBD74BD3F570515C46801AE66A52665DCEDE2F4941AA90D12A4F1381A6E",
|
||||
"debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA",
|
||||
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",
|
||||
"default-danmaku-settings.min.js": "9DBC9AC9B5A3B59EBCC6F04D36527B523D66203AC5FE7C2AD5DB46FFB84F9382",
|
||||
"default-live-quality.min.js": "5FF7CA53B85CF11B66E26F1AED5E6BCB7A55D348D08193FEE3D9D52716424234",
|
||||
"default-player-layout.min.js": "C6CE64216569A006566ADD7FC69451897612F46CC9641B8B15E0A13D5B1F2455",
|
||||
"default-player-mode.min.js": "244264CF975A8266ABB239C24E5CFEE0E3C918340267571244EE2CDC893D7167",
|
||||
"default-video-quality.min.js": "D423D80B3151ACA49D8F769054E0F839DA2367E7F7C0590EFD60F71B4A6BEADB",
|
||||
"default-video-speed.min.js": "EBBF43D8013E32AC13C3E9396480574DDC549BA8BC7CCF15FE4EEF2DFEF64F33",
|
||||
"double-click-fullscreen.min.js": "C6D95B92ECDE67F2C0A3C6B6E4DC655C524F6A98CE0D48733ADCE4ABA780A47B",
|
||||
"download-audio.min.js": "1F4536DE4FF302BFD026CA17E028AF8EB037FB6D0CB355692549DECAEAE0E8C9",
|
||||
"download-danmaku.min.js": "87BC2B39D99E029BB602AB2F59A387FC960D5779791524F8C26FBC0278CD8F8E",
|
||||
"download-danmaku.min.js": "40FB5F6B9C34009A93AC276874E52CFAF05B121FEE1A8BCD6AC1A38F3FA1BE3F",
|
||||
"download-live-records.min.js": "7EF26D22D22EB75A6B27B78B3DB0E2ADE6004587C11B0C2893CF1CCB3B6FAB6F",
|
||||
"download-subtitle.min.js": "4B99A00FEEA40C6D577AC8BD8DFFD34D91B75E150C7848B965D58B0096DF762C",
|
||||
"download-video.min.css": "9B7FFAC852999B11DB62B6467CDBA1AEE53B7F3FA6C592185281542B25AF527A",
|
||||
"download-video.min.html": "B7EC01DF01DBA78A7B009BDA78865891A974F84A1D72964B7393A07E50D5E5F5",
|
||||
"download-video.min.js": "B61A2ADB1FF7490CED38E05F9B468733E5058B2BCB3BC21DBF40FB8CA252A517",
|
||||
"download-video.min.css": "8B68CCDADACC3D84BC1AC661C3E46CD3EBEB657CC89F244B05D756B0ECF4069C",
|
||||
"download-video.min.html": "FF62E93D979BC5AA1D75AFD0A9CD92E03EBC9747A082C9BDE59460FEA63FF983",
|
||||
"download-video.min.js": "0495D0F035A3EC4E4EA9ECE27E0A9A36FA730984CECD0A6EA1EE880F553A1889",
|
||||
"download-video-package.min.js": "B10FF11DE7DFBACEC38F195B8E836511E527215B5E177CB1D223D14F30EB1435",
|
||||
"dpi-img.vue.min.js": "11DF7577B754D8C01E8331E4FDAC9494E72523099845A0D6B0D897849CD841D6",
|
||||
"expand-danmaku.min.js": "B21658C40085AEA8DC49652AE62EB8610BB2EBEAF7A9C9AF69EF3B11E08EEC8D",
|
||||
"expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224",
|
||||
"expand-description.min.js": "A56857AD6B1C9F431B233D188E857D30DD5A2EB644986DE32A21280B1B7BC7A7",
|
||||
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
|
||||
"feeds-apis.min.js": "145BED87E33CFB2E937BD8FC1F460C307C8C09F273FBDBF01D5EA3237BFA8910",
|
||||
"feeds-apis.min.js": "FB079652CED58A4442B95D407955E9E5207E9434DE2BA0019AD52F9C35B92FBD",
|
||||
"feeds-filter.min.js": "10557E498B8BADA3C1C03E8C1DCD6FB24DBA2DA27A5A03BD861054F7E2989D46",
|
||||
"feeds-filter-card.vue.min.js": "282140DDBC3D2C94F821C8F4E0047BC7B3DDFB91837C7896F837353A0AD541F0",
|
||||
"feeds-translate.min.css": "D2FDDFD71335889D19F1EADAA07862FF2587AE712D42039A58CF8C7E599A9444",
|
||||
"feeds-translate.min.js": "6EDDC72E562895EC263D6D1DF8055F99E8C1B1863DB950B23469B3C78F03FD84",
|
||||
"feeds-translate-providers.min.js": "D938CB5F6437AE4A38C1A9933F530B89168FB4E88DCA2289C46465059CE6473C",
|
||||
"feeds-filter-card.vue.min.js": "922E7201AD48573E00123C36A61246ECB3F957AC9C97712A7E0CD5B01C2BEBA8",
|
||||
"feeds-translate.min.css": "704EF1AAE13C4F7D33244E0EC30069AE449C4DBA0310E94C6A6B6ECC33570E5E",
|
||||
"feeds-translate.min.js": "3BFACEC337137ABA7EA27184A03F42523DE24F96596BA14AD16A012749D919B1",
|
||||
"feeds-translate-providers.min.js": "DD3B48C051ED1CD89AB79B2563723B2639D8737EF2194136D63ABAA8D4B64F6C",
|
||||
"ffmpeg-support.min.js": "B88C5BFDC1CC582CA25098D6BA47189FF628B7323EF9F90D4CFBC4E946648927",
|
||||
"fill-with-comments.min.js": "A32B6D4ADFA29C164F9675E07715EAC0A5CFE0BBB346735DD691BDA2D9F338C3",
|
||||
"filter-type-switch.vue.min.js": "E06B00EF48F3CCFACC82B858A266CE0DF48F8332C5900B3AD579330D4C6D3125",
|
||||
@ -96,10 +100,10 @@
|
||||
"full-page-title.min.js": "5399D56E21336A2A4473F75167755EA3DE7B0146A9285D2B8FB201E44972B921",
|
||||
"full-tweets-title.min.css": "13A0CF1C96F374CED3FA59A532E28B4B620D7A4C374385A363F32AD1A7656764",
|
||||
"full-tweets-title.min.js": "DD57BB732ABEF7739CA84AEFF97E86F8984FCC4A8A75B957213622350B2A7C37",
|
||||
"gui-settings.min.css": "C2433494617BC7A6BD35D67D9ACB685D89BDEE1B61E2E23E4E69CB1F23DA124E",
|
||||
"gui-settings.min.html": "A9B15D8AF585FF0853306E81E10BA64771AC3BC89D79AE225C8877315CAF0DDC",
|
||||
"gui-settings.min.css": "A5A154D022A3D1B0AFFBFDF0AE490980B3BD363A8EFC7AD16AD88B8D4ECB3D76",
|
||||
"gui-settings.min.html": "83E61554E8C82C0E458839DDA0AF754FD5E589D08D7D59B7F43DD32D4571DBF6",
|
||||
"gui-settings.min.js": "029562CA0C0DEFCCBFF38C662C56C651C09847CDB78A99873E3ABA9936B428BA",
|
||||
"haruna-scale.min.js": "D046864416831B101582DD87E602AE21309FDE2DB64A8F24D57B6ADBE67E6D7B",
|
||||
"haruna-scale.min.js": "FD079C86741F614FD63E733CF9B7B896A7D20110754815A540F3341D4DC252B2",
|
||||
"hide-bangumi-reviews.min.js": "7265C0CE994FDA926355A9A4F9B207E7E68E749D47332F3C537EF93E97927A23",
|
||||
"hide-bangumi-sponsors.min.js": "C862B67D5FC1DDC46412F5595A0B900A58F7A6D6E55A2464B6525DCB4D935FE7",
|
||||
"hide-banner.min.css": "68D798C7FE5D4C94B6BA1FB0075EFDFA285EAF1B04D4F54A8D37B031B560994B",
|
||||
@ -113,24 +117,24 @@
|
||||
"hide-top-search.min.js": "19641CCB6A883DB5DD143A768606DEF0C571572D91CCD3FD5A9302A2A916E19B",
|
||||
"home-video.vue.min.js": "ACD3918903369692BF0AA0ADBE3E77B8D6B942EA1DAAB7138B362D263E9DC1F4",
|
||||
"i18n.de-DE.min.js": "5BDAC5F0493F447A98B4D308817B21AB2787BEF9E3929EA37F0D2ACD3D879337",
|
||||
"i18n.en-US.min.js": "6EACD2F7546C9E79B7A1BD90BB929A8384AB6BD07BE3E5744EE1AB1B9B21ADE3",
|
||||
"i18n.ja-JP.min.js": "886A0B8D9F480C44888DC6073CC0D8BF945DD3FB6B98758E2B35A43DDF1D1AE7",
|
||||
"i18n.en-US.min.js": "B503606FC6ED8784BFFDE9C28D12F8C6C9C74D66DA6A7CCB10ADF47750986C5E",
|
||||
"i18n.ja-JP.min.js": "6F43D8F13DDD9043D3C404FC1D3A0502AA4B8142FC8F6DDCEABC7E73CF1B9DAB",
|
||||
"i18n.min.css": "7BC760D37C9143B45770EDFF72FF48BC713697FF547638F3D6651632387DDE69",
|
||||
"i18n.min.js": "7FCB933FD43C05A152B672D4BD721F3ECEBA6AD29648379947DAAFC403907B38",
|
||||
"i18n.zh-TW.min.js": "803F67270809E3258E2B302ADE542B12EF222C83EDC67FB8C68301C5F4E3A1CC",
|
||||
"icon.vue.min.js": "818DBE1043C65CA3BD83F1EAE124D38B272344BA64DECA5B6A55BB7F0C86D19A",
|
||||
"icons.min.css": "6B5338B7BFDA938DF6570BFDA717E6DCC1FE15043B9FED169F82E547F1D33272",
|
||||
"icons.min.css": "D8DB1DF404C10FB3038B390925A9E95D06E5BABBDC618162D7888CA59C964F42",
|
||||
"image-resolution.min.js": "0D9679DD7D7CF2709368FC4811F03CC0379EE7286432B98DB7AAB45227D20C76",
|
||||
"image-viewer.min.css": "0CF849C6546AEBD2E7EB42F42368BC87B95536840F8A364413DB9A6E37AF5EA8",
|
||||
"image-viewer.min.html": "763742E79923A7918F281AEBB3CEE76FE2A0AE94CACE325AE4BEE1AED451DAEA",
|
||||
"index.min.html": "94B83D9EBB9005C1286A7E0759A7683932F8DADA20D07E5E9D8FF867B04D4B95",
|
||||
"keymap.min.js": "8115CF5E8952B841B2F01862D7C7E14AF1AEB592ACAAF5CB8ED38CBBEE83B8CF",
|
||||
"live-socket.min.js": "7194F9E6B3411DB9B62ABBC456987ED1D52F249E874A254BA696EBA42570C17E",
|
||||
"keymap.min.js": "97F968FE6B8719E4A22FC8A23DD6369548BDABE7574BE1539217DD52CA297884",
|
||||
"live-socket.min.js": "8C59B0458D14FBA9233847F18D82F3DAA558A0DA432B63409050C1A27D871C51",
|
||||
"magic-grid.min.js": "30BA27115FAC84B018A5A8C64031939DF1E324AE199F2F3675925ECF427CBFFC",
|
||||
"mdi.min.js": "8A22F2F37F88F74FC07CE2FECA7CE135182058BE24409BAF3DEF0D5845B0BE1A",
|
||||
"medal-helper.min.css": "6AF13675048FEBFB7E56ABE7462346BB53D22DE21DC31A34211872FCF6FA2A3B",
|
||||
"medal-helper.min.html": "5D7057259368BE97DED3375DD904695B245AA2BF338C5E18CB3CF61DD913617C",
|
||||
"medal-helper.min.js": "A55F702FF0D00578A6402784BE68D27BF44E789356FAA709B672B1D0BAA36A95",
|
||||
"medal-helper.min.js": "A18800B09EFE9B7A82D0CBC2F74621BBE616E9C8D366145073B6FFB47255425F",
|
||||
"minimal-home.vue.min.js": "8DB1418E89A06C6635D3DD0C57241FB6226CF98F7A2740934D8286D095937D6C",
|
||||
"minimal-home-search.vue.min.js": "1E6198679DB8FBF6DE9CBCD41E9FF55BA44C743A6CFE1BF74822CFD1F70DA252",
|
||||
"mini-player-touch-move.min.css": "028540E4F40EFD23403CB3D8A654372D7CE65FFC1F95B9793C207179C7C3A9A2",
|
||||
@ -145,20 +149,20 @@
|
||||
"old-tweets.min.js": "387152B26384B0900985F527112841CC00A48F507EAA8FA634D13FFA83447A72",
|
||||
"online-info-row.vue.min.js": "4707798C1C08F1704142BAEFE43CB4DA3060352A66B0F1A6BFE5A77F8486A195",
|
||||
"outer-watchlater.min.css": "B40E94BADA1A9BC96422777B33150780330763098B539921DA05F9D3BA487424",
|
||||
"outer-watchlater.min.js": "2B4A5A63779B90D68609EAB8CFBE7EDD127773557745A827706591F157B15E0B",
|
||||
"outer-watchlater.min.js": "102BEA3F43A2E35188BE53805C2B9A264282AE29FF685FF521FC6E7038BB0853",
|
||||
"override-navbar.min.css": "E5AA612841281169CA367A238FB934F807900A385CE2298B7352FF3CA4623757",
|
||||
"override-navbar.min.js": "E55F4EF066461D98ADB1C1582A716C8E179DC78DED8E71D3E9757B25444C2C5E",
|
||||
"pako-inflate.min.js": "3C55C3DF869249CDCF8489FBC96DFCA2AB7961554909DD55D39E7133DA074315",
|
||||
"player-focus.min.js": "A64917B3EB83D73948E9502E8CD3C5D9A3FEC08B5F52B2D291A375B9F166C02D",
|
||||
"player-shadow.min.js": "918D2127907BC2C164CB86BF7F9C2501CF3B9CD236FEEDE5155B9B5D932F3415",
|
||||
"quality-errors.min.js": "3B5710AEE0B0E0B2A21AABE747EF092CA8FEE4BEC1309AD860884D7DDB21E3C0",
|
||||
"rank-list.vue.min.js": "9982073307A5C19F9CA1BA131D574047DC0FC131DA5F8840585D663B3643D150",
|
||||
"rank-list.vue.min.js": "EA112025FE267F33FEA4320754C665A1694104FE6AE280AA171B8B0409BBDCCF",
|
||||
"record-live-danmaku.min.js": "64DC9C8F49971B3C846749E4BE343C9185310DA157996450667FE9C5C62525F6",
|
||||
"record-live-danmaku.vue.min.js": "740784A24CD5326095C269FD33A5B498ADAAF03FE31B136060888D7E7B616BD3",
|
||||
"remove-promotions.min.css": "A5C7A22113A8E470F386CC0FFEBEB5FA62C5AA905B7CBC2683E8B610B6903A44",
|
||||
"remove-promotions.min.js": "A24F613643F11D06B2E0BF3CD0BA0B952062C34A4F6A46470F94EF23661D4319",
|
||||
"remove-promotions.min.css": "6FB1BD260737887D3BF266299121F3D5BA2B88379492F05E42B95E49A6B91967",
|
||||
"remove-promotions.min.js": "9749B85A95F5E6AE4F5B58A69D7ED7CA3B239C0A0794C6577A01B2B72D12054F",
|
||||
"remove-top-mask.min.js": "A15C1EC10D2E1A61845B1ADAE51860553F96427059E10443B1E53FAF48F45304",
|
||||
"remove-watermark.min.js": "C5576920080BE1BA1A472D7C795073F736551CE09560B50BAA7BB83264E7C664",
|
||||
"remove-watermark.min.js": "5A63C694BB9E68EA9FDA394D61D227FA31A504E31783C62BF42AACC3FC78C8C4",
|
||||
"reorder.min.js": "4E956A2CEEC46CCDED9417E96BC84AEF706946B5E9898A32CCB19F00DBBADC1F",
|
||||
"screenshot.min.css": "6310BD2E77013EAAB38675DCD00761C2B7132C79A529B4FE25C8E86EC7E2F967",
|
||||
"screenshot.min.js": "19EBC4F84AA900BC868884D05EBC9691B5C12852262129367458CBB34A606DF8",
|
||||
@ -169,21 +173,21 @@
|
||||
"settings-search.min.js": "C3B605AF2581F562415B6AA30F7B1D825A74EB0B2B83A5F17A303B7B5646E261",
|
||||
"settings-side-bar.min.js": "C01E22A25B573712D75340E1E34BBA4EC171A80E39F1097FD5E52C6F57BC9BF4",
|
||||
"settings-tooltip.en-US.min.js": "1799A6CF1FCC7D18C6CEE755F57D420E7B3215647B8159B792E74BC735568880",
|
||||
"settings-tooltip.ja-JP.min.js": "82BDAD5C1511A54BBE5AB232F49C3ECFB8B4E82B22FB4EE8D2DC477093DBB9ED",
|
||||
"settings-tooltip.ja-JP.min.js": "322DA9053E35EC6D7EA3A1BC190D95D2D2AAAC9E85E80A00DA48AD3B4CA2480F",
|
||||
"settings-tooltip.loader.min.js": "B3941A6B9A5AC693832EA49015397114DC95137E12E6D1ABC311EFF3A3D6F319",
|
||||
"settings-tooltip.min.css": "0C138D5CF16B9068E73D173D229B2B458C15F50272DA73D6A580921C5A848845",
|
||||
"settings-tooltip.min.js": "E9ABA72B3C29CA850342109E57B055B193F3356DD59876B202E8E908AE6247C9",
|
||||
"settings-tooltip.zh-CN.min.js": "4111C9ADCD3BA65C7114F2B1AECAC55385434BD8E7F25D67369B8893529CFCD6",
|
||||
"settings-tooltip.zh-CN.min.js": "F0717F3B20AFA78D4697129E7B566D2B8151251643D4EFFDAF6C1962B1796E34",
|
||||
"show-dead-video-title.min.js": "8D591930421EBA43A1BDF50DC8B645C1BD1A17E109FB1CFBCD6B78E6C74E1D68",
|
||||
"simple-home.vue.min.js": "BB936D1E635E21B72A81F448F86AE2E6773ADABC204BFE4BF78A02BB604E16C0",
|
||||
"simple-home-bangumi-category.vue.min.js": "3CE2077EAA17E33FC3B0003E528658D34F0BBC34259FF5E47E8D2025A11D47AB",
|
||||
"simple-home-categories.vue.min.js": "A57AAAB2283DB7481F117CEE4E200A839F72D5B1698C25333A9D5FF1ABF1AC70",
|
||||
"simple-home-feeds.vue.min.js": "BEF0F558D6E278875B53CFFB7D880D8C0A561346759EEAFBC2D4938427A54328",
|
||||
"simple-home-normal-category.vue.min.js": "71D58A93F0AFCEB58F01DAEA221F5FC9E33925006C53506328B5EBC486C75BD0",
|
||||
"simple-home.vue.min.js": "1F5CF46DEE65549A30C5F0790578EED0C6B3AD6C5F20D9B88CD745C4B7664ABB",
|
||||
"simple-home-bangumi-category.vue.min.js": "87DCA2C8295CAD66C9FA01D65437EC2F9DD5E7F4A565B4384ABAB1746A6787EE",
|
||||
"simple-home-categories.vue.min.js": "C1CA8139C448342EBEC265F9ED8AD88357FFAE531EE35BD460765CF9C8F747E1",
|
||||
"simple-home-feeds.vue.min.js": "FD8536D04043817395063E889E0C5A3C6158CDCD794A26398C635B8772EBA32B",
|
||||
"simple-home-normal-category.vue.min.js": "C600E27CB38D26CD2361157E3AE98878F3FD2D4717546E18F5CFF9FDF5701A0B",
|
||||
"simplify-home.min.css": "50F0FA046D61ECE5183409CF97C8DBECB4CF64918DF813CD2B39BF9FBD314B42",
|
||||
"simplify-home.min.js": "F6D7F8E0D45847C3E056711AECE3832785603E7EF85A4B995C028F5CBE539C94",
|
||||
"simplify-home.vue.min.js": "62F246FD5C9172676A077DD1DFB1F5ACE0E018952D13E1AAD89B3EA2FD00F961",
|
||||
"simplify-liveroom.min.css": "406BAA61CBEC31198158D51B32F9F25984400F8E17ADCD00A156EF37CA35E5D6",
|
||||
"simplify-liveroom.min.css": "DDCCD78B2C885C89B420231C9E700FE4F6D2975BAA258FC0EB8DA038B80F62BC",
|
||||
"simplify-liveroom.min.js": "F6B75856983ABCC0624378CD9841F2E8DB3983682F18F83959A63DD3FC227A6C",
|
||||
"skip-charge-list.min.css": "D3C988CE131CEBFAC8A60360529C83EC4AE1B9EA122F9A6924F19963E25A4FE9",
|
||||
"skip-charge-list.min.js": "9F75E41B8DC604DDC7DB25B943DD44A1B73A634C60D8C7BA0E45191E1F316730",
|
||||
@ -194,8 +198,8 @@
|
||||
"superchat-translate.min.css": "F4874FE716A750AE0D21DA44393F286E5AABFFA949476E2FA06CDBE2748CF095",
|
||||
"superchat-translate.min.js": "0317213CDA236990C6A393B00E35165D17704041EBB29C3B08640D95F7FABE02",
|
||||
"text-validate.min.js": "3F523485A3EAB6F5BB5C81570A8F4796F13EA00E4A229CFD24CB10DC5B5B61C0",
|
||||
"theme-colors.min.js": "3001D5DAD0EFBAEC7F96C51FD3BE2C4677E358AD70D8DD019D2280EA450A34E7",
|
||||
"title.min.js": "945F6285CF1DA38F4668364F4B6399500B521F5396440585C62A4929F4946704",
|
||||
"theme-colors.min.js": "127EDB56EE368D3A67612BFCF9897C1404ECBFD2D5DAA9ACF0C5B751ABC70C3E",
|
||||
"title.min.js": "D653E132D180A4A6F1B63E091AFDACE182539AD3BDEE804676F59A6B2BA06F42",
|
||||
"toast.min.css": "954BFF7E23F80710EF241182DBA67B37A1BDAAC1F31B71E0C6A58986E1209CE2",
|
||||
"toast.min.js": "C9909E1426CED4F23B643461E9495D0392FBAED34539D0D00644EF6949D71596",
|
||||
"touch-move.min.js": "96072732F8BB29A4B8EF79D5942ED13EF80C0EF209A3ECE6FDAD5D65E9E08655",
|
||||
@ -203,20 +207,20 @@
|
||||
"touch-player.min.css": "3D4B8D1EEA99277D5549D533503D0C1E4486382F507ED172B05E5350423EC0A2",
|
||||
"touch-player.min.js": "0307516FD221386DA37F9C48223BA0E242BF52EF48F46D18A033042351968E94",
|
||||
"trending-videos.min.js": "1ED73F10D5A7C409CCBF91A97FBB0DE2AA16426F2216DF75F904E8A6389A46E9",
|
||||
"trending-videos.vue.min.js": "8C765C4F2340D420DCB10E5B7E94015E3F7ED0C5524BDE64D75B8D97DB7DC464",
|
||||
"trending-videos.vue.min.js": "24E8616129DDEC7D014B1836DB6E54A5AF35578D1F4586EE827A962312EA7049",
|
||||
"tweets.min.css": "9015C1F165C91B9205ABBE4E8A3B5FA83DB1EB4B5CF2442846AF61E44FF178A8",
|
||||
"url-params-clean.min.js": "5B49AF3EFA5337C6B7ED07093A27ECD3FD140C99C61B6E1E05D93A9EF457B691",
|
||||
"url-params-clean.min.js": "BF8E83D2C4E79F557526CA9EFAC3596C1315384A07D57C0AFBBE8E7EC242C9C6",
|
||||
"v-checkbox.vue.min.js": "A23C35D5627009A29FD396A024442A19E37DEE70674BF3CE0FA377D781ED2231",
|
||||
"v-dropdown.vue.min.js": "DE6DF6A2081FEE6AB802A355FEC5FF87B7FDE054BC01AB145379DB6634A83133",
|
||||
"video-card.vue.min.js": "C335B564D4D625D4AE26D15A4031898479EEE81A84AB43A7D4D8D144C32B5D6F",
|
||||
"video-card-info.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
|
||||
"video-dash.min.js": "010621860893DE3E324090F01CCDE542B6AE7F2115F44D76A634C9D541980BBA",
|
||||
"video-dash.min.js": "8F657BDA87B5DE18F8978B02B311F491F9D23302DB0E38C5A62CA1BCB5F56726",
|
||||
"video-downloader-fragment.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
|
||||
"video-info.min.js": "B837809D3D2C10CD34969143DC05EDD6F24C38181CF24FD705C80B9DD6E86B94",
|
||||
"video-info.min.js": "EDF4176D830A516FBE476576B1944E09997309A543233DDF298FF23213B08CFC",
|
||||
"video-list.vue.min.js": "9B0FB6AC3D3CD8D0250CBBC787D5BE823C46216CD71B9E8DCAC75AFE1BE5A9EA",
|
||||
"video-story.min.js": "F9D4D2D80997DF5F11BF0CFA4D389B77BDBF1566EA6002E47174B68B440F3C0D",
|
||||
"view-cover.min.js": "E4960587BFC4A219278EC300AFC8983AE4064D6FDBB42093E4EB7590726E229E",
|
||||
"watchlater.min.js": "8C3C74E64A6D1B0FD5A40166FCB19981F86AF0A0E1003586DC591863C2022B18",
|
||||
"watchlater.min.js": "E17424B0B6544385A876D18114A77B8CEA644FFC9F472DB0B1E48C216E5F4583",
|
||||
"watchlater-api.min.js": "0A341429EFB4489594C6670A1FEEF99E7EC2564FF18BCE3A679E98101BA0F2F4",
|
||||
"watchlater-expire-warnings.min.js": "99282802EF8EB87F199BDE88240E1F196CD85C77516E8D5466EB6F1939B908DD"
|
||||
}
|
||||
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
1
min/bvid-convert.min.css
vendored
Normal file
1
min/bvid-convert.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.bvid-convert{border:2px solid #8882;border-radius:8px;padding:6px 8px;margin:4px 0;order:-1;width:100%;box-sizing:border-box}.bvid-convert-item{font-size:14px}
|
||||
1
min/bvid-convert.min.js
vendored
Normal file
1
min/bvid-convert.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(i,n)=>{return{widget:{content:`<div class="bvid-convert"></div>`,condition:async()=>{if(["https://www.bilibili.com/video/","https://www.bilibili.com/bangumi/"].some(i=>document.URL.startsWith(i))){return Boolean(await SpinQuery.select(()=>unsafeWindow.aid||unsafeWindow.bvid))}else{return false}},success:()=>{n.applyStyle("bvidConvertStyle");const i=dq(".bvid-convert");i.innerHTML=`\n<div class="bvid-convert-item">av${unsafeWindow.aid}</div>\n<div class="bvid-convert-item">${unsafeWindow.bvid}</div>\n`}}}}})();
|
||||
2
min/category-regions.min.js
vendored
2
min/category-regions.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{const i={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,ads:165,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};return{export:{RegionCodes:i}}}})();
|
||||
(()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,ads:165,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",ads:"v/ad/ad",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})();
|
||||
2
min/combo-like.min.js
vendored
2
min/combo-like.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{(async()=>{const e=await SpinQuery.select(()=>document.querySelector(".ops span.like"));if(!e){return}e.style.userSelect="none";function t(t,n){const u=new CustomEvent(t,n);e.dispatchEvent(u)}const n=200;let u=true;e.addEventListener("touchstart",e=>{e.preventDefault();u=true;setTimeout(()=>u=false,n);t("mousedown",e)});e.addEventListener("touchend",e=>{e.preventDefault();t("mouseup",e);if(u===true){t("click",e)}})})()}})();
|
||||
(()=>{return(e,t)=>{(async()=>{const e=await SpinQuery.select(()=>document.querySelector(".ops span.like"));if(!e){return}e.style.userSelect="none";function t(t,n){const s=new CustomEvent(t,n);e.dispatchEvent(s)}const n=200;let s=true;e.addEventListener("touchstart",e=>{e.preventDefault();s=true;setTimeout(()=>s=false,n);t("mousedown",e)});e.addEventListener("touchend",e=>{e.preventDefault();t("mouseup",e);if(s){t("click",e)}})})()}})();
|
||||
2
min/comment.min.css
vendored
2
min/comment.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar-activities.min.js
vendored
2
min/custom-navbar-activities.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar-category.min.js
vendored
2
min/custom-navbar-category.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar-component.min.js
vendored
2
min/custom-navbar-component.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{class s{constructor(e="",s="",n="0 0 auto",i=false,a=false,o=null,l=null,r=null,c=0,u=t.touchNavBar,d=false){this.html=e;this.popupHtml=s;this.flex=n;this.disabled=i;this.requestedPopup=a;this.initialPopup=o;this.onPopup=l;this.href=r;this.notifyCount=c;this.touch=u;this.active=d;this.noPadding=false;this.transparent=false}get name(){return"blank1"}get order(){return t.customNavbarOrder[this.name]}get hidden(){return t.customNavbarHidden.includes(this.name)}get element(){return dq(`.custom-navbar li[data-name='${this.name}']`)}async setNotifyCount(t){const e=await SpinQuery.select(`.custom-navbar li[data-name='${this.name}'] .notify-count`);if(!e||!t){e.innerHTML="";return}e.innerHTML=t.toString()}async setNotifyStyle(t){const e=await SpinQuery.select(`.custom-navbar li[data-name='${this.name}'] .notify-count`);if(!e){return}const s={1:"number",2:"dot",3:"hidden"};e.classList.remove(...Object.values(s));e.classList.add(s[t])}async checkPosition(){const t=this.element;const e=t.querySelector(".main-content ~ .popup");if(e){console.log(e,e.childElementCount)}if(!e||e.childElementCount===0){return}const s=e.getBoundingClientRect();console.log(this.name,s);const n=document.documentElement.clientWidth;if(s.left<0){t.classList.remove("right-side");t.classList.add("left-side")}else if(s.right>n){t.classList.remove("left-side");t.classList.add("right-side")}else{t.classList.remove("left-side","right-side")}}}return{export:{NavbarComponent:s}}}})();
|
||||
(()=>{return(t,n)=>{class e{constructor(n="",e="",s="0 0 auto",i=false,a=false,o=null,r=null,u=null,l=0,c=t.touchNavBar,h=false){this.html=n;this.popupHtml=e;this.flex=s;this.disabled=i;this.requestedPopup=a;this.initialPopup=o;this.onPopup=r;this.href=u;this.notifyCount=l;this.touch=c;this.active=h;this.noPadding=false;this.transparent=false;this.boundingWidth=0}get name(){return"blank1"}get order(){return t.customNavbarOrder[this.name]}get hidden(){return t.customNavbarHidden.includes(this.name)}get element(){return dq(`.custom-navbar li[data-name='${this.name}']`)}async setNotifyCount(t){const n=await SpinQuery.select(`.custom-navbar li[data-name='${this.name}'] .notify-count`);if(!n||!t){n.innerHTML="";return}n.innerHTML=t.toString()}async setNotifyStyle(t){const n=await SpinQuery.select(`.custom-navbar li[data-name='${this.name}'] .notify-count`);if(!n){return}const e={1:"number",2:"dot",3:"hidden"};n.classList.remove(...Object.values(e));n.classList.add(e[t])}async checkPosition(){if(this.boundingWidth===0){return}const t=this.element;const n=t.querySelector(".main-content ~ .popup-container");if(!n){return}const e=t.getBoundingClientRect();const s=e.left+e.width/2;const i=document.documentElement.clientWidth;const a=s-this.boundingWidth/2;const o=s+this.boundingWidth/2;if(a<0){n.style.transform=`translateX(${Math.abs(a)}px)`}else if(o>i){n.style.transform=`translateX(${-(o-i)}px)`}else{n.style.transform=""}}}return{export:{NavbarComponent:e}}}})();
|
||||
2
min/custom-navbar-favorites-list.min.js
vendored
2
min/custom-navbar-favorites-list.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{const{NavbarComponent:a}=i.import("custom-navbar-component");class e extends a{constructor(){super();this.noPadding=true;this.href=`https://space.bilibili.com/${getUID()}/favlist`;this.html=`收藏`;this.active=document.URL.replace(/\?.*$/,"")===this.href;this.popupHtml=`\n<div class="favorites-list loading">\n<div class="loading-tip">\n 加载中...\n</div>\n<div class="content">\n<div class="header">\n<v-dropdown class="list-select" @change="changeList()" :round="true" :items="listNames" :value.sync="selectedListName">\n</v-dropdown>\n<div class="play-all-container">\n<a class="play-all" :href="playLink" title="播放全部" target="_blank">\n<i class="mdi mdi-play"></i>\n</a>\n</div>\n<a class="more-info" :href="moreLink" title="查看更多" target="_blank">\n 查看更多\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</div>\n<transition-group name="cards" tag="div" class="cards">\n<div class="empty-tip" v-if="!cardsLoading && cards.length === 0" key="empty-tip">\n 空空如也哦 = ̄ω ̄=\n</div>\n<div class="favorite-card" v-for="card of cards" :key="card.id">\n<a class="cover-container" target="_blank" :href="'https://www.bilibili.com/video/av' + card.aid">\n<dpi-img class="cover" :src="card.coverUrl" :size="{width: 130, height: 85}"></dpi-img>\n<div class="floating duration">{{card.durationText}}</div>\n<div class="floating favorite-time">{{card.favoriteTime | formatDate}}</div>\n</a>\n<a class="title" target="_blank" :href="'https://www.bilibili.com/video/av' + card.aid" :title="card.title">{{card.title}}</a>\n<a class="up" target="_blank" :href="'https://space.bilibili.com/' + card.upID" :title="card.upName">\n<dpi-img class="face" :src="card.upFaceUrl" :size="20"></dpi-img>\n<div class="name">{{card.upName}}</div>\n</a>\n</div>\n<div class="loading-tip" v-if="cardsLoading" key="loading-tip">\n 加载中...\n</div>\n</transition-group>\n</div>\n</div>\n`;this.initialPopup=(()=>this.init())}get name(){return"favoritesList"}async init(){new Vue({el:await SpinQuery.select(`.custom-navbar [data-name="${this.name}"] .favorites-list`),store:store,filters:{formatDate(t){return`${t.getFullYear()}-${(t.getMonth()+1).toString().padEnd(2,"0")}-${t.getDate().toString().padEnd(2,"0")}`}},components:{DpiImg:()=>i.importAsync("dpi-img.vue"),VDropdown:()=>i.importAsync("v-dropdown.vue")},data:{list:[],cards:[],selectedListName:"",cardsLoading:true,cardsPage:1},computed:{listNames(){return this.list.map(t=>t.name)},selectedListId(){const t=this.list.find(t=>t.name===this.selectedListName);return t?t.id:0},moreLink(){const t=this.selectedListId;if(t===0){return`https://space.bilibili.com/${getUID()}/favlist`}return`https://space.bilibili.com/${getUID()}/favlist?fid=${t}`},playLink(){const t=this.selectedListId;if(t===0){return undefined}return`https://www.bilibili.com/medialist/play/ml${t}`}},methods:{async getCards(){const t=`https://api.bilibili.com/medialist/gateway/base/spaceDetail?media_id=${this.selectedListId}&pn=${this.cardsPage}&ps=20`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){throw new Error(`加载收藏夹内容失败: ${i.message}`)}if(!i.data.medias){return[]}return i.data.medias.filter(t=>{return t.attr!==9}).map(t=>{return{id:t.id,aid:t.id,coverUrl:t.cover.replace("http:","https:"),favoriteTimestamp:t.fav_time*1e3,favoriteTime:new Date(t.fav_time*1e3),title:t.title,description:t.intro,duration:t.duration,durationText:formatDuration(t.duration),playCount:t.cnt_info.play,danmakuCount:t.cnt_info.danmaku,upName:t.upper.name,upFaceUrl:t.upper.face.replace("http:","https:"),upID:t.upper.mid}})},async changeList(){try{this.cards=[];this.cardsPage=1;this.cardsLoading=true;this.cards=await this.getCards();this.setInfiniteScroll()}catch(t){logError(t)}finally{this.cardsLoading=false}},async loadNextPage(){try{this.cardsLoading=true;this.cardsPage++;const t=await this.getCards();this.cards.push(...t);if(t.length>0){this.setInfiniteScroll()}}catch(t){logError(t)}finally{this.cardsLoading=false}},setInfiniteScroll(){const t=this.$el.querySelector(".cards");const i=_.debounce(()=>{if(t.scrollTop+t.clientHeight>=t.scrollHeight-48){t.removeEventListener("scroll",i);this.loadNextPage()}},200);t.addEventListener("scroll",i)}},async mounted(){try{const t=`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${getUID()}&is_space=0`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){throw new Error(`获取收藏夹列表失败: ${i.message}`)}this.list=i.data.list.map(t=>{return{id:t.id,name:t.title,count:t.media_count}});if(this.list.length>0){this.selectedListName=this.list[0].name;this.changeList()}}catch(t){logError(t)}finally{this.$el.classList.remove("loading")}}})}}return{export:{FavoritesList:e}}}})();
|
||||
(()=>{return(t,i)=>{const{NavbarComponent:a}=i.import("custom-navbar-component");class e extends a{constructor(){super();this.boundingWidth=380;this.noPadding=true;this.href=`https://space.bilibili.com/${getUID()}/favlist`;this.html=`收藏`;this.active=document.URL.replace(/\?.*$/,"")===this.href;this.popupHtml=`\n<div class="favorites-list loading">\n<div class="loading-tip">\n 加载中...\n</div>\n<div class="content">\n<div class="header">\n<v-dropdown class="list-select" @change="changeList()" :round="true" :items="listNames" :value.sync="selectedListName">\n</v-dropdown>\n<div class="play-all-container">\n<a class="play-all" :href="playLink" title="播放全部" target="_blank">\n<i class="mdi mdi-play"></i>\n</a>\n</div>\n<a class="more-info" :href="moreLink" title="查看更多" target="_blank">\n 查看更多\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</div>\n<transition-group name="cards" tag="div" class="cards">\n<div class="empty-tip" v-if="!cardsLoading && cards.length === 0" key="empty-tip">\n 空空如也哦 = ̄ω ̄=\n</div>\n<div class="favorite-card" v-for="card of cards" :key="card.id">\n<a class="cover-container" target="_blank" :href="'https://www.bilibili.com/video/av' + card.aid">\n<dpi-img class="cover" :src="card.coverUrl" :size="{width: 130, height: 85}"></dpi-img>\n<div class="floating duration">{{card.durationText}}</div>\n<div class="floating favorite-time">{{card.favoriteTime | formatDate}}</div>\n</a>\n<a class="title" target="_blank" :href="'https://www.bilibili.com/video/av' + card.aid" :title="card.title">{{card.title}}</a>\n<a class="up" target="_blank" :href="'https://space.bilibili.com/' + card.upID" :title="card.upName">\n<dpi-img class="face" :src="card.upFaceUrl" :size="20"></dpi-img>\n<div class="name">{{card.upName}}</div>\n</a>\n</div>\n<div class="loading-tip" v-if="cardsLoading" key="loading-tip">\n 加载中...\n</div>\n</transition-group>\n</div>\n</div>\n`;this.initialPopup=(()=>this.init())}get name(){return"favoritesList"}async init(){new Vue({el:await SpinQuery.select(`.custom-navbar [data-name="${this.name}"] .favorites-list`),store:store,filters:{formatDate(t){return`${t.getFullYear()}-${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")}`}},components:{DpiImg:()=>i.importAsync("dpi-img.vue"),VDropdown:()=>i.importAsync("v-dropdown.vue")},data:{list:[],cards:[],selectedListName:"",cardsLoading:true,cardsPage:1},computed:{listNames(){return this.list.map(t=>t.name)},selectedListId(){const t=this.list.find(t=>t.name===this.selectedListName);return t?t.id:0},moreLink(){const t=this.selectedListId;if(t===0){return`https://space.bilibili.com/${getUID()}/favlist`}return`https://space.bilibili.com/${getUID()}/favlist?fid=${t}`},playLink(){const t=this.selectedListId;if(t===0){return undefined}return`https://www.bilibili.com/medialist/play/ml${t}`}},methods:{async getCards(){const t=`https://api.bilibili.com/medialist/gateway/base/spaceDetail?media_id=${this.selectedListId}&pn=${this.cardsPage}&ps=20`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){throw new Error(`加载收藏夹内容失败: ${i.message}`)}if(!i.data.medias){return[]}return i.data.medias.filter(t=>{return t.attr!==9}).map(t=>{return{id:t.id,aid:t.id,coverUrl:t.cover.replace("http:","https:"),favoriteTimestamp:t.fav_time*1e3,favoriteTime:new Date(t.fav_time*1e3),title:t.title,description:t.intro,duration:t.duration,durationText:formatDuration(t.duration),playCount:t.cnt_info.play,danmakuCount:t.cnt_info.danmaku,upName:t.upper.name,upFaceUrl:t.upper.face.replace("http:","https:"),upID:t.upper.mid}})},async changeList(){try{this.cards=[];this.cardsPage=1;this.cardsLoading=true;this.cards=await this.getCards();this.setInfiniteScroll()}catch(t){logError(t)}finally{this.cardsLoading=false}},async loadNextPage(){try{this.cardsLoading=true;this.cardsPage++;const t=await this.getCards();this.cards.push(...t);if(t.length>0){this.setInfiniteScroll()}}catch(t){logError(t)}finally{this.cardsLoading=false}},setInfiniteScroll(){const t=this.$el.querySelector(".cards");const i=_.debounce(()=>{if(t.scrollTop+t.clientHeight>=t.scrollHeight-48){t.removeEventListener("scroll",i);this.loadNextPage()}},200);t.addEventListener("scroll",i)}},async mounted(){try{const t=`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${getUID()}&is_space=0`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){throw new Error(`获取收藏夹列表失败: ${i.message}`)}this.list=i.data.list.map(t=>{return{id:t.id,name:t.title,count:t.media_count}});if(this.list.length>0){this.selectedListName=this.list[0].name;this.changeList()}}catch(t){logError(t)}finally{this.$el.classList.remove("loading")}}})}}return{export:{FavoritesList:e}}}})();
|
||||
2
min/custom-navbar-history-list.min.js
vendored
2
min/custom-navbar-history-list.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar-iframe.min.js
vendored
2
min/custom-navbar-iframe.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{const{NavbarComponent:r}=e.import("custom-navbar-component");class a extends r{constructor(t,e,r){super();const{src:a,width:s,height:i,lazy:n,iframeName:h}=r;this.iframeName=h;this.html=t;this.href=e;this.popupHtml=`\n<iframe src='${a}' frameborder='0' width='${s}' height='${i}'></iframe>\n`;this.noPadding=true;this.requestedPopup=n?false:true;this.touch=false;this.transparent=true}get name(){return this.iframeName+"Iframe"}}return{export:{Iframe:a}}}})();
|
||||
(()=>{return(t,e)=>{const{NavbarComponent:r}=e.import("custom-navbar-component");class s extends r{constructor(t,e,r){super();const{src:s,width:a,height:i,lazy:n,iframeName:h}=r;this.boundingWidth=parseInt(a);this.iframeName=h;this.html=t;this.href=e;this.popupHtml=`\n<iframe src='${s}' frameborder='0' width='${a}' height='${i}'></iframe>\n`;this.noPadding=true;this.requestedPopup=n?false:true;this.touch=false;this.transparent=true}get name(){return this.iframeName+"Iframe"}}return{export:{Iframe:s}}}})();
|
||||
2
min/custom-navbar-search-box.min.js
vendored
2
min/custom-navbar-search-box.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar-settings.min.js
vendored
2
min/custom-navbar-settings.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const s=async()=>{await SpinQuery.select(".custom-navbar-settings");const{Slip:s}=await t.importAsync("slip");const a=dq("#custom-navbar-settings");a.addEventListener("click",async()=>{const e=dq(".custom-navbar-settings");if(e){e.classList.toggle("show");dq(".gui-settings-mask").click()}});a.addEventListener("mouseover",()=>{const t={blank1:"弹性空白1",logo:"Logo",category:"主站",rankingLink:"排行",drawingLink:"相簿",musicLink:"音频",gamesIframe:"游戏中心",livesIframe:"直播",shopLink:"会员购",mangaLink:"漫画",blank2:"弹性空白2",search:"搜索框",userInfo:"用户信息",messages:"消息",activities:"动态",bangumi:"订阅",watchlaterList:"稍后再看",favoritesList:"收藏",historyList:"历史",upload:"投稿入口",blank3:"弹性空白3"};Vue.component("order-item",{props:["item"],template:`\n<li @mouseenter="viewBorder(true)"\n @mouseleave="viewBorder(false)"\n :class="{hidden: hidden()}">\n<i class="mdi mdi-menu"></i>\n {{item.displayName}}\n<button @click="toggleHidden()">\n<i v-if="hidden()" class="mdi mdi-eye-off"></i>\n<i v-else class="mdi mdi-eye"></i>\n</button>\n</li>\n`,methods:{hidden(){return e.customNavbarHidden.includes(this.item.name)},viewBorder(e){const t=dq(`.custom-navbar li[data-name='${this.item.name}']`);if(t!==null){t.classList.toggle("view-border",e)}},toggleHidden(){const t=this.hidden();if(t===false){e.customNavbarHidden.push(this.item.name);e.customNavbarHidden=e.customNavbarHidden}else{const t=e.customNavbarHidden.indexOf(this.item.name);if(t===-1){return}e.customNavbarHidden.splice(t,1);e.customNavbarHidden=e.customNavbarHidden}this.$forceUpdate();const s=dq(`.custom-navbar li[data-name='${this.item.name}']`);if(s!==null){s.style.display=t?"flex":"none"}}}});const a=_.debounce(t=>{e.customNavbarBoundsPadding=t;document.body.style.setProperty("--navbar-bounds-padding",`0 ${t}%`)},200);new Vue({el:".custom-navbar-settings",mounted(){const t=dq(".custom-navbar-settings .order-list");const a=({sourceItem:s,targetItem:a,orderBefore:r,orderAfter:n})=>{if(r===n){return}const i=Object.entries(e.customNavbarOrder).filter(([e])=>e in customNavbarDefaultOrders);const o=i.sort((e,t)=>e[1]-t[1]).map(e=>e[0]);if(r<n){for(let t=r+1;t<=n;t++){const s=o[t];e.customNavbarOrder[s]=t-1;const a=dq(`.custom-navbar li[data-name='${s}']`);a.style.order=(t-1).toString()}}else{for(let t=r-1;t>=n;t--){const s=o[t];e.customNavbarOrder[s]=t+1;const a=dq(`.custom-navbar li[data-name='${s}']`);a.style.order=(t+1).toString()}}e.customNavbarOrder[o[r]]=n;const d=dq(`.custom-navbar li[data-name='${o[r]}']`);d.style.order=n.toString();e.customNavbarOrder=e.customNavbarOrder;t.insertBefore(s,a)};new s(t);t.addEventListener("slip:beforewait",e=>{if(e.target.classList.contains("mdi-menu")){e.preventDefault()}},false);t.addEventListener("slip:beforeswipe",e=>e.preventDefault(),false);t.addEventListener("slip:reorder",e=>{a({sourceItem:e.target,targetItem:e.detail.insertBefore,orderBefore:e.detail.originalIndex,orderAfter:e.detail.spliceIndex});return false},false)},computed:{orderList(){const s=Object.entries(e.customNavbarOrder);return s.filter(e=>e[0]in t).sort((e,t)=>e[1]-t[1]).map(e=>{return{displayName:t[e[0]],name:e[0],order:e[1]}})}},data:{boundsPadding:e.customNavbarBoundsPadding},watch:{boundsPadding(e){a(e)}},methods:{close(){dq(".custom-navbar-settings").classList.remove("show")},restoreDefault(){if(typeof customNavbarDefaultOrders==="undefined"){Toast.error("未找到默认值设定, 请更新您的脚本.","自定义顶栏",3e3);return}if(confirm("确定要恢复默认顶栏布局吗? 恢复后页面将刷新.")){this.boundsPadding=5;e.customNavbarOrder=customNavbarDefaultOrders;location.reload()}}}})},{once:true})};return{export:{initSettingsPanel:s}}}})();
|
||||
(()=>{return(e,t)=>{const s=async()=>{await SpinQuery.select(".custom-navbar-settings");const{Slip:s}=await t.importAsync("slip");const r=dq("#custom-navbar-settings");r.addEventListener("click",async()=>{const e=dq(".custom-navbar-settings");if(e){e.classList.toggle("show");dq(".gui-settings-mask").click()}});r.addEventListener("mouseover",()=>{const t={blank1:"弹性空白1",logo:"Logo",category:"主站",rankingLink:"排行",drawingLink:"相簿",musicLink:"音频",gamesIframe:"游戏中心",livesIframe:"直播",shopLink:"会员购",mangaLink:"漫画",blank2:"弹性空白2",search:"搜索框",userInfo:"用户信息",messages:"消息",activities:"动态",bangumi:"订阅",watchlaterList:"稍后再看",favoritesList:"收藏",historyList:"历史",upload:"投稿入口",blank3:"弹性空白3"};Vue.component("order-item",{props:["item"],template:`\n<li @mouseenter="viewBorder(true)"\n @mouseleave="viewBorder(false)"\n :class="{hidden: hidden()}">\n<i class="mdi mdi-menu"></i>\n {{item.displayName}}\n<button @click="toggleHidden()">\n<i v-if="hidden()" class="mdi mdi-eye-off"></i>\n<i v-else class="mdi mdi-eye"></i>\n</button>\n</li>\n`,methods:{hidden(){return e.customNavbarHidden.includes(this.item.name)},viewBorder(e){const t=dq(`.custom-navbar li[data-name='${this.item.name}']`);if(t!==null){t.classList.toggle("view-border",e)}},toggleHidden(){const t=this.hidden();if(t===false){e.customNavbarHidden.push(this.item.name)}else{const t=e.customNavbarHidden.indexOf(this.item.name);if(t===-1){return}e.customNavbarHidden.splice(t,1)}this.$forceUpdate();const s=dq(`.custom-navbar li[data-name='${this.item.name}']`);if(s!==null){s.style.display=t?"flex":"none"}e.customNavbarHidden=e.customNavbarHidden}}});const r=_.debounce(t=>{document.body.style.setProperty("--navbar-bounds-padding",`0 ${t}%`);e.customNavbarBoundsPadding=t},200);new Vue({el:".custom-navbar-settings",mounted(){const t=dq(".custom-navbar-settings .order-list");const r=({sourceItem:s,targetItem:r,orderBefore:a,orderAfter:n})=>{if(a===n){return}const i=Object.entries(e.customNavbarOrder).filter(([e])=>e in customNavbarDefaultOrders);const o=i.sort((e,t)=>e[1]-t[1]).map(e=>e[0]);if(a<n){for(let t=a+1;t<=n;t++){const s=o[t];e.customNavbarOrder[s]=t-1;const r=dq(`.custom-navbar li[data-name='${s}']`);r.style.order=(t-1).toString()}}else{for(let t=a-1;t>=n;t--){const s=o[t];e.customNavbarOrder[s]=t+1;const r=dq(`.custom-navbar li[data-name='${s}']`);r.style.order=(t+1).toString()}}e.customNavbarOrder[o[a]]=n;const d=dq(`.custom-navbar li[data-name='${o[a]}']`);d.style.order=n.toString();t.insertBefore(s,r);e.customNavbarOrder=e.customNavbarOrder};new s(t);t.addEventListener("slip:beforewait",e=>{if(e.target.classList.contains("mdi-menu")){e.preventDefault()}},false);t.addEventListener("slip:beforeswipe",e=>e.preventDefault(),false);t.addEventListener("slip:reorder",e=>{r({sourceItem:e.target,targetItem:e.detail.insertBefore,orderBefore:e.detail.originalIndex,orderAfter:e.detail.spliceIndex});return false},false)},computed:{orderList(){const s=Object.entries(e.customNavbarOrder);return s.filter(e=>e[0]in t).sort((e,t)=>e[1]-t[1]).map(e=>{return{displayName:t[e[0]],name:e[0],order:e[1]}})}},data:{boundsPadding:e.customNavbarBoundsPadding},watch:{boundsPadding(e){r(e)}},methods:{close(){dq(".custom-navbar-settings").classList.remove("show")},restoreDefault(){if(typeof customNavbarDefaultOrders==="undefined"){Toast.error("未找到默认值设定, 请更新您的脚本.","自定义顶栏",3e3);return}if(confirm("确定要恢复默认顶栏布局吗? 恢复后页面将刷新.")){this.boundsPadding=5;e.customNavbarOrder=customNavbarDefaultOrders;location.reload()}}}})},{once:true})};return{export:{initSettingsPanel:s}}}})();
|
||||
2
min/custom-navbar-subscriptions.min.js
vendored
2
min/custom-navbar-subscriptions.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(i,s)=>{const{NavbarComponent:a}=s.import("custom-navbar-component");class t extends a{constructor(){super();this.noPadding=true;const i=getUID();this.href=`https://space.bilibili.com/${i}/bangumi`;this.html="订阅";this.active=[`https://space.bilibili.com/${i}/bangumi`,`https://space.bilibili.com/${i}/cinema`,`https://space.bilibili.com/${i}/subs`].includes(document.URL.replace(/\?.*$/,""));this.popupHtml=`\n<div class="subscriptions">\n<ul class="subscriptions-tabs">\n<li class="tab" :class="{selected: bangumi}" @click="bangumi = true">追番</li>\n<li class="tab" :class="{selected: !bangumi}" @click="bangumi = false">追剧</li>\n<div class="tab-placeholder"></div>\n<a class="view-all" target="_blank" :href="'https://space.bilibili.com/${i}/' + (bangumi ? 'bangumi' : 'cinema')">\n 查看更多\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</ul>\n<div class="content">\n<transition name="subscriptions-content" mode="out-in">\n<bangumi-subscriptions v-if="bangumi" type="bangumi" :key="'bangumi'"></bangumi-subscriptions>\n<bangumi-subscriptions v-else type="cinema" :key="'cinema'"></bangumi-subscriptions>\n</transition>\n</div>\n</div>`;this.initialPopup=(()=>{this.init()})}async init(){new Vue({el:await SpinQuery.select(".custom-navbar .subscriptions"),data:{bangumi:true},components:{"bangumi-subscriptions":{props:["type"],components:{"dpi-img":()=>s.importAsync("dpi-img.vue")},template:`\n<div class="bangumi-subscriptions" :class="{center: loading || !loading && cards.length === 0}">\n<div v-if="loading" class="loading">\n<i class="mdi mdi-18px mdi-loading mdi-spin"></i>\n 加载中...\n</div>\n<div v-if="!loading && cards.length === 0" class="empty">空空如也哦 = ̄ω ̄=</div>\n<a v-if="!loading" v-for="card of cards" :key="card.id" :href="card.playUrl" target="_blank" class="bangumi-subscriptions-card">\n<dpi-img class="cover" :src="card.coverUrl" :size="{height: 64}"></dpi-img>\n<div class="card-info">\n<h1 class="title" :title="card.title">{{card.title}}</h1>\n<div class="progress-row">\n<div v-if="card.progress" class="progress" :title="card.progress + ' | ' + card.latest">{{card.progress}} | {{card.latest}}</div>\n<div v-else class="progress" :title="card.latest">{{card.latest}}</div>\n<a class="info" :href="card.mediaUrl" target="_blank" title="详细信息">\n<i class="mdi mdi-information-outline"></i>\n</a>\n</div>\n</div>\n</a>\n</div>\n`,data(){return{loading:true,cards:[]}},async mounted(){try{const i=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/space/bangumi/follow/list?type=${this.type!=="bangumi"?"2":"1"}&pn=1&ps=16&vmid=${getUID()}`);if(i.code!==0){logError(`加载订阅信息失败: ${i.message}`);return}this.cards=i.data.list.map(i=>{return{title:i.title,coverUrl:i.square_cover.replace("http:","https:"),latest:i.new_ep.index_show,progress:i.progress,id:i.season_id,playUrl:`https://www.bilibili.com/bangumi/play/ss${i.season_id}`,mediaUrl:`https://www.bilibili.com/bangumi/media/md${i.media_id}`}})}finally{this.loading=false}}}}})}get name(){return"bangumi"}}return{export:{Subscriptions:t}}}})();
|
||||
(()=>{return(i,s)=>{const{NavbarComponent:a}=s.import("custom-navbar-component");class t extends a{constructor(){super();this.boundingWidth=380;this.noPadding=true;const i=getUID();this.href=`https://space.bilibili.com/${i}/bangumi`;this.html="订阅";this.active=[`https://space.bilibili.com/${i}/bangumi`,`https://space.bilibili.com/${i}/cinema`,`https://space.bilibili.com/${i}/subs`].includes(document.URL.replace(/\?.*$/,""));this.popupHtml=`\n<div class="subscriptions">\n<ul class="subscriptions-tabs">\n<li class="tab" :class="{selected: bangumi}" @click="bangumi = true">追番</li>\n<li class="tab" :class="{selected: !bangumi}" @click="bangumi = false">追剧</li>\n<div class="tab-placeholder"></div>\n<a class="view-all" target="_blank" :href="'https://space.bilibili.com/${i}/' + (bangumi ? 'bangumi' : 'cinema')">\n 查看更多\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</ul>\n<div class="content">\n<transition name="subscriptions-content" mode="out-in">\n<bangumi-subscriptions v-if="bangumi" type="bangumi" :key="'bangumi'"></bangumi-subscriptions>\n<bangumi-subscriptions v-else type="cinema" :key="'cinema'"></bangumi-subscriptions>\n</transition>\n</div>\n</div>`;this.initialPopup=(()=>{this.init()})}async init(){new Vue({el:await SpinQuery.select(".custom-navbar .subscriptions"),data:{bangumi:true},components:{"bangumi-subscriptions":{props:["type"],components:{"dpi-img":()=>s.importAsync("dpi-img.vue")},template:`\n<div class="bangumi-subscriptions" :class="{center: loading || !loading && cards.length === 0}">\n<div v-if="loading" class="loading">\n<i class="mdi mdi-18px mdi-loading mdi-spin"></i>\n 加载中...\n</div>\n<div v-if="!loading && cards.length === 0" class="empty">空空如也哦 = ̄ω ̄=</div>\n<a v-if="!loading" v-for="card of cards" :key="card.id" :href="card.playUrl" target="_blank" class="bangumi-subscriptions-card">\n<dpi-img class="cover" :src="card.coverUrl" :size="{height: 64}"></dpi-img>\n<div class="card-info">\n<h1 class="title" :title="card.title">{{card.title}}</h1>\n<div class="progress-row">\n<div v-if="card.progress" class="progress" :title="card.progress + ' | ' + card.latest">{{card.progress}} | {{card.latest}}</div>\n<div v-else class="progress" :title="card.latest">{{card.latest}}</div>\n<a class="info" :href="card.mediaUrl" target="_blank" title="详细信息">\n<i class="mdi mdi-information-outline"></i>\n</a>\n</div>\n</div>\n</a>\n</div>\n`,data(){return{loading:true,cards:[]}},async mounted(){try{const i=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/space/bangumi/follow/list?type=${this.type!=="bangumi"?"2":"1"}&pn=1&ps=16&vmid=${getUID()}`);if(i.code!==0){logError(`加载订阅信息失败: ${i.message}`);return}this.cards=i.data.list.map(i=>{return{title:i.title,coverUrl:i.square_cover.replace("http:","https:"),latest:i.new_ep.index_show,progress:i.progress,id:i.season_id,playUrl:`https://www.bilibili.com/bangumi/play/ss${i.season_id}`,mediaUrl:`https://www.bilibili.com/bangumi/media/md${i.media_id}`}})}finally{this.loading=false}}}}})}get name(){return"bangumi"}}return{export:{Subscriptions:t}}}})();
|
||||
2
min/custom-navbar-user-info.min.js
vendored
2
min/custom-navbar-user-info.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar-watchlater-list.min.js
vendored
2
min/custom-navbar-watchlater-list.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{const{NavbarComponent:a}=i.import("custom-navbar-component");class e extends a{constructor(){super();this.noPadding=true;this.href="https://www.bilibili.com/watchlater/#/list";this.html="稍后再看";this.active=document.URL.startsWith("https://www.bilibili.com/watchlater/");this.popupHtml=`\n<div class="watchlater-list loading">\n<div class="loading-tip">\n 加载中...\n</div>\n<div class="empty-tip" v-if="filteredCards.length === 0">\n 空空如也哦 = ̄ω ̄=\n</div>\n<div class="header">\n \x3c!--<div class="operations">\n<div v-if="!redirect" class="round-button" title="播放全部"><i class="mdi mdi-play-circle-outline"></i></div>\n<div class="round-button" title="移除已观看"><i class="mdi mdi-eye-check-outline"></i></div>\n<div class="round-button" title="清空全部"><i class="mdi mdi-trash-can-outline"></i></div>\n</div>--\x3e\n<div class="search">\n<input type="text" placeholder="搜索" v-model="search">\n</div>\n<a class="more-info" href="https://www.bilibili.com/watchlater/#/list" title="查看更多" target="_blank">\n 查看更多\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</div>\n<transition-group name="cards" tag="div" class="cards">\n<div class="watchlater-card" v-for="(card, index) of filteredCards" :key="card.aid">\n<a class="cover-container" target="_blank" :href="card.href">\n<dpi-img class="cover" :src="card.coverUrl" :size="{width: 130, height: 85}"></dpi-img>\n<div class="floating remove" title="移除" @click.prevent="remove(card.aid, index)"><i class="mdi mdi-close"></i></div>\n<div class="floating duration">{{card.durationText}}</div>\n<div class="floating viewed" v-if="card.complete">\n 已观看\n</div>\n</a>\n<a class="title" target="_blank" :href="card.href" :title="card.title">{{card.title}}</a>\n<a class="up" target="_blank" :href="'https://space.bilibili.com/' + card.upID" :title="card.upName">\n<dpi-img class="face" :src="card.upFaceUrl" :size="20"></dpi-img>\n<div class="name">{{card.upName}}</div>\n</a>\n</div>\n</transition-group>\n \x3c!--<div class="undo round-button">\n<i class="mdi mdi-undo-variant"></i>\n 撤销\n</div>--\x3e\n</div>\n`;this.initialPopup=(()=>{this.init()})}async init(){new Vue({el:await SpinQuery.select(`.custom-navbar [data-name="${this.name}"] .watchlater-list`),store:store,components:{DpiImg:()=>i.importAsync("dpi-img.vue")},data:{cards:[],filteredCards:[],search:"",lastRemovedAid:0},computed:{...Vuex.mapState(["watchlaterList"])},watch:{watchlaterList(){this.updateList()},search(){this.updateFilteredCards()}},methods:{...Vuex.mapActions(["toggleWatchlater"]),async updateList(){const{getWatchlaterList:a}=await i.importAsync("watchlater-api");const e=await a(true);if(!e){this.cards=[];return}const s=e.map(i=>{const a=(()=>{if(i.pages===undefined){return t.watchLaterRedirect?`https://www.bilibili.com/video/av${i.aid}`:`https://www.bilibili.com/watchlater/#/av${i.aid}`}const a=i.pages.map(t=>t.cid);const e=i.cid===0?1:a.indexOf(i.cid)+1;return t.watchLaterRedirect?`https://www.bilibili.com/video/av${i.aid}?p=${e}`:`https://www.bilibili.com/watchlater/#/av${i.aid}/p${e}`})();const e=Math.round(1e3*i.progress/i.duration)/1e3;return{aid:i.aid,href:a,coverUrl:i.pic.replace("http:","https:"),durationText:formatDuration(i.duration),duration:i.duration,complete:i.progress<0||e>.95,title:i.title,upName:i.owner.name,upFaceUrl:i.owner.face.replace("http:","https:"),upID:i.owner.mid}});this.cards=s;if(this.search){this.updateFilteredCards()}else{this.filteredCards=s}},async remove(t,i){this.cards.splice(i,1);await this.toggleWatchlater(t);this.lastRemovedAid=t},async undo(){const t=this.lastRemovedAid;if(t!==0){await this.toggleWatchlater(t)}},updateFilteredCards:_.debounce(function(){const t=this.search.toLowerCase();const i=this.$el.querySelector(".cards");i.scrollTo(0,0);this.filteredCards=this.cards.filter(i=>{return i.title.toLowerCase().includes(t)||i.upName.toLowerCase().includes(t)})},200)},async mounted(){try{await this.updateList()}finally{this.$el.classList.remove("loading")}}})}get name(){return"watchlaterList"}}return{export:{WatchlaterList:e}}}})();
|
||||
(()=>{return(t,i)=>{const{NavbarComponent:a}=i.import("custom-navbar-component");class e extends a{constructor(){super();this.boundingWidth=380;this.noPadding=true;this.href="https://www.bilibili.com/watchlater/#/list";this.html="稍后再看";this.active=document.URL.startsWith("https://www.bilibili.com/watchlater/");this.popupHtml=`\n<div class="watchlater-list loading">\n<div class="loading-tip">\n 加载中...\n</div>\n<div class="empty-tip" v-if="filteredCards.length === 0">\n 空空如也哦 = ̄ω ̄=\n</div>\n<div class="header">\n \x3c!--<div class="operations">\n<div v-if="!redirect" class="round-button" title="播放全部"><i class="mdi mdi-play-circle-outline"></i></div>\n<div class="round-button" title="移除已观看"><i class="mdi mdi-eye-check-outline"></i></div>\n<div class="round-button" title="清空全部"><i class="mdi mdi-trash-can-outline"></i></div>\n</div>--\x3e\n<div class="search">\n<input type="text" placeholder="搜索" v-model="search">\n</div>\n<a class="more-info" href="https://www.bilibili.com/watchlater/#/list" title="查看更多" target="_blank">\n 查看更多\n<i class="mdi mdi-dots-horizontal"></i>\n</a>\n</div>\n<transition-group name="cards" tag="div" class="cards">\n<div class="watchlater-card" v-for="(card, index) of filteredCards" :key="card.aid">\n<a class="cover-container" target="_blank" :href="card.href">\n<dpi-img class="cover" :src="card.coverUrl" :size="{width: 130, height: 85}"></dpi-img>\n<div class="floating remove" title="移除" @click.prevent="remove(card.aid, index)"><i class="mdi mdi-close"></i></div>\n<div class="floating duration">{{card.durationText}}</div>\n<div class="floating viewed" v-if="card.complete">\n 已观看\n</div>\n</a>\n<a class="title" target="_blank" :href="card.href" :title="card.title">{{card.title}}</a>\n<a class="up" target="_blank" :href="'https://space.bilibili.com/' + card.upID" :title="card.upName">\n<dpi-img class="face" :src="card.upFaceUrl" :size="20"></dpi-img>\n<div class="name">{{card.upName}}</div>\n</a>\n</div>\n</transition-group>\n \x3c!--<div class="undo round-button">\n<i class="mdi mdi-undo-variant"></i>\n 撤销\n</div>--\x3e\n</div>\n`;this.initialPopup=(()=>{this.init()})}async init(){new Vue({el:await SpinQuery.select(`.custom-navbar [data-name="${this.name}"] .watchlater-list`),store:store,components:{DpiImg:()=>i.importAsync("dpi-img.vue")},data:{cards:[],filteredCards:[],search:"",lastRemovedAid:0},computed:{...Vuex.mapState(["watchlaterList"])},watch:{watchlaterList(){this.updateList()},search(){this.updateFilteredCards()}},methods:{...Vuex.mapActions(["toggleWatchlater"]),async updateList(){const{getWatchlaterList:a}=await i.importAsync("watchlater-api");const e=await a(true);if(!e){this.cards=[];return}const s=e.map(i=>{const a=(()=>{if(i.pages===undefined){return t.watchLaterRedirect?`https://www.bilibili.com/video/av${i.aid}`:`https://www.bilibili.com/watchlater/#/av${i.aid}`}const a=i.pages.map(t=>t.cid);const e=i.cid===0?1:a.indexOf(i.cid)+1;return t.watchLaterRedirect?`https://www.bilibili.com/video/av${i.aid}?p=${e}`:`https://www.bilibili.com/watchlater/#/av${i.aid}/p${e}`})();const e=Math.round(1e3*i.progress/i.duration)/1e3;return{aid:i.aid,href:a,coverUrl:i.pic.replace("http:","https:"),durationText:formatDuration(i.duration),duration:i.duration,complete:i.progress<0||e>.95,title:i.title,upName:i.owner.name,upFaceUrl:i.owner.face.replace("http:","https:"),upID:i.owner.mid}});this.cards=s;if(this.search){this.updateFilteredCards()}else{this.filteredCards=s}},async remove(t,i){this.cards.splice(i,1);await this.toggleWatchlater(t);this.lastRemovedAid=t},async undo(){const t=this.lastRemovedAid;if(t!==0){await this.toggleWatchlater(t)}},updateFilteredCards:_.debounce(function(){const t=this.search.toLowerCase();const i=this.$el.querySelector(".cards");i.scrollTo(0,0);this.filteredCards=this.cards.filter(i=>{return i.title.toLowerCase().includes(t)||i.upName.toLowerCase().includes(t)})},200)},async mounted(){try{await this.updateList()}finally{this.$el.classList.remove("loading")}}})}get name(){return"watchlaterList"}}return{export:{WatchlaterList:e}}}})();
|
||||
2
min/custom-navbar.min.css
vendored
2
min/custom-navbar.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
|
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
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{const a=["//www.bilibili.com","//t.bilibili.com","//search.bilibili.com","//space.bilibili.com","//account.bilibili.com","//pay.bilibili.com","//member.bilibili.com","//big.bilibili.com","//message.bilibili.com","//app.bilibili.com","//passport.bilibili.com","//game.bilibili.com","//live.bilibili.com/blackboard/"];const s=["//t.bilibili.com/vote/h5/index/#/result","//t.bilibili.com/lottery/h5/index/#/result","//member.bilibili.com/video/upload","//space.bilibili.com/ajax/","//www.bilibili.com/h5/comment/","//www.bilibili.com/blackboard/","//member.bilibili.com/v2"];const o=()=>{document.body.style.setProperty("--navbar-bounds-padding",`0 ${t.customNavbarBoundsPadding}%`);document.body.style.setProperty("--navbar-blur-opacity",(t.customNavbarBlurOpacity||.7).toString());addSettingsListener("customNavbarBlurOpacity",t=>{document.body.style.setProperty("--navbar-blur-opacity",t)})};const n=(t,i,a)=>{a.classList.toggle(t,i)};const e=t=>{dq(".custom-navbar").classList.toggle("dark",t);dq(".custom-navbar-settings").classList.toggle("dark",t)};return(()=>{if(isIframe()){return}o();const c=!(!a.some(t=>document.URL.includes(t))||s.some(t=>document.URL.includes(t)))||document.URL.includes("//www.bilibili.com/blackboard/bnj2020.html");if(c){document.body.classList.add("custom-navbar-loading");(async()=>{const a=await i.importAsync("customNavbarHtml");document.body.insertAdjacentHTML("beforeend",a);addSettingsListener("useDarkStyle",e,true);const s=()=>dq(".custom-navbar");["Fill","Shadow","Compact","Blur"].forEach(t=>{const i="customNavbar"+t;addSettingsListener(i,i=>n(t.toLowerCase(),i,s()),true)});SpinQuery.condition(()=>dq("#banner_link,.international-header .bili-banner"),t=>t===null?false:Boolean(t.style.backgroundImage),i=>{Observer.attributes(i,()=>{const a=dqa(".custom-navbar .blur-layer");a.forEach(t=>{t.style.backgroundImage=i.style.backgroundImage;t.setAttribute("data-image",i.style.backgroundImage)});addSettingsListener("customNavbarTransparent",i=>{if(!t.hideBanner){s().classList.toggle("transparent",i)}},true);addSettingsListener("hideBanner",i=>{if(t.customNavbarTransparent){s().classList.toggle("transparent",!i)}})})});const{Blank:o}=await i.importAsync("custom-navbar-blank");const{Logo:c}=await i.importAsync("custom-navbar-logo");const{Category:r}=await i.importAsync("custom-navbar-category");const{SimpleLink:l}=await i.importAsync("custom-navbar-simple-link");const{UserInfo:m}=await i.importAsync("custom-navbar-user-info");const{SearchBox:b}=await i.importAsync("custom-navbar-search-box");const{Iframe:u}=await i.importAsync("custom-navbar-iframe");const d=[new o(1),new c,new r,new l("排行","https://www.bilibili.com/ranking","ranking"),new l("相簿","https://h.bilibili.com","drawing"),new l("音频","https://www.bilibili.com/audio/home/","music"),new u("游戏中心","https://game.bilibili.com/",{src:`https://www.bilibili.com/page-proxy/game-nav.html`,width:`680px`,height:`260px`,lazy:true,iframeName:"games"}),new u("直播","https://live.bilibili.com",{src:`https://live.bilibili.com/blackboard/dropdown-menu.html`,width:`528px`,height:`266px`,lazy:true,iframeName:"lives"}),new l("会员购","https://show.bilibili.com","shop"),new l("漫画","https://manga.bilibili.com","manga"),new o(2),new b,new m];if(getUID()){const{WatchlaterList:t}=await i.importAsync("custom-navbar-watchlater-list");const{Messages:a}=await i.importAsync("custom-navbar-messages");const{Activities:s}=await i.importAsync("custom-navbar-activities");const{Subscriptions:o}=await i.importAsync("custom-navbar-subscriptions");const{FavoritesList:n}=await i.importAsync("custom-navbar-favorites-list");const{HistoryList:e}=await i.importAsync("custom-navbar-history-list");d.push(new a,new o,new s,new t,new n,new e)}const{Upload:p}=await i.importAsync("custom-navbar-upload");d.push(new p,new o(3));new Vue({el:".custom-navbar",data:{components:d},methods:{requestPopup(t){if(!t.requestedPopup&&!t.disabled&&!t.active){this.$set(t,`requestedPopup`,true);t.initialPopup&&t.initialPopup()}t.onPopup&&t.onPopup()}},mounted(){document.body.classList.remove("custom-navbar-loading")}})})()}return{widget:{content:`\n<div class="gui-settings-flat-button" id="custom-navbar-settings">\n<i class="mdi mdi-24px mdi-auto-fix"></i>\n<span>顶栏布局</span>\n</div>`,condition:()=>c,success:async()=>{const{initSettingsPanel:t}=await i.importAsync("custom-navbar-settings");await t()}},unload:()=>{const t=dqa(".custom-navbar,.custom-navbar-settings");t.forEach(t=>t.style.display="none");i.removeStyle("customNavbarStyle")},reload:()=>{const t=dqa(".custom-navbar,.custom-navbar-settings");t.forEach(t=>t.style.display="flex");i.applyImportantStyle("customNavbarStyle")}}})()}})();
|
||||
(()=>{return(t,i)=>{const a=["//www.bilibili.com","//t.bilibili.com","//search.bilibili.com","//space.bilibili.com","//account.bilibili.com","//pay.bilibili.com","//member.bilibili.com","//big.bilibili.com","//message.bilibili.com","//app.bilibili.com","//passport.bilibili.com","//game.bilibili.com","//live.bilibili.com/blackboard/"];const s=["//t.bilibili.com/vote/h5/index/#/result","//t.bilibili.com/lottery/h5/index/#/result","//member.bilibili.com/video/upload","//space.bilibili.com/ajax/","//www.bilibili.com/h5/comment/","//www.bilibili.com/blackboard/","//member.bilibili.com/v2"];const n=()=>{document.body.style.setProperty("--navbar-bounds-padding",`0 ${t.customNavbarBoundsPadding}%`);document.body.style.setProperty("--navbar-blur-opacity",(t.customNavbarBlurOpacity||.7).toString());addSettingsListener("customNavbarBlurOpacity",t=>{document.body.style.setProperty("--navbar-blur-opacity",t)})};const e=(t,i,a)=>{a.classList.toggle(t,i)};const o=t=>{dq(".custom-navbar").classList.toggle("dark",t);dq(".custom-navbar-settings").classList.toggle("dark",t)};return(()=>{if(isIframe()){return}n();const c=!(!a.some(t=>document.URL.includes(t))||s.some(t=>document.URL.includes(t)))||document.URL.includes("//www.bilibili.com/blackboard/bnj2020.html");if(c){document.body.classList.add("custom-navbar-loading");(async()=>{const a=await i.importAsync((()=>"customNavbarHtml")());document.body.insertAdjacentHTML("beforeend",a);addSettingsListener("useDarkStyle",o,true);const s=()=>dq(".custom-navbar");["Fill","Shadow","Compact","Blur"].forEach(t=>{const i="customNavbar"+t;addSettingsListener(i,i=>e(t.toLowerCase(),i,s()),true)});SpinQuery.condition(()=>dq("#banner_link,.international-header .bili-banner"),t=>t===null?false:Boolean(t.style.backgroundImage),i=>{Observer.attributes(i,()=>{const a=dqa(".custom-navbar .blur-layer");a.forEach(t=>{t.style.backgroundImage=i.style.backgroundImage;t.setAttribute("data-image",i.style.backgroundImage)});addSettingsListener("customNavbarTransparent",i=>{if(!t.hideBanner){s().classList.toggle("transparent",i)}},true);addSettingsListener("hideBanner",i=>{if(t.customNavbarTransparent){s().classList.toggle("transparent",!i)}})})});const{Blank:n}=await i.importAsync("custom-navbar-blank");const{Logo:c}=await i.importAsync("custom-navbar-logo");const{Category:r}=await i.importAsync("custom-navbar-category");const{SimpleLink:l}=await i.importAsync("custom-navbar-simple-link");const{UserInfo:m}=await i.importAsync("custom-navbar-user-info");const{SearchBox:b}=await i.importAsync("custom-navbar-search-box");const{Iframe:u}=await i.importAsync("custom-navbar-iframe");const d=[new n(1),new c,new r,new l("排行","https://www.bilibili.com/ranking","ranking"),new l("相簿","https://h.bilibili.com","drawing"),new l("音频","https://www.bilibili.com/audio/home/","music"),new u("游戏中心","https://game.bilibili.com/",{src:`https://www.bilibili.com/page-proxy/game-nav.html`,width:`680px`,height:`260px`,lazy:true,iframeName:"games"}),new u("直播","https://live.bilibili.com",{src:`https://live.bilibili.com/blackboard/dropdown-menu.html`,width:`528px`,height:`266px`,lazy:true,iframeName:"lives"}),new l("会员购","https://show.bilibili.com","shop"),new l("漫画","https://manga.bilibili.com","manga"),new n(2),new b,new m];if(getUID()){const{WatchlaterList:t}=await i.importAsync("custom-navbar-watchlater-list");const{Messages:a}=await i.importAsync("custom-navbar-messages");const{Activities:s}=await i.importAsync("custom-navbar-activities");const{Subscriptions:n}=await i.importAsync("custom-navbar-subscriptions");const{FavoritesList:e}=await i.importAsync("custom-navbar-favorites-list");const{HistoryList:o}=await i.importAsync("custom-navbar-history-list");d.push(new a,new n,new s,new t,new e,new o)}const{Upload:p}=await i.importAsync("custom-navbar-upload");d.push(new p,new n(3));new Vue({el:".custom-navbar",data:{components:d},methods:{async requestPopup(t){if(!t.requestedPopup&&!t.disabled&&!t.active){this.$set(t,`requestedPopup`,true);if(t.initialPopup){t.initialPopup()}}if(t.onPopup){t.onPopup()}}},mounted(){document.body.classList.remove("custom-navbar-loading");const t=()=>{d.forEach(t=>t.checkPosition())};addSettingsListener("customNavbarOrder",t,true);addSettingsListener("customNavbarHidden",t);addSettingsListener("customNavbarBoundsPadding",t);window.addEventListener("resize",t)}})})()}return{widget:{content:`\n<div class="gui-settings-flat-button" id="custom-navbar-settings">\n<i class="mdi mdi-24px mdi-auto-fix"></i>\n<span>顶栏布局</span>\n</div>`,condition:()=>c,success:async()=>{const{initSettingsPanel:t}=await i.importAsync("custom-navbar-settings");await t()}},unload:()=>{const t=dqa(".custom-navbar,.custom-navbar-settings");t.forEach(t=>t.style.display="none");i.removeStyle("customNavbarStyle")},reload:()=>{const t=dqa(".custom-navbar,.custom-navbar-settings");t.forEach(t=>t.style.display="flex");i.applyImportantStyle("customNavbarStyle")}}})()}})();
|
||||
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.min.css
vendored
2
min/dark.min.css
vendored
File diff suppressed because one or more lines are too long
1
min/default-live-quality.min.js
vendored
Normal file
1
min/default-live-quality.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(t,i)=>{(async()=>{if(!document.URL.match(/^https:\/\/live.bilibili.com\/(\d+)/)){return}const i=Resource.all.useDefaultLiveQuality.dropdown;const e=i.items;const l=t.defaultLiveQuality;const o=await SpinQuery.select(".bilibili-live-player-video-controller-switch-quality-btn");if(o===null){console.warn("qualitySettings null");return}const n=async()=>{const t=o.children[0].getAttribute("data-title");const i=dqa(o,".bilibili-live-player-video-controller-html-tooltip-option .text-btn");const n=i.map(t=>t.getAttribute("data-title"));console.log(t,n,l);if(t!==l){let t=l;while(!n.includes(t)){const i=e.indexOf(t);if(i>=e.length-1){console.log("reached lowest quality");return}t=e[i+1]}const o=i[n.indexOf(t)];console.log(o);while(!(o.classList.contains("active")||dq(".bilibili-live-player-video-controller-switch-quality-info"))){await(()=>new Promise(t=>setTimeout(()=>t(),3e3)))();o.click();console.log("click")}}};const c=Observer.childList(o,()=>{console.log(o.childElementCount);if(o.childElementCount>0){n()}})})()}})();
|
||||
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"));return e*4/188};const e=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-3*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 n=1.4-.2*t(".bilibili-player-setting-fontsize .bui-thumb");i.resolution={x:1920*n,y:1080*n};i.bottomMarginPercent=[.75,.5,.25,0,0][e(".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){const e=n();const a=new i((unsafeWindow||window).cid);await a.fetchInfo();const l=await(async()=>{if(t===true){return new Blob([await o(a.rawXML)],{type:"text/plain"})}else{return new Blob([a.rawXML],{type:"text/plain"})}})();const r=URL.createObjectURL(l);const s=dq("#danmaku-link");const c=s.getAttribute("href");if(c){URL.revokeObjectURL(c)}s.setAttribute("download",`${e}.${t?"ass":"xml"}`);s.setAttribute("href",r);s.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=dq("#danmaku-link");const e=dq("#download-danmaku");e.addEventListener("click",n=>{if(n.target!==t){try{e.disabled=true;l(n.shiftKey)}catch(t){logError(t)}finally{e.disabled=false}}})}}}}})();
|
||||
(()=>{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"));return e*4/188};const e=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=(100-parseFloat(dq(".bilibili-player-setting-opacity .bui-thumb-tooltip").innerText))/100;i.duration=(()=>{const e=18-3*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 n=1.4-.2*t(".bilibili-player-setting-fontsize .bui-thumb");i.resolution={x:1920*n,y:1080*n};i.bottomMarginPercent=[.75,.5,.25,0,0][e(".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:.4,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){const e=n();const a=new i((unsafeWindow||window).cid);await a.fetchInfo();const l=await(async()=>{if(t===true){return new Blob([await o(a.rawXML)],{type:"text/plain"})}else{return new Blob([a.rawXML],{type:"text/plain"})}})();const r=URL.createObjectURL(l);const s=dq("#danmaku-link");const c=s.getAttribute("href");if(c){URL.revokeObjectURL(c)}s.setAttribute("download",`${e}.${t?"ass":"xml"}`);s.setAttribute("href",r);s.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=dq("#danmaku-link");const e=dq("#download-danmaku");e.addEventListener("click",n=>{if(n.target!==t){try{e.disabled=true;l(n.shiftKey)}catch(t){logError(t)}finally{e.disabled=false}}})}}}}})();
|
||||
1
min/download-live-records.min.js
vendored
Normal file
1
min/download-live-records.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{return(t,o)=>{const e=()=>document.URL.replace(location.search,"").match(/https:\/\/live\.bilibili\.com\/record\/(.+)/);return{widget:{content:`\n<button class="gui-settings-flat-button" style="position: relative; z-index: 100;" id="download-live-records">\n<i class="icon-download"></i>\n<span>下载录像</span>\n</button>`,condition:async()=>{const t=e();return Boolean(t)},success:()=>{const t=dq("#download-live-records");t.addEventListener("click",async()=>{try{t.disabled=true;const o=e()[1];const n=await Ajax.getJson(`https://api.live.bilibili.com/xlive/web-room/v1/record/getLiveRecordUrl?rid=${o}&platform=html5`);if(n.code!==0){logError(new Error(`获取录像链接失败: ${n.message}`));return}const i=n.data.list.map(t=>t.url);Toast.success(i.map(t=>`<a class="download-link" target="_blank" href="${t}">${t}</a>`).join("\n"),"下载录像")}catch(t){logError(t)}finally{t.disabled=false}})}}}}})();
|
||||
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
File diff suppressed because one or more lines are too long
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
2
min/feeds-apis.min.js
vendored
2
min/feeds-apis.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{const r={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"}};const i=t=>{if(t.querySelector(".repost")){return r.repost}if(t.querySelector(".imagesbox")){return r.textWithImages}if(t.querySelector(".video-container")){return r.video}if(t.querySelector(".bangumi-container")){return r.bangumi}if(t.querySelector(".article-container")){return r.column}if(t.querySelector(".music-container")){return r.audio}if(t.querySelector(".h5share-container")){return r.share}if(t.querySelector(".vc-ctnr")){return r.miniVideo}return r.text};class n extends EventTarget{constructor(){super(...arguments);this.watching=false;this.cards=[]}addEventListener(t,e,r){super.addEventListener(t,e,r)}removeEventListener(t,e,r){super.removeEventListener(t,e,r)}async addCard(t){if(t instanceof HTMLElement&&t.classList.contains("card")){if(t.querySelector(".skeleton")!==null){const e=Observer.childList(t,()=>{if(t.querySelector(".skeleton")===null){e.stop();this.addCard(t)}})}else{const e=await this.parseCard(t);this.cards.push(e);this.cards.sort((t,e)=>{if(t.id===e.id){return 0}return t.id>e.id?-1:1});const r=new CustomEvent("addCard",{detail:e});this.dispatchEvent(r)}}}async removeCard(t){if(t instanceof HTMLElement&&t.classList.contains("card")){const e=(await this.parseCard(t)).id;const r=this.cards.findIndex(t=>t.id===e);const i=this.cards[r];this.cards.splice(r,1);const n=new CustomEvent("removeCard",{detail:i});this.dispatchEvent(n)}}async parseCard(t){const e=async e=>{const r=await SpinQuery.condition(()=>t.querySelector(e),t=>t!==null);if(r===null){console.warn(t,e);return""}const i=r.innerText.trim();return i};const n=async e=>{if(e===r.bangumi){return""}const i=await SpinQuery.condition(()=>t,t=>Boolean(t.__vue__));if(i===null){console.warn(i);return""}if(e===r.repost){const t=i.__vue__.originCardData.pureText;return i.__vue__.card.item.content+"\n"+t||""}return i.__vue__.originCardData.pureText||""};const a=async t=>{const r=parseInt(await e(t));if(isNaN(r)){return 0}return r};const s={id:t.getAttribute("data-did"),username:await e(".main-content .user-name"),text:"",reposts:await a(".button-bar .single-button:nth-child(1) .text-offset"),comments:await a(".button-bar .single-button:nth-child(2) .text-offset"),likes:await a(".button-bar .single-button:nth-child(3) .text-offset"),element:t,type:i(t),async getText(){const t=await n(this.type);this.text=t;return t}};await s.getText();t.setAttribute("data-type",s.type.id.toString());return s}async startWatching(){const t=await SpinQuery.select(".card-list .content");if(!t){return false}if(this.watching){return true}this.watching=true;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 a=new n;const s=async(t="video")=>{if(!getUID()){return[]}const e=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=${t==="video"?8:512}`);if(e.code!==0){throw new Error(e.message)}if(t==="video"){return e.data.cards.filter(t=>{return t.desc.orig_dy_id===0}).map(t=>{const e=JSON.parse(t.card);const r=_.get(t,"display.topic_info.topic_details",[]).map(t=>{return{id:t.topic_id,name:t.topic_name}});return{id:t.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:t.desc.user_profile.info.uid,upName:t.desc.user_profile.info.uname,upFaceUrl:t.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:t.timestamp,time:new Date(t.timestamp*1e3),topics:r,dynamic:e.dynamic,like:formatCount(t.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:store.state.watchlaterList.includes(e.aid)}})}else if(t==="bangumi"){return e.data.cards.map(t=>{const e=JSON.parse(t.card);return{id:t.desc.dynamic_id_str,aid:e.aid,epID:e.episode_id,title:e.new_desc,upName:e.apiSeasonInfo.title,upFaceUrl:e.apiSeasonInfo.cover,coverUrl:e.cover,description:"",timestamp:t.timestamp,time:new Date(t.timestamp*1e3),like:formatCount(t.desc.like),durationText:"",playCount:formatCount(e.play_count),danmakuCount:formatCount(e.bullet_count),watchlater:false}})}else{return[]}};return{export:{feedsCardsManager:a,feedsCardTypes:r,getVideoFeeds:s}}}})();
|
||||
(()=>{return(e,t)=>{const i={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"}};const n=e=>{if(e.querySelector(".repost")){return i.repost}if(e.querySelector(".imagesbox")){return i.textWithImages}if(e.querySelector(".video-container")){return i.video}if(e.querySelector(".bangumi-container")){return i.bangumi}if(e.querySelector(".article-container")){return i.column}if(e.querySelector(".music-container")){return i.audio}if(e.querySelector(".h5share-container")){return i.share}if(e.querySelector(".vc-ctnr")){return i.miniVideo}return i.text};class r extends EventTarget{constructor(){super(...arguments);this.watching=false;this.cards=[]}addEventListener(e,t,i){super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}async addCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){if(e.querySelector(".skeleton")!==null){const t=Observer.childList(e,()=>{if(e.querySelector(".skeleton")===null){t.stop();this.addCard(e)}})}else{const t=await this.parseCard(e);this.cards.push(t);this.cards.sort((e,t)=>{if(e.id===t.id){return 0}return e.id>t.id?-1:1});const i=new CustomEvent("addCard",{detail:t});this.dispatchEvent(i)}}}async removeCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){const t=(await this.parseCard(e)).id;const i=this.cards.findIndex(e=>e.id===t);const n=this.cards[i];this.cards.splice(i,1);const r=new CustomEvent("removeCard",{detail:n});this.dispatchEvent(r)}}async parseCard(e){const t=async t=>{const i=await SpinQuery.condition(()=>e.querySelector(t),e=>e!==null);if(i===null){console.warn(e,t);return""}const n=i.innerText.trim();return n};const r=async t=>{if(t===i.bangumi){return""}const n=await SpinQuery.condition(()=>e,e=>Boolean(e.__vue__));if(n===null){console.warn(n);return""}if(t===i.repost){const e=n.__vue__.originCardData.pureText;return n.__vue__.card.item.content+"\n"+e||""}return n.__vue__.originCardData.pureText||""};const a=async e=>{const i=parseInt(await t(e));if(isNaN(i)){return 0}return i};const s={id:e.getAttribute("data-did"),username:await t(".main-content .user-name"),text:"",reposts:await a(".button-bar .single-button:nth-child(1) .text-offset"),comments:await a(".button-bar .single-button:nth-child(2) .text-offset"),likes:await a(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:n(e),async getText(){const e=await r(this.type);this.text=e;return e}};await s.getText();e.setAttribute("data-type",s.type.id.toString());return s}async startWatching(){const e=await SpinQuery.select(".card-list .content");if(!e){return false}if(this.watching){return true}this.watching=true;const t=[...e.querySelectorAll(".content>.card")];t.forEach(e=>this.addCard(e));Observer.childList(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>this.addCard(e));e.removedNodes.forEach(e=>this.removeCard(e))})});return true}}const a=new r;const s=async(e="video")=>{if(!getUID()){return[]}const t=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=${e==="video"?8:512}`);if(t.code!==0){throw new Error(t.message)}if(e==="video"){return t.data.cards.filter(e=>{return e.desc.orig_dy_id===0}).map(e=>{const t=JSON.parse(e.card);const i=_.get(e,"display.topic_info.topic_details",[]).map(e=>{return{id:e.topic_id,name:e.topic_name}});return{id:e.desc.dynamic_id_str,aid:t.aid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(e.timestamp*1e3),topics:i,dynamic:t.dynamic,like:formatCount(e.desc.like),duration:t.duration,durationText:formatDuration(t.duration,0),playCount:formatCount(t.stat.view),danmakuCount:formatCount(t.stat.danmaku),watchlater:store.state.watchlaterList.includes(t.aid)}})}else if(e==="bangumi"){return t.data.cards.map(e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(e.timestamp*1e3),like:formatCount(e.desc.like),durationText:"",playCount:formatCount(t.play_count),danmakuCount:formatCount(t.bullet_count),watchlater:false}})}else{return[]}};return{export:{feedsCardsManager:a,feedsCardTypes:i,getVideoFeeds:s}}}})();
|
||||
2
min/feeds-filter-card.vue.min.js
vendored
2
min/feeds-filter-card.vue.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/feeds-translate-providers.min.js
vendored
2
min/feeds-translate-providers.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{class n{}class s extends n{constructor(){super(...arguments);this.name="Bing";this.link="https://translate.bing.com/"}async translate(t,e){const n="zh-Hans";let s=_.get(e,"targetLanguage",n);if(s.includes("-")&&s!==n){s=s.substring(0,s.indexOf("-"))}const a=await Ajax.monkey({url:"https://cn.bing.com/ttranslatev3",method:"POST",data:Object.entries({fromLang:"auto-detect",to:s,text:t}).map(([t,e])=>`${t}=${e}`).join("&"),headers:{"User-Agent":UserAgent,"Content-Type":"application/x-www-form-urlencoded"},responseType:"json"});const[r]=a;if(r.translations){return r.translations.map(t=>t.text).join("\n")}else{throw new Error("调用Bing翻译失败.\n"+JSON.stringify(r))}}}class a extends n{constructor(){super(...arguments);this.name="Google";this.link="https://translate.google.com/";this.apiUrl="https://translate.google.com/translate_a/single"}async translate(t,e){const n="zh";let s=_.get(e,"targetLanguage",n);if(s.includes("-")&&s!==n){s=s.substring(0,s.indexOf("-"))}const a=await Ajax.monkey({url:`${this.apiUrl}?${Object.entries({client:"gtx",sl:"auto",tl:s,dt:"t",q:encodeURIComponent(t)}).map(([t,e])=>`${t}=${e}`).join("&")}`,method:"GET",headers:{"User-Agent":UserAgent},responseType:"json"});console.log(_.flattenDeep(a),a,a[0].map(t=>t[0]).join("\n"));const r=a[0].map(t=>t[0]).join("");return r}}class r extends a{constructor(){super(...arguments);this.link="https://translate.google.cn/";this.apiUrl="https://translate.google.cn/translate_a/single"}}const o=()=>{switch(t.feedsTranslateProvider){default:case"Bing":return new s;case"Google":return new a;case"GoogleCN":return new r}};return{export:{getTranslator:o}}}})();
|
||||
(()=>{return(t,e)=>{class n{}class r extends n{constructor(){super(...arguments);this.name="Bing";this.link="https://translate.bing.com/"}async translate(t,e){const n="zh-Hans";let r=_.get(e,"targetLanguage",n);if(r.includes("-")&&r!==n){r=r.substring(0,r.indexOf("-"))}try{const e=await Ajax.monkey({url:"https://cn.bing.com/ttranslatev3",method:"POST",data:Object.entries({fromLang:"auto-detect",to:r,text:t}).map(([t,e])=>`${t}=${e}`).join("&"),headers:{"User-Agent":UserAgent,"Content-Type":"application/x-www-form-urlencoded"},responseType:"json"});const[n]=e;if(n.translations){return n.translations.map(t=>t.text).join("\n")}else{console.error("Translator: Bing",n);throw new Error("调用Bing翻译失败.")}}catch(t){console.error("Translator: Bing",t);throw new Error("调用Bing翻译失败.")}}}class s extends n{constructor(){super(...arguments);this.name="Google";this.link="https://translate.google.com/";this.apiUrl="https://translate.google.com/translate_a/single"}async translate(t,e){const n="zh";let r=_.get(e,"targetLanguage",n);if(r.includes("-")&&r!==n){r=r.substring(0,r.indexOf("-"))}try{const e=await Ajax.monkey({url:`${this.apiUrl}?${Object.entries({client:"gtx",sl:"auto",tl:r,dt:"t",q:encodeURIComponent(t)}).map(([t,e])=>`${t}=${e}`).join("&")}`,method:"GET",headers:{"User-Agent":UserAgent},responseType:"json"});const n=e[0].map(t=>t[0]).join("");return n}catch(t){console.error("Translator: Google",t);throw new Error("调用Google翻译失败.")}}}class o extends s{constructor(){super(...arguments);this.link="https://translate.google.cn/";this.apiUrl="https://translate.google.cn/translate_a/single"}}const a=()=>{switch(t.feedsTranslateProvider){default:case"Bing":return new r;case"Google":return new s;case"GoogleCN":return new o}};return{export:{getTranslator:a}}}})();
|
||||
2
min/feeds-translate.min.css
vendored
2
min/feeds-translate.min.css
vendored
@ -1 +1 @@
|
||||
.card-content .translate-container{margin-top:10px}.card-content .translate-container .translated{font-size:12px;color:#aaa}.card-content .translate-container .translated a{color:var(--theme-color)}.card-content .translate-container .translate{display:flex;align-items:center;font-size:12px;color:#aaa;cursor:pointer}.card-content .translate-container .translate:hover{color:var(--theme-color)}.card-content .translate-container .translate .mdi{font-size:14px;margin-right:2px}.card-content .translate-container .translating{font-size:18px}.card-content .translate-container .translate-result{padding-top:10px;white-space:pre-wrap;line-height:22px}
|
||||
.card-content .translate-container{margin-top:10px}.card-content .translate-container .translated{font-size:12px;color:#aaa}.card-content .translate-container .translated a{color:var(--theme-color)}.card-content .translate-container .translate{display:flex;align-items:center;font-size:12px;color:#aaa;cursor:pointer}.card-content .translate-container .translate:hover{color:var(--theme-color)}.card-content .translate-container .translate .mdi{font-size:14px;margin-right:2px}.card-content .translate-container .translating{font-size:18px}.card-content .translate-container .translate-result{padding-top:10px;padding-right:10px;white-space:pre-wrap;line-height:22px;word-break:break-all;overflow-wrap:break-word}body.dark .card-content .translate-container .translate-result{color:#eee}
|
||||
2
min/feeds-translate.min.js
vendored
2
min/feeds-translate.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,a)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com/")){return}a.applyStyle("feedsTranslateStyle");const{getTranslator:e}=await a.importAsync("feeds-translate-providers");const{feedsCardsManager:r}=await a.importAsync("feeds-apis");const n=await r.startWatching();if(!n){console.error("feedsCardsManager.startWatching() failed");return}const s=Vue.extend({template:`\n<div class="translate-container">\n<div class="translate" v-if="!working && !translated" @click="translate()">\n<i class="mdi mdi-earth"></i>翻译\n</div>\n<i v-if="working" class="translating mdi mdi-18px mdi-loading mdi-spin"></i>\n<div class="translated" v-if="translated">翻译自<a :href="activeTranslator.link" target="_blank">{{activeTranslator.name}}</a>:</div>\n<div v-if="translated" class="translate-result">{{result}}</div>\n</div>\n`,props:{card:{type:Object,required:true}},data(){return{result:"",working:false,activeTranslator:{}}},computed:{translated(){return this.result!==""}},methods:{async translate(){const a=this.card;try{this.working=true;const r=(await a.getText()).replace(/#(.+?)#/g,"");const n=this.activeTranslator=e();this.result=await n.translate(r,{targetLanguage:(()=>{if(t.i18n){return languageNameToCode[t.i18nLanguage]}if(t.feedsTranslateLanguage!==""){return t.feedsTranslateLanguage}return})()})}catch(t){logError(t)}finally{this.working=false}}}});const i=t=>{if(t.text.replace(/#(.+?)#/g,"")===""){return}const a=t.element.querySelector(".card-content");const e=new s({propsData:{card:_.clone(t)}}).$mount();a.insertAdjacentElement("beforeend",e.$el)};r.cards.forEach(i);r.addEventListener("addCard",t=>{i(t.detail)})})()}})();
|
||||
(()=>{return(t,a)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com/")){return}a.applyStyle("feedsTranslateStyle");const{getTranslator:e}=await a.importAsync("feeds-translate-providers");const r=Vue.extend({template:`\n<div class="translate-container">\n<div class="translate" v-if="!working && !translated" @click="translate()">\n<i class="mdi mdi-earth"></i>翻译\n</div>\n<i v-if="working" class="translating mdi mdi-18px mdi-loading mdi-spin"></i>\n<div class="translated" v-if="translated">翻译自<a :href="activeTranslator.link" target="_blank">{{activeTranslator.name}}</a>:</div>\n<div v-if="translated" class="translate-result">{{result}}</div>\n</div>\n`,props:{card:{type:Object,required:true}},data(){return{result:"",working:false,activeTranslator:{}}},computed:{translated(){return this.result!==""}},methods:{async translate(){const a=this.card;try{this.working=true;const r=(await a.getText()).replace(/#(.+?)#/g,"");const n=this.activeTranslator=e();this.result=await n.translate(r,{targetLanguage:(()=>{if(t.i18n){return languageNameToCode[t.i18nLanguage]}if(t.feedsTranslateLanguage!==""){return t.feedsTranslateLanguage}return})()})}catch(t){logError(t)}finally{this.working=false}}}});const n=t=>{if(t.text.replace(/#(.+?)#/g,"")===""){return}const a=t.element.querySelector(".card-content");const e=new r({propsData:{card:_.clone(t)}}).$mount();a.insertAdjacentElement("beforeend",e.$el)};const s=document.URL.replace(location.search,"");const{feedsCardsManager:i}=await a.importAsync("feeds-apis");if(s==="https://t.bilibili.com/"){const t=await i.startWatching();if(!t){console.error("feedsCardsManager.startWatching() failed");return}i.cards.forEach(n);i.addEventListener("addCard",t=>{n(t.detail)})}else if(s.match(/t.bilibili.com\/(\d+)/)){const t=await SpinQuery.select(".detail-card .card");if(t!==null&&"__vue__"in t){const a=await i.parseCard(t);n(a)}}})()}})();
|
||||
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/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/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 t={f:".bilibili-player-video-fullscreen",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"," ":".bilibili-player-video-btn-start"};let a;const n=e=>{let t=dq(".keymap-playback-tip");if(!t){const e=dq(".bilibili-player-video-wrap");if(!e){return}e.insertAdjacentHTML("afterbegin",`\n<div class="keymap-playback-tip-container">\n<i class="mdi mdi-fast-forward"></i>\n<div class="keymap-playback-tip"></div>x\n</div>\n`);i.applyStyleFromText(`\n .keymap-playback-tip-container {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n padding: 8px 16px;\n background-color: #000A;\n color: white;\n pointer-events: none;\n opacity: 0;\n z-index: 100;\n display: flex;\n align-items: center;\n font-size: 14pt;\n border-radius: 4px;\n transition: .2s ease-out;\n }\n .keymap-playback-tip-container.show {\n opacity: 1;\n }\n .keymap-playback-tip-container i {\n line-height: 1;\n margin-right: 8px;\n font-size: 18pt;\n }\n`,"keymapStyle");t=dq(".keymap-playback-tip")}t.innerHTML=e.toString();if(a){clearTimeout(a)}dq(".keymap-playback-tip-container").classList.add("show");a=setTimeout(()=>{dq(".keymap-playback-tip-container").classList.remove("show")},2e3)};document.body.addEventListener("keydown",i=>{if(document.activeElement&&["input","textarea"].includes(document.activeElement.nodeName.toLowerCase())){return}const a=i.key.toLowerCase();const o=!i.shiftKey&&!i.altKey&&!i.ctrlKey&&!i.metaKey;if(a in t&&o){const e=dq(t[a]);if(!e){return}i.stopPropagation();i.preventDefault();e.click()}else if(a==="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(a==="j"&&o){const t=dq(".bilibili-player-video video");t.currentTime+=e.keymapJumpSeconds;i.stopPropagation();i.preventDefault()}else if(i.shiftKey){const t=dq(".bilibili-player-video video");if(t===null){return}const o=[.5,.75,1,1.25,1.5,2];let l=true;if(a===">"||a==="ArrowUp".toLowerCase()){t.playbackRate=o.find(e=>e>t.playbackRate)||o[o.length-1];n(t.playbackRate)}else if(a==="<"||a==="ArrowDown".toLowerCase()){t.playbackRate=[...o].reverse().find(e=>e<t.playbackRate)||o[0];n(t.playbackRate)}else if(a==="?"){t.playbackRate=1;n(t.playbackRate)}else if(a==="w"){const e=dq(".video-toolbar .ops .watchlater,.more-ops-list .ops-watch-later");if(e!==null){e.click()}}else if(a==="j"){t.currentTime-=e.keymapJumpSeconds}else{l=false}if(l){i.stopPropagation();i.preventDefault()}}})}}})();
|
||||
(()=>{return(e,i)=>{const t=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(t.some(e=>document.URL.startsWith(e))){const t={f:".bilibili-player-video-fullscreen",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",c:".video-toolbar .coin,.tool-bar .coin-info",s:".video-toolbar .collect"," ":".bilibili-player-video-btn-start"};let n=true;let a;const o=e=>{let t=dq(".keymap-playback-tip");if(!t){const e=dq(".bilibili-player-video-wrap");if(!e){return}e.insertAdjacentHTML("afterbegin",`\n<div class="keymap-playback-tip-container">\n<i class="mdi mdi-fast-forward"></i>\n<div class="keymap-playback-tip"></div>x\n</div>\n`);i.applyStyleFromText(`\n .keymap-playback-tip-container {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n padding: 8px 16px;\n background-color: #000A;\n color: white;\n pointer-events: none;\n opacity: 0;\n z-index: 100;\n display: flex;\n align-items: center;\n font-size: 14pt;\n border-radius: 4px;\n transition: .2s ease-out;\n }\n .keymap-playback-tip-container.show {\n opacity: 1;\n }\n .keymap-playback-tip-container i {\n line-height: 1;\n margin-right: 8px;\n font-size: 18pt;\n }\n`,"keymapStyle");t=dq(".keymap-playback-tip")}t.innerHTML=e.toString();if(a){clearTimeout(a)}dq(".keymap-playback-tip-container").classList.add("show");a=setTimeout(()=>{dq(".keymap-playback-tip-container").classList.remove("show")},2e3)};document.body.addEventListener("keydown",i=>{if(document.activeElement&&["input","textarea"].includes(document.activeElement.nodeName.toLowerCase())){return}const a=i.key.toLowerCase();const l=!i.shiftKey&&!i.altKey&&!i.ctrlKey&&!i.metaKey;if(a in t&&l){const e=dq(t[a]);if(!e){return}i.stopPropagation();i.preventDefault();e.click()}else if(a==="d"&&l){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(a==="j"&&l){const t=dq(".bilibili-player-video video");t.currentTime+=e.keymapJumpSeconds;i.stopPropagation();i.preventDefault()}else if(a==="l"&&l){const e=dq(".video-toolbar .like");i.preventDefault();const t=(i,t)=>{const n=new CustomEvent(i,t);e.dispatchEvent(n)};n=true;setTimeout(()=>n=false,200);t("mousedown",i);document.body.addEventListener("keyup",e=>{e.preventDefault();t("mouseup",e);if(n){t("click",e)}},{once:true})}else if(i.shiftKey){const t=dq(".bilibili-player-video video");if(t===null){return}const n=[.5,.75,1,1.25,1.5,2,2.5,3];let l=true;if(a===">"||a==="ArrowUp".toLowerCase()){t.playbackRate=n.find(e=>e>t.playbackRate)||n[n.length-1];o(t.playbackRate)}else if(a==="<"||a==="ArrowDown".toLowerCase()){t.playbackRate=[...n].reverse().find(e=>e<t.playbackRate)||n[0];o(t.playbackRate)}else if(a==="?"){t.playbackRate=1;o(t.playbackRate)}else if(a==="w"){const e=dq(".video-toolbar .ops .watchlater,.more-ops-list .ops-watch-later");if(e!==null){e.click()}}else if(a==="j"){t.currentTime-=e.keymapJumpSeconds}else{l=false}if(l){i.stopPropagation();i.preventDefault()}}})}}})();
|
||||
2
min/live-socket.min.js
vendored
2
min/live-socket.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/medal-helper.min.js
vendored
2
min/medal-helper.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/outer-watchlater.min.js
vendored
2
min/outer-watchlater.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{(async()=>{if(!document.URL.includes("//www.bilibili.com/video/av")){return}await SpinQuery.condition(()=>dq(".video-toolbar .ops .collect"),t=>{return t!==null&&t.innerText!=="--"});const t=dq(".video-toolbar .ops .collect");if(!t){return}t.insertAdjacentHTML("afterend",`\n<span title='稍后再看' class='watchlater' :class="{on: isInWatchlater}" @click="toggle()">\n<i class='mdi mdi-timetable'></i>\n 稍后再看\n<div class='tip' :class="{show: tipShowing}">{{tipText}}</div>\n</span>\n`);const i=dq(".ops .watchlater");const e=dq(".ops .watchlater .tip");if(!i||!e){return}const a=new Vue({el:i,store:store,data:{aid:unsafeWindow.aid,tipText:"",tipShowing:false,tipHandle:0},computed:{...Vuex.mapState(["watchlaterList"]),isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))}},methods:{...Vuex.mapActions(["toggleWatchlater"]),showTip(t){this.tipText=t;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout(()=>{this.tipShowing=false},2e3)},async toggle(){await this.toggleWatchlater(this.aid);this.showTip(this.isInWatchlater?"已添加至稍后再看":"已从稍后再看移除")}}});Observer.videoChange(()=>{a.aid=unsafeWindow.aid})})()}})();
|
||||
(()=>{return(t,i)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")){return}await SpinQuery.condition(()=>dq(".video-toolbar .ops .collect"),t=>{return t!==null&&t.innerText!=="--"});const t=dq(".video-toolbar .ops .collect");if(!t){return}t.insertAdjacentHTML("afterend",`\n<span title='稍后再看' class='watchlater' :class="{on: isInWatchlater}" @click="toggle()">\n<i class='mdi mdi-timetable'></i>\n 稍后再看\n<div class='tip' :class="{show: tipShowing}">{{tipText}}</div>\n</span>\n`);const i=dq(".ops .watchlater");const e=dq(".ops .watchlater .tip");if(!i||!e){return}const a=new Vue({el:i,store:store,data:{aid:unsafeWindow.aid,tipText:"",tipShowing:false,tipHandle:0},computed:{...Vuex.mapState(["watchlaterList"]),isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))}},methods:{...Vuex.mapActions(["toggleWatchlater"]),showTip(t){this.tipText=t;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout(()=>{this.tipShowing=false},2e3)},async toggle(){await this.toggleWatchlater(this.aid);this.showTip(this.isInWatchlater?"已添加至稍后再看":"已从稍后再看移除")}}});Observer.videoChange(()=>{a.aid=unsafeWindow.aid})})()}})();
|
||||
2
min/rank-list.vue.min.js
vendored
2
min/rank-list.vue.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/remove-promotions.min.css
vendored
2
min/remove-promotions.min.css
vendored
@ -1 +1 @@
|
||||
#home_popularize .adpos,#home_popularize .l-con,#reportFirst2 .extension,#slide_ad,.activity-m,.bili-header-m .nav-menu .nav-con .nav-item .text-red,.bilibili-player-promote-wrap,.gg-floor-module,.gg-window .operate-card,.home-app-download,.international-home .banner-card,.mascot,.mobile-link-l,.video-page-game-card,.video-page-special-card,body.remove-game-match-module #reportFirst3,body.remove-game-match-module .bili-wrapper>.home-match{display:none!important}#home_popularize{position:relative!important}.gg-window .online,.popularize-module .online{position:absolute!important;top:50%!important;right:.5%!important;transform:translateY(-100%)!important}.gg-window .online{right:0!important;padding:0 16px!important}#reportFirst2{position:relative;margin-bottom:4px}.blocked-ads{width:440px;height:220px;display:flex;color:#888;background-color:#8882;font-size:24pt;font-weight:700;align-items:center;justify-content:space-evenly}.blocked-ads.new{width:459px;height:202px}body.compact .blocked-ads{width:480px;height:240px}
|
||||
#home_popularize .adpos,#home_popularize .l-con,#reportFirst2 .extension,#slide_ad,.bili-header-m .nav-menu .nav-con .nav-item .text-red,.bilibili-player-promote-wrap,.gg-floor-module,.gg-window .operate-card,.home-app-download,.international-home .banner-card,.mascot,.mobile-link-l,.video-page-game-card,.video-page-special-card,body.remove-game-match-module #reportFirst3,body.remove-game-match-module .bili-wrapper>.home-match,body:not(.preserve-event-banner) .activity-m{display:none!important}#home_popularize{position:relative!important}.gg-window .online,.popularize-module .online{position:absolute!important;top:50%!important;right:.5%!important;transform:translateY(-100%)!important}.gg-window .online{right:0!important;padding:0 16px!important}#reportFirst2{position:relative;margin-bottom:4px}.blocked-ads{width:440px;height:220px;display:flex;color:#888;background-color:#8882;font-size:24pt;font-weight:700;align-items:center;justify-content:space-evenly}.blocked-ads.new{width:459px;height:202px}body.compact .blocked-ads{width:480px;height:240px}
|
||||
2
min/remove-promotions.min.js
vendored
2
min/remove-promotions.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://www.bilibili.com/"){addSettingsListener("removeGameMatchModule",e=>{document.body.classList.toggle("remove-game-match-module",e)},true);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(t=>{if(!t){return}[...t.querySelectorAll(".gg-icon")].map(e=>e.parentElement.parentElement).forEach(t=>{t.style.display="none";t.insertAdjacentHTML("afterend",`\n<div class="blocked-ads new">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`)})})}}})();
|
||||
(()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://www.bilibili.com/"){addSettingsListener("removeGameMatchModule",e=>{document.body.classList.toggle("remove-game-match-module",e)},true);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 s=n.parentElement.parentElement.querySelector(`.pic li:nth-child(${l})`);if(s){s.style.display="flex";const t=s.querySelector("a:not(.more-text)");t.insertAdjacentHTML("afterend",`\n<div class="blocked-ads">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`);t.style.visibility="hidden";s.querySelector("a.more-text").style.display="none";s.querySelector("img").style.display="none"}})});SpinQuery.select(".gg-carousel.home-slide").then(t=>{if(!t){return}[...t.querySelectorAll(".gg-icon")].map(e=>e.parentElement.parentElement).forEach(t=>{t.style.display="none";t.insertAdjacentHTML("afterend",`\n<div class="blocked-ads new">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`)})})}addSettingsListener("preserveEventBanner",e=>{document.body.classList.toggle("preserve-event-banner",e)},true)}})();
|
||||
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 i="remove-live-watermark";const l=`\n.bilibili-live-player-video-logo\n{\n display: none !important;\n}\n`;return n.toggleStyle(l,i)}})();
|
||||
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/simple-home-bangumi-category.vue.min.js
vendored
2
min/simple-home-bangumi-category.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(i,e)=>{const a=`<div class=bangumi-category :class="{'rank-loading': rank.loading, 'timeline-loading': timeline.loading}"><bangumi-timeline class=timeline :type=timelineType @load="timeline.loading = false"@error="timeline.error = true"></bangumi-timeline><rank-list :videos=rank.videos view-mode=bangumi></rank-list><div class="timeline loading"></div><div class="rank loading"></div></div>`;e.applyStyleFromText(`.simple-home .bangumi-category{display:grid;--total-height:1010px;--rank-width:350px;--rank-height:calc(var(--rank-width) / 16 * 10);grid-template:"timeline rank" 1fr/1fr var(--rank-width);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}@media screen and (min-width:1800px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1500px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1200px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1700px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1400px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1100px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1600px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1300px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1000px){.simple-home .bangumi-category{--rank-width:395px}}.simple-home .bangumi-category,.simple-home .bangumi-category *,.simple-home .bangumi-category ::after,.simple-home .bangumi-category ::before{transition:.2s ease-out}.simple-home .bangumi-category .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.simple-home .bangumi-category .timeline{grid-area:timeline}.simple-home .bangumi-category.timeline-loading .timeline.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.timeline-loading .timeline:not(.loading){opacity:0;pointer-events:none}.simple-home .bangumi-category .rank{height:var(--total-height);grid-area:rank}.simple-home .bangumi-category.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}`,"simple-home-bangumi-category-style");return{export:Object.assign({template:a},{components:{BangumiTimeline:()=>e.importAsync("bangumi-timeline.vue"),RankList:()=>e.importAsync("rank-list.vue")},props:["rid"],data(){return{timeline:{error:false,loading:true},rank:{error:false,loading:true,videos:[]}}},computed:{timelineType(){return this.rid===13?"global":"chinese"}},watch:{rid(){this.loadRankList()}},methods:{async loadRankList(){const{RegionCodes:i}=await e.importAsync("category-regions");const a=this.rid===i.bangumi?`https://api.bilibili.com/pgc/web/rank/list?season_type=1&day=3`:`https://api.bilibili.com/pgc/web/rank/list?season_type=4&day=3`;try{const i=await Ajax.getJson(a);if(i.code!==0){throw new Error(i.message)}const e=i.result.list.map(i=>{return{id:i.season_id,href:i.url,coverUrl:i.new_ep.cover.replace("http:","https:"),title:i.title,points:i.pts,epTitle:i.new_ep.index_show,playCount:i.stat.view,danmakuCount:i.stat.danmaku,watchlater:null}});this.rank.videos=e.slice(0,10)}catch(i){logError(i);this.rank.error=true}finally{this.rank.loading=false}}},mounted(){this.loadRankList()}})}}})();
|
||||
(()=>{return(i,e)=>{const a=`<div class=bangumi-category :class="{'rank-loading': rank.loading, 'timeline-loading': timeline.loading}"><bangumi-timeline class=timeline :type=timelineType @load="timeline.loading = false"@error="timeline.error = true"></bangumi-timeline><rank-list :videos=rank.videos view-mode=bangumi :rank-link=rankLink></rank-list><div class="timeline loading"></div><div class="rank loading"></div></div>`;e.applyStyleFromText(`.simple-home .bangumi-category{display:grid;--total-height:1010px;--rank-width:350px;--rank-height:calc(var(--rank-width) / 16 * 10);grid-template:"timeline rank" 1fr/1fr var(--rank-width);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}@media screen and (min-width:1800px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1500px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1200px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1700px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1400px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1100px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1600px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1300px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1000px){.simple-home .bangumi-category{--rank-width:395px}}.simple-home .bangumi-category,.simple-home .bangumi-category *,.simple-home .bangumi-category ::after,.simple-home .bangumi-category ::before{transition:.2s ease-out}.simple-home .bangumi-category .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.simple-home .bangumi-category .timeline{grid-area:timeline}.simple-home .bangumi-category.timeline-loading .timeline.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.timeline-loading .timeline:not(.loading){opacity:0;pointer-events:none}.simple-home .bangumi-category .rank{height:var(--total-height);grid-area:rank}.simple-home .bangumi-category.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}`,"simple-home-bangumi-category-style");return{export:Object.assign({template:a},{components:{BangumiTimeline:()=>e.importAsync("bangumi-timeline.vue"),RankList:()=>e.importAsync("rank-list.vue")},props:["rid"],data(){return{timeline:{error:false,loading:true},rank:{error:false,loading:true,videos:[]}}},computed:{timelineType(){return this.rid===13?"global":"chinese"},rankLink(){return this.rid===13?"https://www.bilibili.com/ranking/bangumi/13/0/3":"https://www.bilibili.com/ranking/bangumi/167/0/3"}},watch:{rid(){this.loadRankList()}},methods:{async loadRankList(){const{RegionCodes:i}=await e.importAsync("category-regions");const a=this.rid===i.bangumi?`https://api.bilibili.com/pgc/web/rank/list?season_type=1&day=3`:`https://api.bilibili.com/pgc/web/rank/list?season_type=4&day=3`;try{const i=await Ajax.getJson(a);if(i.code!==0){throw new Error(i.message)}const e=i.result.list.map(i=>{return{id:i.season_id,href:i.url,coverUrl:i.new_ep.cover.replace("http:","https:"),title:i.title,points:i.pts,epTitle:i.new_ep.index_show,playCount:i.stat.view,danmakuCount:i.stat.danmaku,watchlater:null}});this.rank.videos=e.slice(0,10)}catch(i){logError(i);this.rank.error=true}finally{this.rank.loading=false}}},mounted(){this.loadRankList()}})}}})();
|
||||
2
min/simple-home-categories.vue.min.js
vendored
2
min/simple-home-categories.vue.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/simple-home-feeds.vue.min.js
vendored
2
min/simple-home-feeds.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const a=`<div class=feeds><div class=header><div class=tabs><div class=title>动态</div><div class=tab v-for="tab in tabs":key=tab.type @click=changeTab(tab) :class="{active: currentTab === tab}"><div class=tab-name>{{tab.name}}</div></div></div><a class=online target=_blank href=https://www.bilibili.com/video/online.html>在线人数: {{online}}</a><a class=more href=//t.bilibili.com/ target=_blank><icon type=home icon=activity></icon>全部动态</a></div><div class=contents><div class=card-wrapper v-for="card in feedCards":key=card.id><video-card :data=card orientation=vertical></video-card></div><div class=empty v-if="feedCards.length === 0">没有动态哦(´・_・\`)</div></div></div>`;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:2;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})();
|
||||
(()=>{return(e,t)=>{const a=`<div class=feeds><div class=header><div class=tabs><div class=title>动态</div><div class=tab v-for="tab in tabs":key=tab.type @click=changeTab(tab) :class="{active: currentTab === tab}"><div class=tab-name>{{tab.name}}</div></div></div><a class=online target=_blank href=https://www.bilibili.com/video/online.html>在线人数: {{online}}</a><a class=more href=//t.bilibili.com/ target=_blank><icon type=home icon=activity></icon>全部动态</a></div><div class=contents><div class=card-wrapper v-for="card in feedCards":key=card.id><video-card :data=card orientation=vertical></video-card></div><div class=empty v-if="feedCards.length === 0">没有动态哦(´・_・\`)</div></div></div>`;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})();
|
||||
2
min/simple-home-normal-category.vue.min.js
vendored
2
min/simple-home-normal-category.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{const e=`<div class=category-view :class="{'new-activity-loading': newActivity.loading,'new-post-loading': newPost.loading,'rank-loading': rank.loading}"><slideshow-cards class=new-activity :cards=newActivity.videos :error=newActivity.error :show-stat=true @refresh=loadNewActivity() title=有新动态></slideshow-cards><slideshow-cards class=new-post :cards=newPost.videos :error=newPost.errors :show-stat=false @refresh=loadNewPost() title=最新发布></slideshow-cards><rank-list :videos=rank.videos></rank-list><div class="new-activity loading"></div><div class="new-post loading"></div><div class="rank loading"></div></div>`;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})();
|
||||
(()=>{return(t,i)=>{const e=`<div class=category-view :class="{'new-activity-loading': newActivity.loading,'new-post-loading': newPost.loading,'rank-loading': rank.loading}"><slideshow-cards class=new-activity :cards=newActivity.videos :error=newActivity.error :show-stat=true @refresh=loadNewActivity() title=有新动态></slideshow-cards><slideshow-cards class=new-post :cards=newPost.videos :error=newPost.errors :show-stat=false @refresh=loadNewPost() title=最新发布></slideshow-cards><rank-list :videos=rank.videos :rank-link=rankLink></rank-list><div class="new-activity loading"></div><div class="new-post loading"></div><div class="rank loading"></div></div>`;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"]),rankLink(){if(this.rid===165){return null}return`https://www.bilibili.com/ranking/all/${this.rid}/0/3`}},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})();
|
||||
2
min/simple-home.vue.min.js
vendored
2
min/simple-home.vue.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/simplify-liveroom.min.css
vendored
2
min/simplify-liveroom.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/theme-colors.min.js
vendored
2
min/theme-colors.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,r)=>{const t={red:"#e57373",pink:"#F06292",purple:"#BA68C8",deepPurple:"#9575CD",indigo:"#7986CB",blue:"#2196F3",lightBlue:"#00A0D8",cyan:"#00ACC1",teal:"#26A69A",green:"#81C784",lightGreen:"#9CCC65",orange:"#FF9800",deepOrange:"#FF7043",brown:"#A1887F",grey:"#757575",blueGrey:"#78909C"};class o{constructor(){this.reloadColor=(()=>{const e=document.querySelector("html");return function(r){const t=new ColorProcessor(r);const o=e=>t.rgbToString(t.hexToRgba(e));e.style.setProperty("--theme-color",r);for(let t=10;t<=90;t+=10){e.style.setProperty(`--theme-color-${t}`,o(r+t))}e.style.setProperty("--foreground-color",t.foreground);e.style.setProperty("--foreground-color-b",o(t.foreground+"b"));e.style.setProperty("--foreground-color-d",o(t.foreground+"d"));e.style.setProperty("--blue-image-filter",t.blueImageFilter);e.style.setProperty("--pink-image-filter",t.pinkImageFilter);e.style.setProperty("--brightness",t.brightness);e.style.setProperty("--invert-filter",t.filterInvert)}})()}setupDom(){const e=document.querySelector(`input[key='customStyleColor']`);e.addEventListener("change",()=>{this.reloadColor(e.value)});const r=document.querySelector(".predefined-colors-grid");for(const o of Object.values(t)){const t=document.createElement("div");r.insertAdjacentElement("beforeend",t);t.classList.add("predefined-colors-grid-block");t.style.background=o;t.setAttribute("data-color",o);t.addEventListener("click",r=>{const t=r.target.getAttribute("data-color");e.value=t;raiseEvent(e,"input");raiseEvent(e,"change")})}const o=document.querySelector(".predefined-colors");document.querySelector("div.custom-color-preview").addEventListener("click",()=>{o.classList.toggle("opened")})}}return{export:{ThemeColors:o}}}})();
|
||||
(()=>{return(e,t)=>{const r={red:"#e57373",pink:"#F06292",purple:"#BA68C8",deepPurple:"#9575CD",indigo:"#7986CB",blue:"#2196F3",lightBlue:"#00A0D8",cyan:"#00ACC1",teal:"#26A69A",green:"#81C784",lightGreen:"#9CCC65",orange:"#FF9800",deepOrange:"#FF7043",brown:"#A1887F",grey:"#757575",blueGrey:"#78909C"};class o{constructor(){this.reloadColor=(()=>{const e=document.querySelector("html");return function(t){const r=new ColorProcessor(t);const o=e=>r.rgbToString(r.hexToRgba(e));e.style.setProperty("--theme-color",t);for(let r=10;r<=90;r+=10){e.style.setProperty(`--theme-color-${r}`,o(t+r))}e.style.setProperty("--foreground-color",r.foreground);e.style.setProperty("--foreground-color-b",o(r.foreground+"b"));e.style.setProperty("--foreground-color-d",o(r.foreground+"d"));e.style.setProperty("--blue-image-filter",r.blueImageFilter);e.style.setProperty("--pink-image-filter",r.pinkImageFilter);e.style.setProperty("--brightness",r.brightness);e.style.setProperty("--invert-filter",r.filterInvert)}})()}setupDom(){const t=document.querySelector(`input[key='customStyleColor']`);addSettingsListener("customStyleColor",e=>this.reloadColor(e));addSettingsListener("foregroundColorMode",()=>this.reloadColor(e.customStyleColor));const o=document.querySelector(".predefined-colors-grid");for(const e of Object.values(r)){const r=document.createElement("div");o.insertAdjacentElement("beforeend",r);r.classList.add("predefined-colors-grid-block");r.style.background=e;r.setAttribute("data-color",e);r.addEventListener("click",e=>{const r=e.target.getAttribute("data-color");t.value=r;raiseEvent(t,"input");raiseEvent(t,"change")})}const l=document.querySelector(".predefined-colors");document.querySelector("div.custom-color-preview").addEventListener("click",()=>{l.classList.toggle("opened")})}}return{export:{ThemeColors: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 r(e,t=true,i={}){const r=new Date;const l={title:document.title.replace(/:([^:]+?)_番剧_bilibili_哔哩哔哩/,"").replace(/:([^:]+?)_国创_bilibili_哔哩哔哩/,"").replace(/:([^:]+?)_电影_bilibili_哔哩哔哩/,"").replace(/:([^:]+?)_纪录片_bilibili_哔哩哔哩/,"").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(/(.*?) - (.*?) - 哔哩哔哩直播,二次元弹幕直播平台/,"$1").trim(),ep:(()=>{if(!t){return}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")}})(),aid:unsafeWindow.aid,cid:unsafeWindow.cid,lid:document.URL.replace(/https:\/\/live\.bilibili\.com\/(\d+).*/,"$1"),y:r.getFullYear().toString(),M:(r.getMonth()+1).toString().padStart(2,"0"),d:r.getDate().toString().padStart(2,"0"),h:r.getHours().toString().padStart(2,"0"),m:r.getMinutes().toString().padStart(2,"0"),s:r.getSeconds().toString().padStart(2,"0"),ms:r.getMilliseconds().toString().substr(0,3)};Object.assign(l,i);const n=Object.keys(l).reduce((e,t)=>{return e.replace(new RegExp(`\\[([^\\[\\]]*?)${t}([^\\[\\]]*?)\\]`,"g"),l[t]?`$1${l[t]}$2`:"")},e);return n.replace(/[\/\\:\*\?"<>\|]/g," ")}function l(t=true){if(e.filenameFormat===undefined){return i(t)}return r(e.filenameFormat,t)}return{export:{getFriendlyTitle:l,formatTitle:r}}}})();
|
||||
(()=>{return(t,e)=>{function i(t=true){const e=document.title.replace("_番剧_bilibili_哔哩哔哩","").replace("_电影_bilibili_哔哩哔哩","").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(" - 哔哩哔哩直播,二次元弹幕直播平台","").replace(/[\/\\:\*\?"<>\|]/g," ").trim();if(!t||document.URL.indexOf("/bangumi")!==-1){return e}else{const t=document.querySelector("#multi_page .cur-list>ul li.on a");if(t===null){return e}else{const i=t.getAttribute("title");return e+" - "+i}}}function r(t,e=true,i={}){const r=new Date;const n={title:document.title.replace(/:([^:]+?)_(番剧|国创|电影|纪录片|电视剧)_bilibili_哔哩哔哩/,"").replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","").replace(/(.*?) - (.*?) - 哔哩哔哩直播,二次元弹幕直播平台/,"$1").trim(),ep:(()=>{if(!e){return}const t=dq("#eplist_module li.cursor .ep-title");if(t!==null){return t.innerText}const i=document.querySelector("#multi_page .cur-list>ul li.on a");if(i!==null){return i.getAttribute("title")}})(),aid:unsafeWindow.aid,cid:unsafeWindow.cid,lid:document.URL.replace(/https:\/\/live\.bilibili\.com\/(\d+).*/,"$1"),y:r.getFullYear().toString(),M:(r.getMonth()+1).toString().padStart(2,"0"),d:r.getDate().toString().padStart(2,"0"),h:r.getHours().toString().padStart(2,"0"),m:r.getMinutes().toString().padStart(2,"0"),s:r.getSeconds().toString().padStart(2,"0"),ms:r.getMilliseconds().toString().substr(0,3)};Object.assign(n,i);const l=Object.keys(n).reduce((t,e)=>{return t.replace(new RegExp(`\\[([^\\[\\]]*?)${e}([^\\[\\]]*?)\\]`,"g"),n[e]?`$1${n[e]}$2`:"")},t);return l.replace(/[\/\\:\*\?"<>\|]/g," ")}function n(e=true){if(t.filenameFormat===undefined){return i(e)}return r(t.filenameFormat,e)}return{export:{getFriendlyTitle:n,formatTitle:r}}}})();
|
||||
2
min/trending-videos.vue.min.js
vendored
2
min/trending-videos.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(a,t)=>{const i=`<div class=trendings><div class=header><div class=title>热门</div><div class=tabs><div class=tab v-for="tab in tabs":key=tab.day @click=changeTab(tab) :class="{active: currentTab === tab}"><div class=tab-name>{{tab.name}}</div></div></div></div><div class=contents><div class=card-wrapper v-for="card in trendingCards":key=card.id><video-card :data=card orientation=vertical></video-card></div></div></div>`;t.applyStyleFromText(`.simple-home .trendings{display:flex;flex-direction:column}.simple-home .trendings .header{padding:0 8px}.simple-home .trendings .contents{--card-width:200px;--card-height:250px;--card-count:3;margin-top:16px;display:flex;overflow:auto;height:calc(var(--card-height) + 16px);width:calc((var(--card-width) + 16px) * var(--card-count));scrollbar-width:none!important}@media screen and (max-width:1300px) and (min-width:900px){.simple-home .trendings .contents{--card-count:2}}@media screen and (max-width:1100px) and (min-width:900px){.simple-home .trendings .contents{--card-count:1}}@media screen and (min-width:1550px){.simple-home .trendings .contents{--card-count:4}}.simple-home .trendings .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .trendings .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}`,"trending-videos-style");const n=[{name:"今日",day:1,url:"https://www.bilibili.com/ranking/all/0/0/1"},{name:"三日",day:3,url:"https://www.bilibili.com/ranking"},{name:"一周",day:7,url:"https://www.bilibili.com/ranking/all/0/0/7"}];return{export:Object.assign({template:i},{components:{VideoCard:()=>t.importAsync("video-card.vue")},data(){return{tabs:n,currentTab:n[0],trendingCards:[]}},watch:{currentTab(a){this.updateTrendingTab(a)}},methods:{async updateTrendingTab(a){const{getTrendingVideos:i}=await t.importAsync("trending-videos");this.trendingCards=await i(a.day)},changeTab(a){if(this.currentTab===a){open(a.url,"_blank")}else{this.currentTab=a}}},mounted(){this.updateTrendingTab(this.currentTab)}})}}})();
|
||||
(()=>{return(a,t)=>{const i=`<div class=trendings><div class=header><div class=title>热门</div><div class=tabs><div class=tab v-for="tab in tabs":key=tab.day @click=changeTab(tab) :class="{active: currentTab === tab}"><div class=tab-name>{{tab.name}}</div></div></div></div><div class=contents><div class=card-wrapper v-for="card in trendingCards":key=card.id><video-card :data=card orientation=vertical></video-card></div></div></div>`;t.applyStyleFromText(`.simple-home .trendings{display:flex;flex-direction:column}.simple-home .trendings .header{padding:0 8px}.simple-home .trendings .contents{--card-width:200px;--card-height:250px;--card-count:3;margin-top:16px;display:flex;overflow:auto;height:calc(var(--card-height) + 16px);width:calc((var(--card-width) + 16px) * var(--card-count));scrollbar-width:none!important}@media screen and (max-width:1300px) and (min-width:900px){.simple-home .trendings .contents{--card-count:2}}@media screen and (max-width:1100px) and (min-width:900px){.simple-home .trendings .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .trendings .contents{--card-count:4}}.simple-home .trendings .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .trendings .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}`,"trending-videos-style");const n=[{name:"今日",day:1,url:"https://www.bilibili.com/ranking/all/0/0/1"},{name:"三日",day:3,url:"https://www.bilibili.com/ranking"},{name:"一周",day:7,url:"https://www.bilibili.com/ranking/all/0/0/7"}];return{export:Object.assign({template:i},{components:{VideoCard:()=>t.importAsync("video-card.vue")},data(){return{tabs:n,currentTab:n[0],trendingCards:[]}},watch:{currentTab(a){this.updateTrendingTab(a)}},methods:{async updateTrendingTab(a){const{getTrendingVideos:i}=await t.importAsync("trending-videos");this.trendingCards=await i(a.day)},changeTab(a){if(this.currentTab===a){open(a.url,"_blank")}else{this.currentTab=a}}},mounted(){this.updateTrendingTab(this.currentTab)}})}}})();
|
||||
2
min/url-params-clean.min.js
vendored
2
min/url-params-clean.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const r=["spm_id_from","from_source","from","seid","share_source","share_medium","bbid","ts","rt","tdsourcetag"];const s=()=>{const e=location.search.substring(1).split("&");const t=e.filter(e=>{if(r.some(t=>e.startsWith(`${t}=`))){return false}return true});if(e.length!==t.length){const e=t.join("&");const r=document.URL.replace(location.search,e?"?"+e:"");console.log("[URL params clean]",document.URL,r);history.replaceState({},document.title,r)}};s();Observer.videoChange(()=>s())}})();
|
||||
(()=>{return(t,e)=>{const s=["spm_id_from","from_source","from","seid","share_source","share_medium","share_plat","share_tag","bbid","ts","timestamp","unique_k","rt","tdsourcetag"];const o=t=>t.endsWith("/")?_.trimEnd(t,"/"):t;const r=()=>{const t=location.search.substring(1).split("&");const e=t.filter(t=>{if(s.some(e=>t.startsWith(`${e}=`))){return false}return true});const r=e.join("&");const n=o(document.URL.replace(location.search,""));const c=r?"?"+r:"";const a=n+c;if(a!==document.URL){console.log("[URL params clean]",document.URL,a);history.replaceState({},document.title,a)}};r();Observer.videoChange(()=>r())}})();
|
||||
2
min/video-dash.min.js
vendored
2
min/video-dash.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();const o=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(o)]};const o=async(t,a)=>{const r=await Ajax.getJsonWithCredentials(t);const o=r.data||r.result||r;if(r.code!==0||!o.dash){throw new Error("DASH api failed")}const d=o.accept_quality;if(!d.includes(a)){throw new Error("没有找到请求的清晰度")}if(o.quality!==a){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const s=o.accept_description;const c=s[d.indexOf(a)];const n=o.dash.duration;const i=o.dash.video.filter(t=>t.id===a).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:c,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:n,videoCodec:e};return r});const h=o.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:n}});return{videoDashes:i,audioDashes:h}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
|
||||
(()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();const o=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(o)]};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const d=o.data||o.result||o;if(o.code!==0||!d.dash){throw new Error("DASH api failed")}const s=d.accept_quality;if(!s.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(d.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=d.accept_description;const n=c[s.indexOf(a)];const i=d.dash.duration;const h=d.dash.video.filter(t=>t.id===(r?d.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const l=d.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:l}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
|
||||
2
min/video-info.min.js
vendored
2
min/video-info.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic;this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t;const i=(new DOMParser).parseFromString(t,"application/xml").documentElement;this.xml=i;this.danmakus=[...i.querySelectorAll("d[p]")].map(t=>{return new a(t.innerHTML,t.getAttribute("p"))})}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})();
|
||||
(()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic;this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})();
|
||||
2
min/watchlater.min.js
vendored
2
min/watchlater.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{const i=e=>{const t=e.match(/(av[\d]+)\/p([\d]+)/);if(t){return`https://www.bilibili.com/video/${t[1]}/?p=${t[2]}`}else{return"javascript:;"}};const r=e=>{const t=e.map(e=>{const t=e.getAttribute("href");if(!t){return"javascript:;"}if(t.match(/.*watchlater.*|javascript:;/g)){return i(t)}if(t.indexOf("video/av")!==-1){return t}});e.forEach((e,i)=>{e.setAttribute("href",t[i]);e.setAttribute("target","_blank")})};const a=(...e)=>{for(const t of e){SpinQuery.select(()=>document.querySelectorAll(t),e=>r([...e]))}};SpinQuery.select(".watch-later-list").then(()=>{Observer.childListSubtree("#viewlater-app",()=>{SpinQuery.condition(()=>document.URL.match(/(av[\d]+)\/p([\d]+)/),e=>e&&document.URL.indexOf("watchlater")!==-1,()=>{const e=i(document.URL);if(e!==null){window.location.assign(e)}});SpinQuery.select("#viewlater-app .s-btn[href='#/']",e=>e.remove());a(".av-pic",".av-about>a")})});SpinQuery.select("li.nav-item[report-id*=watchlater]").then(()=>{Observer.childListSubtree("li.nav-item[report-id*=watchlater]",()=>{a(".av-item>a",".av-about>a","div.watch-later-m>ul>div>li>a");SpinQuery.select(".read-more.mr",e=>e.remove());SpinQuery.select(".read-more-grp>.read-more",e=>{e.style.width="auto";e.style.float="none"})})});SpinQuery.select(".van-popper-favorite").then(async e=>{if(!e){return}const t=Observer.childListSubtree(e,()=>{const i=e.querySelector(".play-all");if(i){const e="//www.bilibili.com/watchlater/#/list";Observer.attributes(i,()=>{if(i.getAttribute("href")==="//www.bilibili.com/watchlater/"){i.setAttribute("href",e);i.firstChild.classList.remove("bili-icon_dingdao_bofang");i.firstChild.classList.add("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="查看全部"}else if(i.getAttribute("href")!==e){i.firstChild.classList.add("bili-icon_dingdao_bofang");i.firstChild.classList.remove("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="播放全部"}});t.forEach(e=>e.stop())}})})}})();
|
||||
(()=>{return(t,e)=>{const i=t=>{const e=t.match(/(av[\d]+)\/p([\d]+)/i)||t.match(/(BV[\w]+)\/p([\d]+)/i);if(e){return`https://www.bilibili.com/video/${e[1]}/?p=${e[2]}`}else{return"javascript:;"}};const r=t=>{const e=t.map(t=>{const e=t.getAttribute("href");if(!e){return"javascript:;"}if(e.match(/.*watchlater.*|javascript:;/g)){return i(e)}if(e.match(/video\/av|video\/BV/i)){return e}});t.forEach((t,i)=>{t.setAttribute("href",e[i]);t.setAttribute("target","_blank")})};const a=(...t)=>{for(const e of t){SpinQuery.select(()=>document.querySelectorAll(e),t=>r([...t]))}};SpinQuery.select(".watch-later-list").then(()=>{Observer.childListSubtree("#viewlater-app",()=>{SpinQuery.condition(()=>document.URL.match(/(av[\d]+)\/p([\d]+)/i)||document.URL.match(/(BV[\w]+)\/p([\d]+)/i),t=>t&&document.URL.indexOf("watchlater")!==-1,()=>{const t=i(document.URL);if(t!==null){window.location.assign(t)}});SpinQuery.select("#viewlater-app .s-btn[href='#/']",t=>t.remove());a(".av-pic",".av-about>a")})});SpinQuery.select("li.nav-item[report-id*=watchlater]").then(()=>{Observer.childListSubtree("li.nav-item[report-id*=watchlater]",()=>{a(".av-item>a",".av-about>a","div.watch-later-m>ul>div>li>a");SpinQuery.select(".read-more.mr",t=>t.remove());SpinQuery.select(".read-more-grp>.read-more",t=>{t.style.width="auto";t.style.float="none"})})});SpinQuery.select(".van-popper-favorite").then(async t=>{if(!t){return}const e=Observer.childListSubtree(t,()=>{const i=t.querySelector(".play-all");if(i){const t="//www.bilibili.com/watchlater/#/list";Observer.attributes(i,()=>{if(i.getAttribute("href")==="//www.bilibili.com/watchlater/"){i.setAttribute("href",t);i.firstChild.classList.remove("bili-icon_dingdao_bofang");i.firstChild.classList.add("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="查看全部"}else if(i.getAttribute("href")!==t){i.firstChild.classList.add("bili-icon_dingdao_bofang");i.firstChild.classList.remove("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="播放全部"}});e.forEach(t=>t.stop())}})})}})();
|
||||
@ -1,5 +1,6 @@
|
||||
(async () => {
|
||||
if (document.domain !== 't.bilibili.com' && document.domain !== 'space.bilibili.com') {
|
||||
if (!document.URL.startsWith('https://t.bilibili.com') &&
|
||||
!document.URL.startsWith('space.bilibili.com')) {
|
||||
return
|
||||
}
|
||||
const unlock = (container: Element) => {
|
||||
|
||||
@ -3,19 +3,7 @@ import { VideoCardInfo } from '../style/simplify-home/video-card-info'
|
||||
export interface FeedsCardType {
|
||||
id: number
|
||||
name: string
|
||||
// getText: (element: HTMLElement) => Promise<string>
|
||||
}
|
||||
// const getOriginalElement = async (element: Element) => {
|
||||
// const originalElement = await SpinQuery.condition(
|
||||
// () => element.querySelector('.card-content > .text.description'),
|
||||
// it => it !== null
|
||||
// ) as HTMLElement
|
||||
// if (originalElement === null) {
|
||||
// return ''
|
||||
// }
|
||||
// const text = originalElement.style.display === 'none' ? '' : originalElement.textContent!.trim()
|
||||
// return text
|
||||
// }
|
||||
export const feedsCardTypes = {
|
||||
repost: {
|
||||
id: 1,
|
||||
@ -53,6 +41,30 @@ export const feedsCardTypes = {
|
||||
id: 2048,
|
||||
name: '分享',
|
||||
} as FeedsCardType,
|
||||
manga: {
|
||||
id: 2049,
|
||||
name: '漫画',
|
||||
} as FeedsCardType,
|
||||
film: {
|
||||
id: 4098,
|
||||
name: '电影',
|
||||
} as FeedsCardType,
|
||||
tv: {
|
||||
id: 4099,
|
||||
name: 'TV剧',
|
||||
} as FeedsCardType,
|
||||
chinese: {
|
||||
id: 4100,
|
||||
name: '国创',
|
||||
} as FeedsCardType,
|
||||
documentary: {
|
||||
id: 4101,
|
||||
name: '纪录片',
|
||||
} as FeedsCardType,
|
||||
mediaList: {
|
||||
id: 4300,
|
||||
name: '收藏夹',
|
||||
} as FeedsCardType,
|
||||
}
|
||||
export interface FeedsCard {
|
||||
id: string
|
||||
@ -152,51 +164,9 @@ class FeedsCardsManager extends EventTarget {
|
||||
console.warn(element, selector)
|
||||
return ''
|
||||
}
|
||||
// const subElementText = subElement.style.display === 'none' ? '' : subElement.textContent!.trim()
|
||||
const subElementText = subElement.innerText.trim()
|
||||
return subElementText
|
||||
}
|
||||
// const getComplexText = async () => {
|
||||
// // if ([
|
||||
// // feedsCardTypes.column,
|
||||
// // ].some(it => it === type)) {
|
||||
// // const text = await getSimpleText(selector)
|
||||
// // return text
|
||||
// // }
|
||||
// let repostText = ''
|
||||
// const repost = await SpinQuery.condition(
|
||||
// () => element.querySelector('.original-card-content'),
|
||||
// it => {
|
||||
// if (it === null) {
|
||||
// return false
|
||||
// }
|
||||
// if (getFeedsCardType(it) === feedsCardTypes.column) {
|
||||
// return true
|
||||
// }
|
||||
// const bangumiContent = it.querySelector('.bangumi-container .title') as HTMLElement
|
||||
// if (bangumiContent) {
|
||||
// repostText = bangumiContent.innerText
|
||||
// }
|
||||
// const repostContent = it.querySelector('.text.description') as HTMLElement
|
||||
// const videoContent = it.querySelector('.video-container .title') as HTMLElement
|
||||
// if (repostContent && videoContent) {
|
||||
// repostText = repostContent.innerText + '\n' + videoContent.innerText
|
||||
// return Boolean(videoContent.innerText)
|
||||
// }
|
||||
// if (repostContent) {
|
||||
// repostText = repostContent.innerText
|
||||
// }
|
||||
// return Boolean(repostText)
|
||||
// },
|
||||
// ) as HTMLElement
|
||||
// const text = await getSimpleText('.video-container .title,.bangumi-container .title,.text.description')
|
||||
// if (getFeedsCardType(repost) === feedsCardTypes.column) {
|
||||
// // debugger
|
||||
// console.log(element, repost, text)
|
||||
// }
|
||||
// // console.log(repost, repost && repost.innerText, subElementText)
|
||||
// return repost ? (text + '\n' + repostText).trim() : text
|
||||
// }
|
||||
const getComplexText = async (type: FeedsCardType) => {
|
||||
if (type === feedsCardTypes.bangumi) {
|
||||
return ''
|
||||
@ -275,10 +245,6 @@ export const getVideoFeeds = async (type: 'video' | 'bangumi' = 'video'): Promis
|
||||
throw new Error(json.message)
|
||||
}
|
||||
if (type === 'video') {
|
||||
// const { getWatchlaterList } = await import(
|
||||
// '../video/watchlater-api'
|
||||
// )
|
||||
// const watchlaterList = await getWatchlaterList()
|
||||
return json.data.cards.filter((c: any) => {
|
||||
// 合作视频仅取UP主的
|
||||
return c.desc.orig_dy_id === 0
|
||||
|
||||
@ -175,6 +175,10 @@ export default {
|
||||
return
|
||||
}
|
||||
this.allTypes = Object.entries(feedsCardTypes)
|
||||
.filter(([name, type]) => type.id <= 2048)
|
||||
.map(([name, type]) => {
|
||||
return [name, _.clone(type)]
|
||||
})
|
||||
feedsCardsManager.cards.forEach(card => this.updateCard(card))
|
||||
feedsCardsManager.addEventListener('addCard', (e) => {
|
||||
const card = e.detail
|
||||
|
||||
@ -4,10 +4,15 @@
|
||||
| 2^0 | 2^1 | 2^2 | 2^3 | 2^4 | 2^5 | 2^6 | 2^7 |
|
||||
| 转发 | 图文 | 文字 | 投稿视频 | 小视频 | ??? | 专栏 | 无效 |
|
||||
|
||||
| 256 | 512 | 1024 | 2048 | 4098(不是4096) | 8192 | 16384 | 32768 |
|
||||
| -------- | ---- | ---- | ---- | -------------- | ---- | ----- | ----- |
|
||||
| 2^8 | 2^9 | 2^10 | 2^11 | 2^12 + 2 | 2^13 | 2^14 | 2^15 |
|
||||
| 投稿音频 | 番剧 | ??? | 分享 | 电影 | 无效 | 无效 | 无效 |
|
||||
| 256 | 512 | 1024 | 2048 | 2049 | 4098 | 4099 |
|
||||
| -------- | ---- | ---- | ---- | -------- | -------- | -------- |
|
||||
| 2^8 | 2^9 | 2^10 | 2^11 | 2^11 + 1 | 2^12 + 2 | 2^12 + 3 |
|
||||
| 投稿音频 | 番剧 | 无效 | 分享 | 漫画 | 电影 | TV剧 |
|
||||
|
||||
| 4100 | 4101 | 4300 | 4302 | 4303 | 8192 | 16384 | 32768 |
|
||||
| -------- | -------- | ------ | ---- | -------- | ---- | ----- | ----- |
|
||||
| 2^12 + 4 | 2^12 + 5 | \ | \ | \ | 2^13 | 2^14 | 2^15 |
|
||||
| 国创 | 纪录片 | 收藏夹 | 课程 | 课程更新 | 无效 | 无效 | 无效 |
|
||||
|
||||
| 65536 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 |
|
||||
| ----- | ------ | ------ | ------ | ------- | ------- | ------- | ------- |
|
||||
|
||||
@ -15,6 +15,7 @@ class BingTranslate extends FeedsTranslateProvider {
|
||||
if (targetLanguage.includes('-') && targetLanguage !== defaultLanguage) {
|
||||
targetLanguage = targetLanguage.substring(0, targetLanguage.indexOf('-'))
|
||||
}
|
||||
try {
|
||||
const response = await Ajax.monkey({
|
||||
url: 'https://cn.bing.com/ttranslatev3',
|
||||
method: 'POST',
|
||||
@ -33,7 +34,12 @@ class BingTranslate extends FeedsTranslateProvider {
|
||||
if (result.translations) {
|
||||
return (result.translations as any[]).map(t => t.text as string).join('\n')
|
||||
} else {
|
||||
throw new Error('调用Bing翻译失败.\n' + JSON.stringify(result))
|
||||
console.error('Translator: Bing', result)
|
||||
throw new Error('调用Bing翻译失败.')
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Translator: Bing', error)
|
||||
throw new Error('调用Bing翻译失败.')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -48,6 +54,7 @@ class GoogleTranslate extends FeedsTranslateProvider {
|
||||
if (targetLanguage.includes('-') && targetLanguage !== defaultLanguage) {
|
||||
targetLanguage = targetLanguage.substring(0, targetLanguage.indexOf('-'))
|
||||
}
|
||||
try {
|
||||
const response = await Ajax.monkey({
|
||||
url: `${this.apiUrl}?${Object.entries({
|
||||
client: 'gtx',
|
||||
@ -62,9 +69,13 @@ class GoogleTranslate extends FeedsTranslateProvider {
|
||||
},
|
||||
responseType: 'json',
|
||||
})
|
||||
console.log(_.flattenDeep(response), response, response[0].map((it: any) => it[0]).join('\n'))
|
||||
// console.log(_.flattenDeep(response), response, response[0].map((it: any) => it[0]).join('\n'))
|
||||
const result = response[0].map((it: any) => it[0]).join('')
|
||||
return result
|
||||
} catch (error) {
|
||||
console.error('Translator: Google', error)
|
||||
throw new Error('调用Google翻译失败.')
|
||||
}
|
||||
}
|
||||
}
|
||||
class GoogleCNTranslate extends GoogleTranslate {
|
||||
|
||||
@ -26,7 +26,13 @@
|
||||
}
|
||||
.translate-result {
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
white-space: pre-wrap;
|
||||
line-height: 22px;
|
||||
word-break: break-all;
|
||||
overflow-wrap: break-word;
|
||||
body.dark & {
|
||||
color: #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,12 +6,6 @@ import { FeedsCard } from '../feeds-apis'
|
||||
}
|
||||
resources.applyStyle('feedsTranslateStyle')
|
||||
const { getTranslator } = await import('./feeds-translate-providers')
|
||||
const { feedsCardsManager } = await import('../feeds-apis')
|
||||
const success = await feedsCardsManager.startWatching()
|
||||
if (!success) {
|
||||
console.error('feedsCardsManager.startWatching() failed')
|
||||
return
|
||||
}
|
||||
const Translator = Vue.extend({
|
||||
template: /*html*/`
|
||||
<div class="translate-container">
|
||||
@ -79,8 +73,26 @@ import { FeedsCard } from '../feeds-apis'
|
||||
}).$mount()
|
||||
cardContent.insertAdjacentElement('beforeend', translator.$el)
|
||||
}
|
||||
|
||||
const urlWithoutQuery = document.URL.replace(location.search, '')
|
||||
const { feedsCardsManager } = await import('../feeds-apis')
|
||||
// 动态首页
|
||||
if (urlWithoutQuery === 'https://t.bilibili.com/') {
|
||||
const success = await feedsCardsManager.startWatching()
|
||||
if (!success) {
|
||||
console.error('feedsCardsManager.startWatching() failed')
|
||||
return
|
||||
}
|
||||
feedsCardsManager.cards.forEach(injectButton)
|
||||
feedsCardsManager.addEventListener('addCard', e => {
|
||||
injectButton(e.detail)
|
||||
})
|
||||
} else if (urlWithoutQuery.match(/t.bilibili.com\/(\d+)/)) { // 动态详情页
|
||||
const card = await SpinQuery.select('.detail-card .card')
|
||||
if (card !== null && '__vue__' in card) {
|
||||
const feedsCard = await feedsCardsManager.parseCard(card)
|
||||
injectButton(feedsCard)
|
||||
}
|
||||
}
|
||||
|
||||
})()
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview)
|
||||
// @version 1.10.6
|
||||
// @version 1.10.12
|
||||
// @description Bilibili Evolved 的预览版, 可以抢先体验新功能.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -76,6 +76,42 @@ Object.entries({
|
||||
})
|
||||
// GM4 polyfill end
|
||||
|
||||
// Safari EventTarget polyfill
|
||||
window.EventTarget = class EventTarget {
|
||||
constructor() {
|
||||
this.listeners = {}
|
||||
}
|
||||
addEventListener(type, callback) {
|
||||
if (!(type in this.listeners)) {
|
||||
this.listeners[type] = []
|
||||
}
|
||||
this.listeners[type].push(callback)
|
||||
}
|
||||
removeEventListener(type, callback) {
|
||||
if (!(type in this.listeners)) {
|
||||
return
|
||||
}
|
||||
let stack = this.listeners[type]
|
||||
for (let i = 0, l = stack.length; i < l; i++) {
|
||||
if (stack[i] === callback) {
|
||||
stack.splice(i, 1)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
dispatchEvent(event) {
|
||||
if (!(event.type in this.listeners)) {
|
||||
return true
|
||||
}
|
||||
let stack = this.listeners[event.type].slice()
|
||||
for (let i = 0, l = stack.length; i < l; i++) {
|
||||
stack[i].call(this, event)
|
||||
}
|
||||
return !event.defaultPrevented
|
||||
}
|
||||
}
|
||||
// Safari EventTarget polyfill end
|
||||
|
||||
import { logError, raiseEvent, loadLazyPanel, contentLoaded, fixed, isOffline, getUID, scriptVersion, getCsrf, formatCount, escapeFilename } from './utils'
|
||||
import { settings, loadSettings, settingsChangeHandlers } from './settings'
|
||||
import { Ajax, setupAjaxHook } from './ajax'
|
||||
@ -92,7 +128,7 @@ import { resourceManifest } from './resource-manifest'
|
||||
import { StyleManager } from './style-manager'
|
||||
import { ResourceManager } from './resource-manager'
|
||||
import { getScriptBlocker } from './script-blocker'
|
||||
import { installStyle, uninstallStyle } from './custom-styles'
|
||||
import { installStyle, uninstallStyle, toggleStyle } from './custom-styles'
|
||||
import { store } from './store'
|
||||
|
||||
;(async () => {
|
||||
@ -226,6 +262,7 @@ import { store } from './store'
|
||||
escapeFilename,
|
||||
installStyle,
|
||||
uninstallStyle,
|
||||
toggleStyle,
|
||||
store,
|
||||
resources,
|
||||
theWorld: waitTime => {
|
||||
@ -290,7 +327,7 @@ import { store } from './store'
|
||||
case '同时(自动)':
|
||||
{
|
||||
const delayLoads = [
|
||||
'//www.bilibili.com/video/av',
|
||||
'//www.bilibili.com/video/',
|
||||
'//www.bilibili.com/bangumi/play',
|
||||
]
|
||||
if (delayLoads.some(it => document.URL.includes(it))) {
|
||||
|
||||
@ -97,10 +97,17 @@ export class ColorProcessor {
|
||||
}
|
||||
get foreground () {
|
||||
const color = this.rgb
|
||||
const mode = settings.foregroundColorMode
|
||||
if (mode === '自动' || mode === undefined) {
|
||||
if (color && this.grey < 0.35) {
|
||||
return '#000'
|
||||
}
|
||||
return '#fff'
|
||||
} else if (mode === '黑色') {
|
||||
return '#000'
|
||||
} else if (mode === '白色') {
|
||||
return '#fff'
|
||||
}
|
||||
}
|
||||
makeImageFilter (originalRgb) {
|
||||
const { h, s } = this.rgbToHsb(originalRgb)
|
||||
|
||||
@ -33,3 +33,21 @@ export const uninstallStyle = name => {
|
||||
console.log(`已卸载自定义样式.`)
|
||||
}
|
||||
}
|
||||
export const toggleStyle = name => {
|
||||
const style = settings.customStyles.find(it => it.name === name || it.displayName === name)
|
||||
if (style) {
|
||||
style.enabled = !style.enabled
|
||||
settings.customStyles = settings.customStyles
|
||||
const styleManager = unsafeWindow.bilibiliEvolved.resources.styleManager
|
||||
if (style.enabled) {
|
||||
const id = styleManager.getDefaultStyleId(style.name)
|
||||
styleManager[style.mode === 'important' ? 'applyImportantStyleFromText' : 'applyStyleFromText'](style.style, id)
|
||||
} else {
|
||||
const style = dq(`#${styleManager.getDefaultStyleId(name)}`)
|
||||
if (style) {
|
||||
style.remove()
|
||||
}
|
||||
}
|
||||
console.log(`已${style.enabled ? '开启' : '关闭'}自定义样式: ${style.displayName || style.name}`)
|
||||
}
|
||||
}
|
||||
@ -376,10 +376,6 @@ export class ResourceManager {
|
||||
manifests.push(it)
|
||||
}
|
||||
})
|
||||
manifests.push({
|
||||
key: 'scriptLoadingMode',
|
||||
items: ['同时', '延后', '同时(自动)', '延后(自动)']
|
||||
})
|
||||
await Promise.all(manifests.map(it => applyDropdownOption(it)))
|
||||
}
|
||||
toggleStyle (content, id) {
|
||||
|
||||
@ -95,11 +95,22 @@ Resource.manifest = {
|
||||
ajaxHook: '启用 Ajax Hook API',
|
||||
scriptLoadingMode: '加载模式',
|
||||
guiSettingsDockSide: '设置面板停靠位置',
|
||||
foregroundColorMode: '文本颜色',
|
||||
},
|
||||
dropdown: {
|
||||
dropdown: [
|
||||
{
|
||||
key: 'guiSettingsDockSide',
|
||||
items: ['左侧', '右侧']
|
||||
},
|
||||
{
|
||||
key: 'foregroundColorMode',
|
||||
items: ['自动', '黑色', '白色'],
|
||||
},
|
||||
{
|
||||
key: 'scriptLoadingMode',
|
||||
items: ['同时', '延后', '同时(自动)', '延后(自动)']
|
||||
},
|
||||
],
|
||||
},
|
||||
useDarkStyle: {
|
||||
path: 'dark-styles.min.js',
|
||||
@ -187,6 +198,7 @@ Resource.manifest = {
|
||||
removeAds: '删除广告',
|
||||
showBlockedAdsTip: '显示占位文本',
|
||||
removeGameMatchModule: '删除电竞赛事',
|
||||
preserveEventBanner: '保留活动横幅',
|
||||
}
|
||||
},
|
||||
watchLaterRedirect: {
|
||||
@ -820,6 +832,30 @@ Resource.manifest = {
|
||||
displayNames: {
|
||||
recordLiveDanmaku: '直播弹幕记录器',
|
||||
},
|
||||
}
|
||||
},
|
||||
useDefaultLiveQuality: {
|
||||
path: 'default-live-quality.min.js',
|
||||
displayNames: {
|
||||
useDefaultLiveQuality: '使用默认直播画质',
|
||||
defaultLiveQuality: '默认直播画质',
|
||||
},
|
||||
dropdown: {
|
||||
key: 'defaultLiveQuality',
|
||||
items: ['原画', '蓝光', '超清', '高清', '流畅'],
|
||||
},
|
||||
},
|
||||
downloadLiveRecords: {
|
||||
path: 'download-live-records.min.js',
|
||||
displayNames: {
|
||||
downloadLiveRecords: '下载直播录像',
|
||||
},
|
||||
},
|
||||
bvidConvert: {
|
||||
path: 'bvid-convert.min.js',
|
||||
style: true,
|
||||
displayNames: {
|
||||
bvidConvert: 'BV号转换',
|
||||
},
|
||||
},
|
||||
}
|
||||
export const resourceManifest = Resource.manifest
|
||||
|
||||
@ -192,7 +192,6 @@ export const settings = {
|
||||
selectableColumnText: true,
|
||||
downloadVideoFormat: 'flv',
|
||||
downloadVideoDashCodec: 'AVC/H.264',
|
||||
watchlaterExpireWarnings: true,
|
||||
watchlaterExpireWarningDays: 14,
|
||||
superchatTranslate: false,
|
||||
miniPlayerTouchMove: false,
|
||||
@ -213,8 +212,13 @@ export const settings = {
|
||||
feedsTranslateProvider: 'Bing',
|
||||
feedsTranslateLanguage: '',
|
||||
downloadVideoQuality: 120,
|
||||
forceHighQualityLive: false,
|
||||
defaultLiveQuality: '原画',
|
||||
useDefaultLiveQuality: false,
|
||||
recordLiveDanmaku: false,
|
||||
foregroundColorMode: '自动',
|
||||
preserveEventBanner: false,
|
||||
about: true,
|
||||
bvidConvert: true,
|
||||
cache: {},
|
||||
}
|
||||
const fixedSettings = {
|
||||
@ -229,7 +233,6 @@ const fixedSettings = {
|
||||
downloadAudio: true,
|
||||
downloadLiveRecords: true,
|
||||
medalHelper: true,
|
||||
about: true,
|
||||
playerLayout: false,
|
||||
forceWide: false,
|
||||
useNewStyle: false,
|
||||
@ -239,6 +242,7 @@ const fixedSettings = {
|
||||
showDeadVideoTitle: false,
|
||||
blurVideoControl: false,
|
||||
oldTweets: false,
|
||||
watchlaterExpireWarnings: false,
|
||||
latestVersionLink: 'https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/bilibili-evolved.preview.user.js',
|
||||
currentVersion: GM.info.script.version,
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ export const store = (() => {
|
||||
},
|
||||
mutations: {
|
||||
toggleWatchlater (state, { aid, add }) {
|
||||
console.log(state.watchlaterList, aid, add)
|
||||
if (typeof aid === 'string') {
|
||||
aid = parseInt(aid)
|
||||
}
|
||||
@ -41,21 +42,7 @@ export const store = (() => {
|
||||
}
|
||||
}
|
||||
},
|
||||
// addToWatchlater (state, aid) {
|
||||
// console.log('add', aid)
|
||||
// if (!state.watchlaterList.includes(aid)) {
|
||||
// state.watchlaterList.push(aid)
|
||||
// }
|
||||
// },
|
||||
// removeFromWatchlater (state, aid) {
|
||||
// console.log('remove', aid)
|
||||
// const index = state.watchlaterList.indexOf(aid)
|
||||
// if (index !== -1) {
|
||||
// state.watchlaterList.splice(index, 1)
|
||||
// }
|
||||
// },
|
||||
updateWatchlaterList (state, list) {
|
||||
// console.log('updateWatchlaterList', list)
|
||||
state.watchlaterList = list
|
||||
state.watchlaterListCached = true
|
||||
}
|
||||
@ -65,7 +52,7 @@ export const store = (() => {
|
||||
const list = await getWatchlaterList()
|
||||
commit('updateWatchlaterList', list)
|
||||
},
|
||||
toggleWatchlater ({ commit, state }, aid) {
|
||||
async toggleWatchlater ({ commit, state }, aid) {
|
||||
if (typeof aid === 'string') {
|
||||
aid = parseInt(aid)
|
||||
}
|
||||
@ -74,28 +61,14 @@ export const store = (() => {
|
||||
aid,
|
||||
add,
|
||||
})
|
||||
toggle(aid, add).catch(error => {
|
||||
await toggle(aid, add).catch(error => {
|
||||
logError(error)
|
||||
commit('toggleWatchlater', {
|
||||
aid,
|
||||
add,
|
||||
add: !add
|
||||
})
|
||||
})
|
||||
}
|
||||
// addToWatchlater ({ commit }, aid) {
|
||||
// commit('addToWatchlater', aid)
|
||||
// toggleWatchlater(aid, true).catch(error => {
|
||||
// logError(error)
|
||||
// commit('removeFromWatchlater', aid)
|
||||
// })
|
||||
// },
|
||||
// removeFromWatchlater ({ commit }, aid) {
|
||||
// commit('removeFromWatchlater', aid)
|
||||
// toggleWatchlater(aid, false).catch(error => {
|
||||
// logError(error)
|
||||
// commit('addToWatchlater', aid)
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
})()
|
||||
|
||||
46
src/live/default-live-quality.ts
Normal file
46
src/live/default-live-quality.ts
Normal file
@ -0,0 +1,46 @@
|
||||
(async () => {
|
||||
if (!document.URL.match(/^https:\/\/live.bilibili.com\/(\d+)/)) {
|
||||
return
|
||||
}
|
||||
const dropdown = Resource.all.useDefaultLiveQuality.dropdown as Dropdown
|
||||
const qualities = dropdown.items as (typeof settings.defaultLiveQuality)[]
|
||||
const targetQuality = settings.defaultLiveQuality
|
||||
|
||||
const qualitySettings = await SpinQuery.select('.bilibili-live-player-video-controller-switch-quality-btn') as HTMLElement
|
||||
if (qualitySettings === null) {
|
||||
console.warn('qualitySettings null')
|
||||
return
|
||||
}
|
||||
const setQuality = async () => {
|
||||
const currentQuality = qualitySettings.children[0].getAttribute('data-title') as string
|
||||
const qualityButtons = dqa(qualitySettings, '.bilibili-live-player-video-controller-html-tooltip-option .text-btn') as HTMLElement[]
|
||||
const availableQualities = qualityButtons.map(it => it.getAttribute('data-title') as string)
|
||||
console.log(currentQuality, availableQualities, targetQuality)
|
||||
if (currentQuality !== targetQuality) {
|
||||
let quality = targetQuality
|
||||
while (!availableQualities.includes(quality)) { // 支持的清晰度里没有设定好的那个清晰度, 就从设定的清晰度往下降
|
||||
const index = qualities.indexOf(quality)
|
||||
if (index >= qualities.length - 1) { // 已经是最低清晰度, 取消执行
|
||||
console.log('reached lowest quality')
|
||||
return
|
||||
}
|
||||
quality = qualities[index + 1]
|
||||
}
|
||||
const button = qualityButtons[availableQualities.indexOf(quality)]
|
||||
console.log(button)
|
||||
while (!(button.classList.contains('active') || dq('.bilibili-live-player-video-controller-switch-quality-info'))) {
|
||||
await (() => new Promise(r => setTimeout(() => r(), 3000)))()
|
||||
button.click()
|
||||
console.log('click')
|
||||
}
|
||||
}
|
||||
}
|
||||
const observer = Observer.childList(qualitySettings, () => {
|
||||
console.log(qualitySettings.childElementCount)
|
||||
if (qualitySettings.childElementCount > 0) {
|
||||
setQuality()
|
||||
// 干脆就不stop了, 主播下播再开播可以再来一次setQuality
|
||||
// observer.stop()
|
||||
}
|
||||
})
|
||||
})()
|
||||
20
src/live/haruna-scale.js
Normal file
20
src/live/haruna-scale.js
Normal file
@ -0,0 +1,20 @@
|
||||
const id = 'haruna-scale'
|
||||
const load = () => {
|
||||
if (document.getElementById(id) === null) {
|
||||
resources.applyStyleFromText(`
|
||||
.haruna-ctnr,
|
||||
.avatar-btn
|
||||
{
|
||||
transform: scale(${1 / window.devicePixelRatio}) !important;
|
||||
}
|
||||
`, id)
|
||||
}
|
||||
}
|
||||
load()
|
||||
export default {
|
||||
reload: load,
|
||||
unload: () => {
|
||||
const style = document.getElementById(id)
|
||||
style && style.remove()
|
||||
}
|
||||
}
|
||||
@ -275,7 +275,7 @@ export default {
|
||||
Title,
|
||||
},
|
||||
widget: {
|
||||
condition: () => document.domain === "live.bilibili.com",
|
||||
condition: () => document.URL.startsWith('https://live.bilibili.com'),
|
||||
content: resources.import('medalHelperHtml'),
|
||||
success: async () => {
|
||||
document.querySelectorAll(".medal-helper").forEach(it => {
|
||||
@ -138,6 +138,8 @@ export class LiveSocket extends EventTarget {
|
||||
webSocket: WebSocket
|
||||
retryInterval = 200
|
||||
autoRetry = true
|
||||
servers: string[] = ['broadcastlv.chat.bilibili.com']
|
||||
selectedServer = ''
|
||||
private liveTime = new LiveTimeExtractor()
|
||||
private bufferHelper = new SocketBufferHelper()
|
||||
private stopRequested = false
|
||||
@ -147,25 +149,45 @@ export class LiveSocket extends EventTarget {
|
||||
window.addEventListener('unload', () => this.stop())
|
||||
}
|
||||
heartBeat() {
|
||||
if (this.webSocket.readyState === WebSocket.OPEN) {
|
||||
this.webSocket.send(this.bufferHelper.encode('', 'heartBeat'))
|
||||
} else {
|
||||
this.stop()
|
||||
this.restart()
|
||||
}
|
||||
}
|
||||
restart() {
|
||||
this.dispatchEvent(new CustomEvent('restart'))
|
||||
if (!this.stopRequested && this.autoRetry) {
|
||||
console.log(`Live Socket: unexpected disconnect, retry in ${this.retryInterval}ms`)
|
||||
const index = this.servers.indexOf(this.selectedServer)
|
||||
if (index < this.servers.length - 1) { // 尝试下一个服务器
|
||||
this.selectedServer = this.servers[index + 1]
|
||||
} else { // 所有服务器用尽, 从头再来
|
||||
[this.selectedServer] = this.servers
|
||||
}
|
||||
console.log(`Live Socket: server changed to`, this.selectedServer)
|
||||
setTimeout(() => this.start(), this.retryInterval)
|
||||
}
|
||||
}
|
||||
async start() {
|
||||
const roomConfig = await Ajax.getJson(`https://api.live.bilibili.com/room/v1/Danmu/getConf?room_id=${this.roomID}&platform=pc&player=web`)
|
||||
const hostServers: any[] = _.get(roomConfig, 'data.host_server_list', [])
|
||||
let server = 'broadcastlv.chat.bilibili.com'
|
||||
if (hostServers.length > 0) {
|
||||
server = hostServers[0].host
|
||||
const hostServers: { host: string }[] = _.get(roomConfig, 'data.host_server_list', [])
|
||||
// let server = 'broadcastlv.chat.bilibili.com'
|
||||
// if (hostServers.length > 0) {
|
||||
// server = hostServers[0].host
|
||||
// }
|
||||
this.servers = [...new Set([...this.servers, ...hostServers.map(it => it.host)])]
|
||||
if (this.selectedServer === '') { // 首次启动
|
||||
[this.selectedServer] = this.servers
|
||||
console.log('Initial server:', this.selectedServer)
|
||||
}
|
||||
|
||||
if (this.webSocket && (this.webSocket.readyState === WebSocket.CONNECTING || this.webSocket.readyState === WebSocket.OPEN)) {
|
||||
this.stop()
|
||||
}
|
||||
this.webSocket = new WebSocket(`wss://${server}/sub`)
|
||||
this.webSocket = new WebSocket(`wss://${this.selectedServer}/sub`)
|
||||
this.stopRequested = false
|
||||
this.dispatchEvent(new CustomEvent('start', {
|
||||
detail: this.webSocket
|
||||
}))
|
||||
@ -235,10 +257,14 @@ export class LiveSocket extends EventTarget {
|
||||
default: break
|
||||
}
|
||||
})
|
||||
this.webSocket.addEventListener('close', () => {
|
||||
this.webSocket.addEventListener('close', e => {
|
||||
if (!this.stopRequested) {
|
||||
console.error('Live Socket: close', e)
|
||||
this.restart()
|
||||
}
|
||||
})
|
||||
this.webSocket.addEventListener('error', () => {
|
||||
this.webSocket.addEventListener('error', e => {
|
||||
console.error('Live Socket: error', e)
|
||||
this.restart()
|
||||
})
|
||||
}
|
||||
@ -247,7 +273,7 @@ export class LiveSocket extends EventTarget {
|
||||
if (this.heartBeatTimer) {
|
||||
clearInterval(this.heartBeatTimer)
|
||||
}
|
||||
if (this.webSocket) {
|
||||
if (this.webSocket && this.webSocket.readyState === WebSocket.OPEN) {
|
||||
this.webSocket.close()
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user