mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Merge branch 'preview' of github.com:the1812/Bilibili-Evolved into localserver
This commit is contained in:
commit
91a1104099
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
bilibili-evolved.dev.js
|
||||
.DS_Store
|
||||
builder/dotnet/Properties
|
||||
dist/
|
||||
.node_modules/
|
||||
.ts-output/
|
||||
.sass-output/
|
||||
|
||||
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
53
builder/node/donate-table/index.js
Normal file
53
builder/node/donate-table/index.js
Normal file
@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const sync_1 = __importDefault(require("csv-parse/lib/sync"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const files = process.argv.slice(2);
|
||||
const parseAliPay = (csv) => {
|
||||
csv.forEach(item => {
|
||||
item.sortKey = Number(new Date(item.创建时间)).toString();
|
||||
item.toString = () => {
|
||||
let name = '';
|
||||
if (item.商品名称 !== '收钱码收款') {
|
||||
name += item.商品名称 + ' ';
|
||||
}
|
||||
name += item.对方名称 + ' ' + item.付款备注;
|
||||
return `| ${item.创建时间.replace(/-/g, '.')} | ${name} | ${item.支付宝交易号.substring(item.支付宝交易号.length - 4)} | ¥${item['订单金额(元)']} |`;
|
||||
};
|
||||
});
|
||||
return csv;
|
||||
};
|
||||
const parseWeChat = (csv) => {
|
||||
csv.forEach(item => {
|
||||
item.sortKey = Number(new Date(item.交易时间)).toString();
|
||||
item.toString = () => {
|
||||
let name = item.交易对方;
|
||||
const noteMatch = item.商品.match(/付款方留言:(.+)/);
|
||||
if (noteMatch) {
|
||||
name += ' ' + noteMatch[1];
|
||||
}
|
||||
if (item.备注.trim() !== '/') {
|
||||
name += ' ' + item.备注;
|
||||
}
|
||||
item.交易单号 = item.交易单号.trim();
|
||||
return `| ${item.交易时间.replace(/-/g, '.')} | ${name} | ${item.交易单号.substring(item.交易单号.length - 4)} | ${item['金额(元)']} |`;
|
||||
};
|
||||
});
|
||||
return csv;
|
||||
};
|
||||
const items = files.map(file => {
|
||||
const text = fs_1.default.readFileSync(file, { encoding: 'utf-8' });
|
||||
const csv = sync_1.default(text, { columns: true });
|
||||
if (file.includes('支付宝')) {
|
||||
return parseAliPay(csv);
|
||||
}
|
||||
if (file.includes('微信')) {
|
||||
return parseWeChat(csv);
|
||||
}
|
||||
console.warn(`not parse method for ${file}`);
|
||||
return [];
|
||||
}).flat().sort((a, b) => parseInt(b.sortKey) - parseInt(a.sortKey));
|
||||
fs_1.default.writeFileSync('dist/output.md', items.join('\n'));
|
||||
49
builder/node/donate-table/index.ts
Normal file
49
builder/node/donate-table/index.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import parse from 'csv-parse/lib/sync'
|
||||
import fs from 'fs'
|
||||
|
||||
const files = process.argv.slice(2)
|
||||
const parseAliPay = (csv: Record<string, string>[]) => {
|
||||
csv.forEach(item => {
|
||||
item.sortKey = Number(new Date(item.创建时间)).toString()
|
||||
item.toString = () => {
|
||||
let name = ''
|
||||
if (item.商品名称 !== '收钱码收款') {
|
||||
name += item.商品名称 + ' '
|
||||
}
|
||||
name += item.对方名称 + ' ' + item.付款备注
|
||||
return `| ${item.创建时间.replace(/-/g, '.')} | ${name} | ${item.支付宝交易号.substring(item.支付宝交易号.length - 4)} | ¥${item['订单金额(元)']} |`
|
||||
}
|
||||
})
|
||||
return csv
|
||||
}
|
||||
const parseWeChat = (csv: Record<string, string>[]) => {
|
||||
csv.forEach(item => {
|
||||
item.sortKey = Number(new Date(item.交易时间)).toString()
|
||||
item.toString = () => {
|
||||
let name = item.交易对方
|
||||
const noteMatch = item.商品.match(/付款方留言:(.+)/)
|
||||
if (noteMatch) {
|
||||
name += ' ' + noteMatch[1]
|
||||
}
|
||||
if (item.备注.trim() !== '/') {
|
||||
name += ' ' + item.备注
|
||||
}
|
||||
item.交易单号 = item.交易单号.trim()
|
||||
return `| ${item.交易时间.replace(/-/g, '.')} | ${name} | ${item.交易单号.substring(item.交易单号.length - 4)} | ${item['金额(元)']} |`
|
||||
}
|
||||
})
|
||||
return csv
|
||||
}
|
||||
const items = files.map(file => {
|
||||
const text = fs.readFileSync(file, { encoding: 'utf-8' })
|
||||
const csv = parse(text, { columns: true })
|
||||
if (file.includes('支付宝')) {
|
||||
return parseAliPay(csv)
|
||||
}
|
||||
if (file.includes('微信')) {
|
||||
return parseWeChat(csv)
|
||||
}
|
||||
console.warn(`not parse method for ${file}`)
|
||||
return []
|
||||
}).flat().sort((a, b) => parseInt(b.sortKey) - parseInt(a.sortKey))
|
||||
fs.writeFileSync('dist/output.md', items.join('\n'))
|
||||
11
builder/node/donate-table/package.json
Normal file
11
builder/node/donate-table/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "donate-table",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"author": "Grant Howard",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"csv-parse": "^4.15.4"
|
||||
}
|
||||
}
|
||||
12
builder/node/donate-table/tsconfig.json
Normal file
12
builder/node/donate-table/tsconfig.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"esModuleInterop": true,
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"sourceMap": false,
|
||||
},
|
||||
"include": [
|
||||
"index.ts"
|
||||
]
|
||||
}
|
||||
8
builder/node/donate-table/yarn.lock
Normal file
8
builder/node/donate-table/yarn.lock
Normal file
@ -0,0 +1,8 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
csv-parse@^4.15.4:
|
||||
version "4.15.4"
|
||||
resolved "https://registry.npm.taobao.org/csv-parse/download/csv-parse-4.15.4.tgz#ad1ec62aaf71a642982dfcb81f1848184d691db5"
|
||||
integrity sha1-rR7GKq9xpkKYLfy4HxhIGE1pHbU=
|
||||
@ -19,6 +19,31 @@
|
||||
|
||||
| 时间 | 用户名 | 单号后4位 | 金额 |
|
||||
| ------------------- | ------------ | --------- | ------ |
|
||||
| 2021.05.10 16:41:25 | *波 | 7229 | ¥20.00 |
|
||||
| 2021.05.10 09:36:30 | *白 | 1262 | ¥10.00 |
|
||||
| 2021.05.09 00:59:51 | *我 | 3264 | ¥20.00 |
|
||||
| 2021.05.07 23:07:16 | *宜 | 0225 | ¥0.29 |
|
||||
| 2021.05.07 10:20:08 | s*e | 6521 | ¥6.66 |
|
||||
| 2021.05.04 11:47:01 | *大 | 7776 | ¥12.00 |
|
||||
| 2021.05.04 00:22:20 | *子 | 7618 | ¥2.00 |
|
||||
| 2021.05.02 18:16:59 | *七 | 7749 | ¥2.00 |
|
||||
| 2021.04.30 10:20:54 | 乔* | 0271 | ¥5.00 |
|
||||
| 2021.04.29 15:28:10 | *文 | 7229 | ¥5.00 |
|
||||
| 2021.04.28 22:40:07 | *数 | 0272 | ¥1.00 |
|
||||
| 2021.04.26 23:45:27 | x*y | 6638 | ¥5.00 |
|
||||
| 2021.04.25 08:16:12 | *陸 | 9503 | ¥30.00 |
|
||||
| 2021.04.23 13:39:53 | *楠 | 7296 | ¥5.00 |
|
||||
| 2021.04.22 12:10:02 | *安 | 1136 | ¥12.00 |
|
||||
| 2021.04.22 08:22:04 | M*z | 5584 | ¥5.00 |
|
||||
| 2021.04.20 18:48:24 | 青* | 1619 | ¥5.00 |
|
||||
| 2021.04.18 14:31:56 | mr.Donation | 6392 | ¥6.66 |
|
||||
| 2021.04.15 18:40:10 | 匿名 | 4622 | ¥5.00 |
|
||||
| 2021.04.12 14:08:37 | 卷发哥斯拉 | 0684 | ¥66.00 |
|
||||
| 2021.04.11 15:22:57 | *杰 | 8609 | ¥0.66 |
|
||||
| 2021.04.07 00:58:23 | 匿名 | 9622 | ¥10.00 |
|
||||
| 2021.04.06 11:35:03 | *辰 | 5187 | ¥5.00 |
|
||||
| 2021.04.05 20:43:18 | A*N | 2592 | ¥15.00 |
|
||||
| 2021.04.05 20:36:31 | A*N | 1506 | ¥1.00 |
|
||||
| 2021.03.30 20:17:18 | *雨 | 3243 | ¥5.00 |
|
||||
| 2021.03.27 09:09:47 | *俊 | 0097 | ¥1.00 |
|
||||
| 2021.03.27 00:06:09 | *斌 | 1363 | ¥5.00 |
|
||||
|
||||
@ -257,10 +257,38 @@
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>删除视频弹窗</strong></summary>
|
||||
<summary><strong>删除关注弹窗</strong></summary>
|
||||
|
||||
删除视频内弹出的三连提示框.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>删除关联视频弹窗</strong></summary>
|
||||
|
||||
删除视频内弹出的关联视频推荐.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>删除投票弹窗</strong></summary>
|
||||
|
||||
删除视频内弹出的投票框.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>传统连播模式</strong></summary>
|
||||
|
||||
使用传统的连播模式, 视频有多P时 / 在收藏夹或稍后再看列表里时自动开启连播, 单P视频自动关闭连播防止播放推荐视频.
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>当播放器退出页面时</strong></summary>
|
||||
|
||||
当播放器被移出页面时触发动作, 可以选择触发的位置, 支持的动作有:
|
||||
|
||||
- 自动暂停: 自动暂停播放, 且当播放器回来时恢复播放.
|
||||
- 自动开灯: 在没有开启自动暂停, 且开启了播放时自动关灯, 那么播放器移出页面时将自动开灯, 播放器回来时自动关灯.
|
||||
> 注: 在自动暂停开启时, 该功能会被忽略
|
||||
|
||||
</details>
|
||||
|
||||
<h2 align="center">样式</h2>
|
||||
@ -576,9 +604,11 @@
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>禁止直播首页自动播放</strong></summary>
|
||||
<summary><strong>直播首页静音</strong></summary>
|
||||
|
||||
禁止直播首页的推荐直播间自动开始播放, 开启后, 还可以通过`隐藏首页推荐直播`直接隐藏掉这个推荐板块.
|
||||
禁止直播首页的推荐直播间自动开始播放.
|
||||
|
||||
还可以打开`隐藏推荐直播`来隐藏掉推荐直播间.
|
||||
|
||||

|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ Please check your browser, Bilibili-Evolved must run with the **latest** Chrome
|
||||
|
||||
In this tutorial, I'll use Chrome as an example:
|
||||
|
||||
<img height="300" alt="Chrome" src="images/compressed/chrome.en-US.jpg">
|
||||
<img height="300" alt="Chrome" src="../images/compressed/chrome.en-US.jpg">
|
||||
|
||||
## 2. Get a user script manager
|
||||
> If you already have one, skip this step.
|
||||
@ -22,7 +22,7 @@ Choose the one you like and click the link to visit its homepage, or get it in y
|
||||
|
||||
e.g. Install Tampermonkey from Chrome Web Store
|
||||
|
||||
<img height="300" alt="Install from Chrome Web Store" src="images/compressed/tampermonkey.en-US.jpg">
|
||||
<img height="300" alt="Install from Chrome Web Store" src="../images/compressed/tampermonkey.en-US.jpg">
|
||||
|
||||
## 3. Install
|
||||
Having at least one user script manager installed, you can now select a version of Bilibili-Evolved to install. (Click the name to install)
|
||||
@ -35,7 +35,7 @@ Having at least one user script manager installed, you can now select a version
|
||||
|
||||
e.g. Install the Offline version
|
||||
|
||||
<img height="350" alt="Install Offline version" src="images/compressed/install-script.zh-CN.jpg">
|
||||
<img height="350" alt="Install Offline version" src="../images/compressed/install-script.zh-CN.jpg">
|
||||
|
||||
## 4. Change the display language (Optional)
|
||||
> Language should be automatically set to your browser's default language. If not, you can follow this step to change the display language.
|
||||
@ -48,8 +48,8 @@ Enable it and select a target language you want to see, then refresh the page.
|
||||
|
||||
e.g. Select English as the target language
|
||||
|
||||
<img height="500" alt="Open settings" src="images/compressed/settings-icon.en-US.jpg">
|
||||
<img height="500" alt="Change settings" src="images/compressed/settings.en-US.jpg">
|
||||
<img height="500" alt="Open settings" src="../images/compressed/settings-icon.en-US.jpg">
|
||||
<img height="500" alt="Change settings" src="../images/compressed/settings.en-US.jpg">
|
||||
|
||||
## 5. Enjoy
|
||||
You are all set! Explore settings and add-ons to discover interesting features, and feel free to suggest a new feature or report a bug on my GitHub repo.
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
下記のチュートリアルでは、例として Chrome を使用します:
|
||||
|
||||
<img height="300" alt="Chrome" src="images/compressed/chrome.en-US.jpg">
|
||||
<img height="300" alt="Chrome" src="../images/compressed/chrome.en-US.jpg">
|
||||
|
||||
## 2. インストール前の準備
|
||||
> ユーザースクリプトマネージャ(user script manager)が既にある場合は、このステップをスキップします.
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
例えば、Chrome Web StoreからTampermonkeyをインストールする.
|
||||
|
||||
<img height="300" alt="Install from Chrome Web Store" src="images/compressed/tampermonkey.en-US.jpg">
|
||||
<img height="300" alt="Install from Chrome Web Store" src="../images/compressed/tampermonkey.en-US.jpg">
|
||||
|
||||
## 3. インストール
|
||||
少なくとも1つのユーザスクリプトマネージャをインストールしたら、「Bilibili-Evolved」のバージョンを選択してインストールできます. (インストールしたいバージョンの名をクリックしてください)
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
例えば、オフライン版をインストールする
|
||||
|
||||
<img height="350" alt="Install Offline version" src="images/compressed/install-script.zh-CN.jpg">
|
||||
<img height="350" alt="Install Offline version" src="../images/compressed/install-script.zh-CN.jpg">
|
||||
|
||||
## 4. 翻訳言語を変更する (オプション)
|
||||
> 翻訳言语は自分自身のブラウザのデフォルト言语に自动的に设定します.それがなければ、このステップに従って翻訳言语を変えることができます.
|
||||
@ -49,8 +49,8 @@
|
||||
|
||||
例えば、翻訳言語として「英語」を選択する
|
||||
|
||||
<img height="500" alt="Open settings" src="images/compressed/settings-icon.en-US.jpg">
|
||||
<img height="500" alt="Change settings" src="images/compressed/settings.en-US.jpg">
|
||||
<img height="500" alt="Open settings" src="../images/compressed/settings-icon.en-US.jpg">
|
||||
<img height="500" alt="Change settings" src="../images/compressed/settings.en-US.jpg">
|
||||
|
||||
## 5. 最後
|
||||
今、準備万端です! 設定や追加機能を探索して興味深い機能を発見できます.
|
||||
|
||||
2
min/auto-play-control.min.js
vendored
2
min/auto-play-control.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(t,e)=>{(async()=>{const t=["https://www.bilibili.com/video/","https://www.bilibili.com/watchlater/","https://www.bilibili.com/medialist/play/"];if(!t.some((t=>document.URL.startsWith(t)))){return}const i={enable:[".multi-page .next-button",".player-auxiliary-autoplay-switch input"],disable:[".recommend-list .next-button"]};const a=t=>Boolean(t.querySelector(".switch-button.on, :checked"));const{playerReady:o}=await e.importAsync("player-ready");await o();const l=await SpinQuery.select([...i.enable,...i.disable].join(","));if(!l){return}const n=i.enable.some((t=>l.matches(t)));const c=a(l);console.log(c,n,l);if(n!==c){l.click()}})()})();
|
||||
(()=>(e,t)=>{(async()=>{const e=["https://www.bilibili.com/video/","https://www.bilibili.com/watchlater/","https://www.bilibili.com/medialist/play/"];if(!e.some((e=>document.URL.startsWith(e)))){return}const i={enable:[".multi-page .next-button",".player-auxiliary-autoplay-switch input"],disable:[".recommend-list .next-button"]};const o=[()=>Boolean(dq(".multi-page .list-box li.on:last-child"))];const l=e=>Boolean(e.querySelector(".switch-button.on, :checked"));const{playerReady:n}=await t.importAsync("player-ready");await n();const a=async()=>{const e=await SpinQuery.select([...i.disable,...i.enable].join(","));if(!e){return}const t=i.enable.some((t=>e.matches(t)))&&o.every((e=>!Boolean(e())));const n=l(e);console.log(n,t,e);if(t!==n){e.click()}};Observer.videoChange((()=>{const e=dq(".bilibili-player-video video");a();e===null||e===void 0?void 0:e.addEventListener("ended",a)}))})()})();
|
||||
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
2
min/blackboard.min.js
vendored
2
min/blackboard.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,t)=>{const r=async()=>{if(dq(".international-home")){const e=await SpinQuery.condition((()=>unsafeWindow["__INITIAL_STATE__"]),(e=>e!==undefined));return dqa(".first-screen .home-slide .item").slice(0,5).map(((t,r)=>{const i=t.querySelector("a").getAttribute("data-loc-id");return{url:e.locsData[i][r].url,title:t.querySelector(".title").innerText.trim(),isAd:Boolean(t.querySelector(".gg-icon,.bypb-icon")),imageUrl:t.querySelector("img").getAttribute("src").replace(/@.+$/,"")}}))}else{const e=dq(".chief-recommend-module .panel");const t=e.querySelector(".pic");const r=e.querySelectorAll(".title > a");return[...t.querySelectorAll("li")].map(((e,t)=>{const i=r[t];return{url:i.getAttribute("href"),title:i.innerText.trim(),isAd:Boolean(i.querySelector(".gg-pic")),imageUrl:e.querySelector("img").getAttribute("src").replace(/@.+$/,"")}}))}};return{export:{getBlackboards:r}}})();
|
||||
(()=>(e,t)=>{const r=async()=>{if(dq(".international-home")){const e=await SpinQuery.condition((()=>unsafeWindow["__INITIAL_STATE__"]),(e=>e!==undefined));return dqa(".first-screen .home-slide .item").slice(0,5).map(((t,r)=>{const i=t.querySelector("a").getAttribute("data-loc-id");return{url:e.locsData[i][r].url,title:t.querySelector(".title").textContent.trim(),isAd:Boolean(t.querySelector(".gg-icon,.bypb-icon")),imageUrl:t.querySelector("img").getAttribute("src").replace(/@.+$/,"")}}))}else{const e=dq(".chief-recommend-module .panel");const t=e.querySelector(".pic");const r=e.querySelectorAll(".title > a");return[...t.querySelectorAll("li")].map(((e,t)=>{const i=r[t];return{url:i.getAttribute("href"),title:i.innerText.trim(),isAd:Boolean(i.querySelector(".gg-pic")),imageUrl:e.querySelector("img").getAttribute("src").replace(/@.+$/,"")}}))}};return{export:{getBlackboards:r}}})();
|
||||
2
min/blackboard.vue.min.js
vendored
2
min/blackboard.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(a,r)=>{const i=`<div class=blackboards><div class=header><div class=title>活动</div><a class=more href=https://www.bilibili.com/blackboard/x/act_list/ target=_blank><icon type=mdi icon=dots-horizontal></icon>更多</a></div><input class="hidden-input blackboard-radio"type=radio name=blackboard v-for="(b, i) of blackboards":checked="i === 0":id="'blackboard' + i":data-index=i :key=i><div class=blackboard-cards><a class=blackboard-card target=_blank v-for="(b, i) of blackboards":key=i :href=b.url :title=b.title><dpi-img :src=b.imageUrl :alt=b.title :size="{width: 500, height: 250}":root=cardsContainer></dpi-img><div class=title>{{b.title}}</div></a></div><div class=jump-dots><label v-for="(b, i) of blackboards":for="'blackboard' + i":key=i><div class=jump-dot></div></label></div></div>`;r.applyStyleFromText(`.simple-home .blackboards{position:relative;display:grid;grid-template-areas:"header header" "cards cards";grid-template-columns:8px 1fr;grid-template-rows:1fr 250px;row-gap:16px;column-gap:16px;align-self:start}.simple-home .blackboards .jump-dots{position:absolute;top:50%;left:8px;transform:translateY(-50%);grid-area:cards;align-self:center;justify-self:center}.simple-home .blackboards .jump-dots label{display:block}.simple-home .blackboards .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .blackboards .jump-dots .jump-dot{background-color:#8884;border:1px solid #8888;box-sizing:border-box;width:8px;height:20px;border-radius:8px;cursor:pointer}.simple-home .blackboards .blackboard-cards{grid-area:cards;--blackboard-width:568.5px;--blackboard-height:250px;width:var(--blackboard-width);height:var(--blackboard-height);border-radius:16px;overflow:hidden}.simple-home .blackboards .blackboard-cards .blackboard-card{width:100%;height:100%;position:relative;display:block;transition:.3s cubic-bezier(.65,.05,.36,1)}.simple-home .blackboards .blackboard-cards .blackboard-card img{width:100%;height:100%;object-fit:fill;display:block}.simple-home .blackboards .blackboard-cards .blackboard-card .title{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);padding:4px 16px;color:#fff;background-color:#000a;font-size:14px;font-weight:700;border-radius:14px;white-space:nowrap;opacity:0}.simple-home .blackboards .blackboard-cards .blackboard-card:hover .title{opacity:1}`,"blackboard-style");return{export:Object.assign({template:i},{components:{Icon:()=>r.importAsync("icon.vue"),"dpi-img":()=>r.importAsync("dpi-img.vue")},data(){return{blackboards:[],interval:0}},destroyed(){if(this.interval){clearInterval(this.interval)}},computed:{cardsContainer(){return this.$el.querySelector(".blackboard-cards")}},async mounted(){const{getBlackboards:a}=await r.importAsync("blackboard");this.blackboards=(await a()).filter((a=>!a.isAd));const i=dq(".blackboards");this.interval=setInterval((()=>{if(!document.hasFocus()||i.matches(".blackboards:hover")){return}const a=parseInt(dq(`.blackboard-radio:checked`).getAttribute("data-index"));let r;if(a===this.blackboards.length-1){r=0}else{r=a+1}dq(`.blackboard-radio[data-index='${r}']`).checked=true}),5e3)}})}})();
|
||||
(()=>(a,r)=>{const i=`<div class=blackboards><div class=header><div class=title>活动</div><a class=more href=https://www.bilibili.com/blackboard/x/act_list/ target=_blank><icon type=mdi icon=dots-horizontal></icon>更多</a></div><input class="hidden-input blackboard-radio"type=radio name=blackboard v-for="(b, i) of blackboards":checked="i === 0":id="'blackboard' + i":data-index=i :key=i><div class=blackboard-cards><a class=blackboard-card target=_blank v-for="(b, i) of blackboards":key=i :href=b.url :title=b.title><dpi-img :src=b.imageUrl :alt=b.title :size="{width: 500, height: 250}":root=cardsContainer></dpi-img><div class=title>{{b.title}}</div></a></div><div class=jump-dots><label v-for="(b, i) of blackboards":for="'blackboard' + i":key=i><div class=jump-dot></div></label></div></div>`;r.applyStyleFromText(`.simple-home .blackboards{position:relative;display:grid;grid-template-areas:"header header" "cards cards";grid-template-columns:8px 1fr;grid-template-rows:1fr 250px;row-gap:16px;column-gap:16px;align-self:start}.simple-home .blackboards .jump-dots{position:absolute;top:50%;left:8px;transform:translateY(-50%);grid-area:cards;align-self:center;justify-self:center}.simple-home .blackboards .jump-dots label{display:block}.simple-home .blackboards .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .blackboards .jump-dots .jump-dot{background-color:#8884;border:1px solid #8888;box-sizing:border-box;width:8px;height:20px;border-radius:8px;cursor:pointer}.simple-home .blackboards .blackboard-cards{grid-area:cards;--blackboard-width:568.5px;--blackboard-height:250px;width:var(--blackboard-width);height:var(--blackboard-height);border-radius:16px;overflow:hidden}.simple-home .blackboards .blackboard-cards .blackboard-card{width:100%;height:100%;position:relative;display:block;transition:.8s cubic-bezier(.44,.29,.13,1)}.simple-home .blackboards .blackboard-cards .blackboard-card img{width:100%;height:100%;object-fit:fill;display:block;border-radius:12px}.simple-home .blackboards .blackboard-cards .blackboard-card .title{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);padding:4px 16px;color:#fff;background-color:#000a;font-size:14px;font-weight:700;border-radius:14px;white-space:nowrap;opacity:0}.simple-home .blackboards .blackboard-cards .blackboard-card:hover .title{opacity:1}`,"blackboard-style");return{export:Object.assign({template:i},{components:{Icon:()=>r.importAsync("icon.vue"),"dpi-img":()=>r.importAsync("dpi-img.vue")},data(){return{blackboards:[],interval:0}},destroyed(){if(this.interval){clearInterval(this.interval)}},computed:{cardsContainer(){return this.$el.querySelector(".blackboard-cards")}},async mounted(){const{getBlackboards:a}=await r.importAsync("blackboard");this.blackboards=(await a()).filter((a=>!a.isAd));const i=dq(".blackboards");this.interval=setInterval((()=>{if(!document.hasFocus()||i.matches(".blackboards:hover")){return}const a=parseInt(dq(`.blackboard-radio:checked`).getAttribute("data-index"));let r;if(a===this.blackboards.length-1){r=0}else{r=a+1}dq(`.blackboard-radio[data-index='${r}']`).checked=true}),5e3)}})}})();
|
||||
@ -14,13 +14,13 @@
|
||||
"auto-continue.min.js": "8EF0A775E1520C5D1A6058A3289EB2E47D16681EF3E2B6043780E2FDAC919CAA",
|
||||
"auto-draw.min.js": "303469718E41C156C763AE085FC62B42AEFD654B7E6083DAF111C5D5EE4CA619",
|
||||
"auto-play.min.js": "67A4735A629EC325009C8F79838FC1A852AB9AF15DFF8A2B60F0F0943DC3A4A9",
|
||||
"auto-play-control.min.js": "1098DBD0A60015E249318D0FA9FCF62A8FD0F64E8F616F9B032E7F149EB296E5",
|
||||
"auto-play-control.min.js": "29EB3E7483234272E285A361C109D6C34CAD021A059259E9E00354D3FF4FBBC1",
|
||||
"bangumi-timeline.vue.min.js": "BDC87EB6BE6C5D12DC6E9C75813E5BB2174C4A2D43A657F55874B31A533BAD9C",
|
||||
"batch-download.min.js": "B3C67E40A84F5BBE36818831C48315EF01D1F90552DD4E41F516BB9846C4133B",
|
||||
"batch-download.min.js": "044D6945486C5C7E76B8E6C2F98973F4D7C554BE0A09DB2055C9030B284C1B78",
|
||||
"batch-warning.min.js": "15A2134D855D9098B9485AA8023B5D98838F67D18FAB414B0C1FCD32F9BD05DD",
|
||||
"biliplus-redirect.min.js": "EEFF7EE484A8D214E8FA110694E99F8BB62BD7263D1458DC83E7047F4CD6B9D4",
|
||||
"blackboard.min.js": "BEE7FBCB670092EFFCCDBBCB16AFA15E18C37B604AF5D78485BC4C32BFF7C9BD",
|
||||
"blackboard.vue.min.js": "5C48952FA669A6732678D9910D54851D9804956D8EE26A7074C4662620BF6921",
|
||||
"blackboard.min.js": "1B48B1630D016D3F91B4804FBB73E299696E2BCDB3498FF1191B5A86B48CF9DE",
|
||||
"blackboard.vue.min.js": "4B5AA62C98113E4280DE14B970C1DD60DE73CE40AD6A808FAE891F9ACC9311CF",
|
||||
"blur-video-control.min.css": "B72FA7AD198ED1C9A9620A83881441F96F9FF3083ED12203A324B9753A7CCFFD",
|
||||
"blur-video-control.min.js": "F5C4C5E45BEB5BB671788FB72677FE121D6834C775912D7B1BCFE4A4EAFA599A",
|
||||
"bvid-convert.min.css": "5405081513C4B5B7CD0E0C1B021CAD25EFA63CA03AD70CD8FA6F62F116BB8D96",
|
||||
@ -32,7 +32,7 @@
|
||||
"collapse-live-side-bar.min.js": "9B4296F88C32FD081E4FD0DD48B4353C243A423446CF1CA047EB3B574D597F80",
|
||||
"column-image-exporter.min.js": "F6AEF899A858D0ACBAF86FA48285008A82FB684C7B4748DEFEF2BB914ABF5C3D",
|
||||
"combo-like.min.js": "E32FE23747479132F90C3D66CA6EB78031B4F7388F77CC56668E41B3F05FE954",
|
||||
"comment.min.css": "F14D8AD943E7DA4C79DFBBC8A7D5486EEC85C6726F0E0B84DC37541A86E3C862",
|
||||
"comment.min.css": "DAACC5E684C727ACFA6CED1B77E9B9E2D5AD5D6501AC0205E7667D9C587C53A5",
|
||||
"comment.min.js": "1634EEADF5BF2A29E6D39AFDA17804AB2442CDA3BCB0B4D9DBAA6F6E7E965F72",
|
||||
"comment-apis.min.js": "D0E6EF724B5C068AD55EE9F740090A782447CE373080848FCA24879FC56E5E8B",
|
||||
"comment-dark.min.css": "E980508E86203743C36FEE4F7149BFF53961ECBC4EC140E8C162D18D395B940A",
|
||||
@ -43,7 +43,7 @@
|
||||
"copy-feeds-link.min.js": "36D7C804F088A6C6905CD91C5F9D2D58E20634C7E0814AE03740CCEC790F6BB4",
|
||||
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
|
||||
"custom-control-background.min.js": "483F57DDD56F5B3A77C9CB35EB7CA191BF34CB6B3EEF5E12A4C10A42ADE563A2",
|
||||
"custom-navbar.min.css": "948162D4830A81FBF9100E283F5D5D2741B6B3F84F00B56487BBB064766083E1",
|
||||
"custom-navbar.min.css": "997E500541C3ECC8FE6224298B8B531BBA85E109FB38BDE03AD1458E09046C5D",
|
||||
"custom-navbar.min.html": "DB04478D34A6ABE6792201E22FC11163366C4EBBDBB4726F624FC368077016F8",
|
||||
"custom-navbar.min.js": "54E91D75171541C370E13CD720AF4225C996D90753B147E73F19B4689513F651",
|
||||
"custom-navbar-activities.min.js": "A7AB41C75EFEF45F3186D5A110629FA98F16C552E3B6F58BA0A735CB86E58547",
|
||||
@ -68,9 +68,9 @@
|
||||
"danmaku-converter.min.js": "C54666E9910A927B54051EAB7C3DB6F93C1F6010A47614A619AFD7487C3F7183",
|
||||
"danmaku-segment.min.js": "43CC3236AFABA89BD0AE24D640809BE333772824E3994541AFC3CDDD9F881613",
|
||||
"danmaku-send-bar.min.css": "03F5792CE42864610145BBA09E1B352BFCC2B2ABB531A0F8796F37E8F2A762FB",
|
||||
"danmaku-send-bar.min.js": "D48D40163F11C1C3BA4A6230EDBB3E048058BCE3A6D7B9A48B7042EE9C5E6E14",
|
||||
"dark.min.css": "00414EC7EA843709A9BDCFC511A80286406405B213823BA981FBCE56CBFD366D",
|
||||
"dark.user.css": "EDEB06EC33FFA552EE65236EC03ADF64906258AC0B250301203BC72FDB716476",
|
||||
"danmaku-send-bar.min.js": "3F635F4209092B6BA41865A945496861F4B1E0D9F2D31ABB5C021967B1B9FA19",
|
||||
"dark.min.css": "44C7F88F3ED659D7656AE12B2930920FA5D7206B11080787776776F47BB0FE2A",
|
||||
"dark.user.css": "F2061084F44AD141467509E9F3BA001CA81771A7AFFA6E7DC05604AFB9D16784",
|
||||
"dark-color-scheme.min.js": "7C89C14ACEE44CCE2E402A63768A3B53251B4B1D82675DD85532AABB8F2082FA",
|
||||
"dark-important.min.css": "49D1AB353513E810AB69B6C501469FDDC10A6A266264779874F171FC867AC2E4",
|
||||
"dark-navbar.min.css": "7FAD547E326B768904B3739C978DF86FFDDD5E5064FB8F490710D197CCC3018B",
|
||||
@ -81,7 +81,7 @@
|
||||
"default-danmaku-settings.min.js": "901EA05F842932F436F0ABEAC99802D286575F9033CE078AA246FD1453B98998",
|
||||
"default-live-quality.min.js": "3DE4EC96DE1CB7F187E61B7045EC14EBBF74B1853A990B4FE32372F27D47F4E4",
|
||||
"default-player-layout.min.js": "2F018C09DCCB9D0DD671ED4868A1EAC365D63CC51618EE076598C6624E3BEA7E",
|
||||
"default-player-mode.min.js": "975AC3E0016EEE7C9DF8483CB064F2E025063F3A6CD9BEDAFDD0CC64AD8DAE77",
|
||||
"default-player-mode.min.js": "FF0B611EED45A862C484167D9E4A6B675A0A19B645FF60CD234912EA0D09E98A",
|
||||
"default-video-quality.min.js": "20C0F41F683D685CCD22BD91F0EB4C2227146DD5586EB65388EE8FA97F46F7D2",
|
||||
"default-video-speed.min.js": "720B588D410C267C1EE411927C9FC9FBBAE693A6938134416962E7B5A0682D25",
|
||||
"disable-feeds-details.min.js": "3255289129448347672530526BA7F90558144A150B268F37F7D575BF0E4F521E",
|
||||
@ -97,13 +97,13 @@
|
||||
"download-video.min.js": "FC561BFA1B57590209892BDC4AB982F09A7D7B99E91D7A25BDD7316014243E9D",
|
||||
"dpi-img.vue.min.js": "791188F92FC0FD6257F26F27379A6B4EF3447C04355A6B6EA8B330008A238FCD",
|
||||
"expand-danmaku.min.js": "1D855006799D56AF09697EB8F6488303DB05811E8F3C84298AC08A4FE3A4CFA1",
|
||||
"expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224",
|
||||
"expand-description.min.js": "91701C970E860DE7F49726F3D607B1B5770F9F5A7AE38974DE0974E546C06CD4",
|
||||
"expand-description.min.css": "4B8023CD9C6AFFD65A8FB33F3735480AF1151DC1F3E2AC551442266268A6F873",
|
||||
"expand-description.min.js": "528ED5892BDDE16EAA4F60BD962FCC7A70E0E4E322ED3F798AFC6D72D6C3C99B",
|
||||
"extend-feeds-live.min.css": "BD0BF6E670808C940B3F3F7D8798B02676A58AA204449AAAE6E162D27EB8598A",
|
||||
"extend-feeds-live.min.js": "CACEC3C5DE877639BBD2DC6BC5A4C4FFDD160B32C338DA1824F68E1985139F83",
|
||||
"extend-video-speed.min.js": "5654150CB792C7413C3FBFAE22477DB2E85EEF55611A0F01B64128214DBDB390",
|
||||
"favorites-redirect.min.js": "9DB5FF294C7A49AD9341201C1FA0C8D7EBE7BFC1424DD74C4B796D1F0E24CFD1",
|
||||
"feeds-apis.min.js": "46B06067D44D30FF929578DBDA187D92262139C2E9B5A237A5FD4CCDF725979F",
|
||||
"feeds-apis.min.js": "7FFEE139017B3FD7C6A79DB89C6964DD00DDECFB4A413D1EEA17B6756CBE1667",
|
||||
"feeds-filter.min.js": "CF558BFD3860AC3E11757FFFF6A8AABE70DF7DFA1D1077684A1BF08868C649DB",
|
||||
"feeds-filter-card.vue.min.js": "C57D50BF9C6661827B898B238539A8AAC86314A040A15780FD77B33C18E4E83F",
|
||||
"feeds-image-exporter.min.js": "97392AFED64DEB5115ACDAE01BF97D41C32A68E431154269E1ADF40F66FA9B4B",
|
||||
@ -123,14 +123,14 @@
|
||||
"full-activity-content.min.js": "996BD62D7633175DCA46E94F50C4ED48ED81D17C28B5C9DE1B3BA4C1D5F2B8F2",
|
||||
"full-page-title.min.css": "F498775B5E2983BAD5331C5F3A383EE4A18BE27A44F6BEC53B2E780E95237ACD",
|
||||
"full-page-title.min.js": "F82215B10EFDFFEDC2C0A2A29546754C1EFAC72C47712F7D35B72D1160A6DCB2",
|
||||
"fullscreen-gift-box.min.css": "5C4113479886D1791CE290366ACD258DE4318A8AC41C453CC99BD0EAEEA89C38",
|
||||
"fullscreen-gift-box.min.js": "A559B8000E6E0DADC5D430182AC81677BC225B2CD651B015E0F9BA5B4EF49C9A",
|
||||
"fullscreen-gift-box.min.css": "7E6B0CA1AC7CBD99A792F87DEFBACEE32362349CA10ECEAA9B1EAC9326972C57",
|
||||
"fullscreen-gift-box.min.js": "D020C9840F838AD5164A9B33F2E94D9F08CD7E319C09C9AAABD206F61B1E9E63",
|
||||
"full-tweets-title.min.css": "13A0CF1C96F374CED3FA59A532E28B4B620D7A4C374385A363F32AD1A7656764",
|
||||
"full-tweets-title.min.js": "5A32D349D6DDD4F1DE73175D9A0AFE520B316F73A852B2BBE6A0436C8D8CBBB2",
|
||||
"gbk.min.js": "0EDFCB94F519365A8CCA9BF3AECE57DC6DB273EF3F41545095B8F03625782F0D",
|
||||
"get-number.min.js": "E644267B8A2DCEF2577BB9270F5C738BCE89C1C128071EBD3645903A930E08E0",
|
||||
"gui-settings.min.css": "CA3E9D6B0CA135F7FC1984DD68446AB928E8DCBE5D96C4AF42B23B592D361FDF",
|
||||
"gui-settings.min.html": "91D12DDAF58921A08AE46E862A3A3E2D7BA9CDEEC507C732044E8FBE236BBAE3",
|
||||
"gui-settings.min.html": "F8A244E72E18F1ED0FA0E6452F328933E37C30D429BE611989C5A391DA9FC4AA",
|
||||
"gui-settings.min.js": "3D87D18CCDBEBB4E005251E61B9B448F4707BAA878CA561D9B66087C98A3FD0B",
|
||||
"haruna-scale.min.js": "2410662D47006D2AC49FE43DEB85F8D2C1B6F6D353DD767C2F11F7802A81F605",
|
||||
"hide-bangumi-reviews.min.js": "0E8D100A27D523008041BAF95B7809855B505F4C02D4EE32CC62917528E46DBE",
|
||||
@ -142,22 +142,22 @@
|
||||
"hide-hash-tags.min.js": "4FEAC8E0B78D7AAC2B7A6D8B2576AA15D310008BBAC5D2A5E7DCC4E33011723E",
|
||||
"hide-old-entry.min.js": "73A12F8A4B369E5486FAD0388F09768B9A48D29C52BF25123C7CFC885C99D709",
|
||||
"hide-recommend-live.min.js": "FD5FDCC21319A707089A565B0466A1F4335770BCEF6623718B5E1C4D5C87E826",
|
||||
"hide-related-videos.min.js": "CE0C4E9FF15661E99F4C7C477E6D364593D302D44B624A7CB4FAE7717243DC5D",
|
||||
"hide-related-videos.min.js": "B0FF19C6080EB7C3D64C3BFF91FDF68D70FEC4E5445717175E74245A2DEABBB9",
|
||||
"hide-top-search.min.js": "36FF3FCBEC3ABB61E2458AA94C0B9F59224AE38A483B354FB17C671190592892",
|
||||
"home-hidden.min.css": "09BB2F42128B4C8ECB3B64C358C378CF7CAD920EF2DE5D8D1EFD87D2FB3DC62E",
|
||||
"home-hidden.min.js": "0135071D70B3B6BA8C1A55A286115B1785CC3ED4D87745FDB50BC3515E69B5C8",
|
||||
"home-hidden.min.css": "BF0142F2C96EE72EBC76D5D4909A5CE5BA382C142F19E5E54248A177D9585E99",
|
||||
"home-hidden.min.js": "5326DE89A99FA3913A89DF7713DACDBB41E3BD89FD46BCDA322535949373FDF3",
|
||||
"home-video.vue.min.js": "ACD3918903369692BF0AA0ADBE3E77B8D6B942EA1DAAB7138B362D263E9DC1F4",
|
||||
"horizontal-scroll.min.js": "BCD68AB83706669D24A782219F3D45EA0AF0A9C0317309CB003924444452519C",
|
||||
"i18n.de-DE.min.js": "540CD614C274A80578B8F759B437675ECFEB6C16DF62BA0E39AB113F26C9852F",
|
||||
"i18n.en-US.min.js": "0B30C35B229E2570FAB70AFF5B5BB85A655C2B44CDB656F387BCBC633A8E22B5",
|
||||
"i18n.ja-JP.min.js": "057EAE9EBB6D6AD152EDA216F4110CC3A6721A34BAA78835FAB76F0306C99B03",
|
||||
"i18n.en-US.min.js": "80F6C596E2F3A5AB0D8E8D1EC73205FFE7EF34066285BF8DEF2BF04A8BCD23B2",
|
||||
"i18n.ja-JP.min.js": "96EF39F7CD6BB88520AAF1CCB72AAD794228D5926B197A9707DE5CAB17F538A7",
|
||||
"i18n.min.css": "FAA94965C122C7F1DE6DC82C298E50FACE1C8C37256605BD7B3FD4AB56037BCB",
|
||||
"i18n.min.js": "369DC13D72758D1DF42387931D7E0165F22CF05EBB8DC24F800EF463472A1600",
|
||||
"i18n.zh-TW.min.js": "803F67270809E3258E2B302ADE542B12EF222C83EDC67FB8C68301C5F4E3A1CC",
|
||||
"icon.vue.min.js": "15324A41E910361F9A245D6B3EB16019075EE460287570CBEA0F12AC71E1F158",
|
||||
"icons.min.css": "D8DB1DF404C10FB3038B390925A9E95D06E5BABBDC618162D7888CA59C964F42",
|
||||
"idm-support.min.js": "FFC04DB396943736244572CF4B9C0C03EFBD1C3BC563AA95528B360E0852B774",
|
||||
"image-resolution.min.js": "DFC2D7EC9E5DF9CC65743D9CBDC2BE1CFC4ACA3C5EDB4454EB3B8BB9F1B90610",
|
||||
"image-resolution.min.js": "B0219697D12CB920696B47F7AD68DBD137F566A1AFCA35F74ACDE70C6CA3C57C",
|
||||
"image-viewer.min.css": "AD6A0C1A3A7BE65DDA25AC8DB77E574776F0B2998C808D6ACC09452EEA0FA7F7",
|
||||
"image-viewer.min.html": "5F1EEE9FBFD9D2EB2E2F73A57CB3DB2448A60E3D3480A297A7FC88038F60DF21",
|
||||
"index.min.html": "94B83D9EBB9005C1286A7E0759A7683932F8DADA20D07E5E9D8FF867B04D4B95",
|
||||
@ -165,7 +165,7 @@
|
||||
"key-bindings.min.js": "88736417D177F7F6173D087441220979B76C63A510BE75E09DF4B27D4DEBFB57",
|
||||
"keymap.min.css": "B66149AAE8D4267E413A26F0577C4FCE4C0D13ECBB9B573916FDA8E58099C939",
|
||||
"keymap.min.js": "EA505FCD0C6E6B2FDD7C574B874582B8F07CA29C0F5946F93EBDA2444ACFBCF9",
|
||||
"live-control-bar.min.js": "6F618B1E3E259D4049FCF660F2227BAE8C88FF69F78FDEE817C7E30F0EC71617",
|
||||
"live-control-bar.min.js": "5AA182EB22062DEB54D727E7B42F6DA8535F982DA303963BA9AD4BE19889467A",
|
||||
"live-pip.min.js": "48FF137D4CF1DEF16395184360981915FF716978455AAD6462C20EDE8A677819",
|
||||
"live-socket.min.js": "8AB690D1979FB64E7BA6126417700C0DD96C0E5C43712543590753B8344996C8",
|
||||
"live-speed-boost.min.js": "2E3AB65C4E673B9190E91D8238554E313D47BE672FB8391EBE3E86589C14EA5A",
|
||||
@ -182,7 +182,7 @@
|
||||
"narrow-danmaku.min.js": "C171A92EED435ACB8040B0F50BBCA0E04519D64173133D566F0E91C9E613E93C",
|
||||
"new-styles.min.js": "32CCD2D03D8C41EE77D8FB21BFEAD20CAE24B30D4FAA1FF348C1FD4AA1798E10",
|
||||
"no-banner.min.css": "DA096F94E7FA26992F3F71245E704D69A1C222D0ADA6F1990FA5D948507CE15F",
|
||||
"no-live-autoplay.min.js": "5FDC52CD8BD9C320A22D09E4395545785A9346CA7E9D395801E5635A58A651D4",
|
||||
"no-live-autoplay.min.js": "31917BE96EE9B8F8AC7E5FA17465AC8873ED7BB48AC3A44F4374E79C85363B70",
|
||||
"no-mini-video-autoplay.min.js": "D0738ED56C685C3B02F39C0D1A0694ACE71A07397A59C6FE37CD9BC496592462",
|
||||
"notify-new-version.min.js": "D922DCE08CFD1729BB778885E5EFB905FBE23A2878437AE2E9CF2263C22E196B",
|
||||
"online-info-row.vue.min.js": "48D42BADAD3F52BAFE20E2810567ED404A82DA78C8B7ECEB97C0D3E76CC61138",
|
||||
@ -192,10 +192,9 @@
|
||||
"override-navbar.min.js": "0FF50371A02F47EE384515544EB87D34CEE2DB449B9B864B5627A9645F921DAB",
|
||||
"pako-inflate.min.js": "1B89766B342D4A561B0CF7D5A68B2900B6D1772E507EEB1AF56FA7CABE40BCEC",
|
||||
"player-context-menu.min.js": "D84439ABC219CBCDF4C431DAA73E799265485F3C5C07AE57F9A251C7CF967E4A",
|
||||
"player-focus.min.js": "1F668C6A687550511DFEA2168A79ADB9CDA33309E920A43116FAC93006215569",
|
||||
"player-focus.min.js": "9A290D6749E68A4A88563983413A296BFA9B5C18B978F9CF80799196AEC0F9EE",
|
||||
"player-on-top.min.js": "0D9AA8561E97A6FFCEABDA206B6A57EB87C1B3EF5D0D53EDABA3ED5EFB0DF687",
|
||||
"player-ready.min.js": "70BEB550AE9AC35436ECCC0BAA21BF9C8C45C815EFC8028D03AFB58910863C9C",
|
||||
"player-scroll-patch.min.js": "BBD5AE6BC1DF14B8F138CE54F7F88A6370D26588CF9FF7944C47300EA82091BD",
|
||||
"player-shadow.min.js": "75979A94554D8CB9B80979C2F773FC196D61B5088EDD699EBE4D3659B570CC09",
|
||||
"quality-errors.min.js": "A691A407FC4F80C6B2D243CBFADC636FCFFC4DC35B9E305AEF4184AD3ECFC56B",
|
||||
"quick-favorite.min.css": "7829AE09EC0F9057C3970CDF4CEADC76A86269C1DA714E7BC64E6D783621076B",
|
||||
@ -206,7 +205,7 @@
|
||||
"remember-video-speed.min.js": "207AB95275A06977CE46AE37C5892FB7823A696C67DC40B4B13EAE82DED330C6",
|
||||
"remove-guide-popup.min.js": "801E2EAA47B55CBBF8DF2570781A76C411BB3EA3A8C3A87BB0A8369FF9E6D9EB",
|
||||
"remove-promotions.min.css": "DE7F28B81D660117F5C515D6F6360CD63F1CAF31AF06DE8BEF492FD3552C4B60",
|
||||
"remove-promotions.min.js": "C45270389F28BEFD963797665DCBC1D4B5D39401932B34834828549A9B33F2E1",
|
||||
"remove-promotions.min.js": "AE5C33D42077619647218BF635B7EBF371966C0245641856E18CD0F4039D225A",
|
||||
"remove-top-mask.min.js": "AD087C766DF146FDF8DCFF5F98950DBFAA4A43E3848FEEA0EC8D3A0A5CD276EA",
|
||||
"remove-video-popup.min.js": "6C48F3F46D5D4F3FC39859CC4FDA821BCD0D59B66FBE694529C75E6DE27DED6A",
|
||||
"remove-vote-popup.min.js": "00FB123A3E41AC0EB8D35F1C37E2E6A38C87E6DFD8666488E3A37E8B6B12BABF",
|
||||
@ -216,28 +215,29 @@
|
||||
"screenshot.min.css": "4957A144215ADB3AE5D4A9E80A42F41588FFA3A07D330142694B8A5B0AC3BE18",
|
||||
"screenshot.min.js": "7F66578E08B0E17CFE60C4100F8555010F3DD7EF97E902009B81E18251B43971",
|
||||
"scrollbar.min.css": "E17BDD4F223F7992A1AF279D7EBA58D9FBB51217F45964C79E30DC2ACBC15B46",
|
||||
"scroll-out-player.min.js": "72ABFE2BD457B42C8462DFEBB742FDBF9D57994AA79D2283626A2D70457278DC",
|
||||
"search.vue.min.js": "A3F4445026C3094C38EA4753BF7F22A8CD8D29D47CB2526BF3D88A29CC1EDD11",
|
||||
"selectable-column-text.min.js": "78B4CB6E8BA8641FFB546AECF4FE0EF0937FE6B383B2C0970957588FC87747DB",
|
||||
"seo-jump.min.js": "1FE9D71B9B213511AA693C1F59B3F2278FF12BFAD3827081890501B1FB084DC4",
|
||||
"settings-search.min.js": "915A490D620437A7F23BA1AAE68DD771C9099B6998D28BE64D1FE0AE067619DA",
|
||||
"settings-side-bar.min.js": "47DC1BB710EEB8266392B4346EDA60195784D3E177EA2B637C22DA5887463813",
|
||||
"settings-tooltip.en-US.min.js": "67ED2ED0B36F6581E95CD88D5CE481CD1FA8CA7BECFA0271875C11870B743133",
|
||||
"settings-tooltip.ja-JP.min.js": "2423EBF22C665DF5E0CD6AA2558A8D5FB258353D9824E285EA6880B2F0B13734",
|
||||
"settings-tooltip.en-US.min.js": "A5BDC3B8697EE7CFE1E3DC2C09038B2F9CD0573D6686EF97CC070FFD98992F96",
|
||||
"settings-tooltip.ja-JP.min.js": "2D7B873587B655F1BBA511FB5E9DE3D98F2CC7B2C4768C50840753DFA92B665F",
|
||||
"settings-tooltip.loader.min.js": "477DE4B69F477D67BCBC72CE33C91986EB2A5620D6F2D1D8367BBC388C5E3E5C",
|
||||
"settings-tooltip.min.css": "031B4E11744977C54496A3DB0FAB794401DC1FED2E53D9F729DA4218CD98E8D5",
|
||||
"settings-tooltip.min.js": "C7F9A79EB623BF58CB81DE4A9E74FC6C2EDB2613403EFE6D09B36FB460159A13",
|
||||
"settings-tooltip.zh-CN.min.js": "FADB6DEA305026F010E315E2A040802744C31F767D5CC000D029EE84DB144EFA",
|
||||
"settings-tooltip.zh-CN.min.js": "EA92236C51755F1704E2FADA6F17090A1775F003B3DE669FACAEAB5A4FDAAC1F",
|
||||
"show-cover-before-play.min.css": "E4050D66F8014029270CB5A4DEFDE2F847B095BA9ED4274BFED3E131B737B06D",
|
||||
"show-cover-before-play.min.js": "5614929DD8CEB3B11D184F037235D91B741AD167B08A4F5B7341C6A50A0838FF",
|
||||
"show-dead-video-title.min.js": "5B968442E71F947F70C57C9FDA083935200CBA9B1038131F1587E70A2B723798",
|
||||
"simple-home.vue.min.js": "EB32933DDE26F1D710BDACBFFA761AAF8DCF1B37971EE3B73B2953F75F913872",
|
||||
"simple-home.vue.min.js": "A1036F3AF1D4BB1BBADAC642691D18D158C47FC409BE64B9CB978E32D9E5DCAF",
|
||||
"simple-home-bangumi-category.vue.min.js": "5E0DBCA5694737CA6FFFEABB28B3FA29716C62355D8FBF14D86C4810BCF53E91",
|
||||
"simple-home-categories.vue.min.js": "CF703936550453015013BF4943EC036CF0F4BA2B9835D2F186B3FF2A406B37E9",
|
||||
"simple-home-feeds.vue.min.js": "5CF5FC40DB715756234B234D955EF8D4B2C127779F8BFA3038141D7EBE68C1D3",
|
||||
"simple-home-normal-category.vue.min.js": "354311133748055CB493D2668F8467D5E69B2607CC1F86F09EF8E7C097FAA344",
|
||||
"simplify-home.min.css": "A4D6FDE358B047A88ADF6D7F16207C383439EB1A635F8AF5D8CA7E7A29A59306",
|
||||
"simplify-home.min.js": "1E19F28B357C24B9B7F53ADC782DD6D4EEED6751EA879984D967C5FB4C925A9D",
|
||||
"simplify-home.vue.min.js": "F9356AA77904EA9F1BFA3F78373CA71ED7FFF5C218CE87CE44053661ECD5AFC4",
|
||||
"simplify-home.vue.min.js": "94BA1874DBB0D5448F3DD12EB822F1AF6AB6C053D5C17F85A54A8DEE07999BF7",
|
||||
"simplify-liveroom.min.css": "88A9CF4D46D6727E5CD3A4291573E8AA7E3CE8D6D118F1EE9B0135B50DA37FE5",
|
||||
"simplify-liveroom.min.js": "348C144003C08A5BEA53D41A571BE4CD3B8D79CCEC5DDD3DDE190F7D922DB399",
|
||||
"skip-charge-list.min.css": "D3C988CE131CEBFAC8A60360529C83EC4AE1B9EA122F9A6924F19963E25A4FE9",
|
||||
|
||||
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
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.min.css
vendored
2
min/custom-navbar.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/danmaku-send-bar.min.js
vendored
2
min/danmaku-send-bar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,t)=>{(async()=>{const{waitForControlBar:e}=await t.importAsync("live-control-bar");let n=false;const a="danmaku-send-bar";e({init:()=>{t.applyStyle("danmakuSendBarStyle")},callback:async e=>{const t=dq(e,".left-area");const s=await SpinQuery.select(".chat-input-ctnr .chat-input");const i=await SpinQuery.select(".chat-input-ctnr ~ .bottom-actions .bl-button--primary");if([t,s,i].some((e=>e===null))){return}if(dq(e,`.${a}`)){return}const l=Vue.extend({template:`\n<div class="${a}">\n<input\n type="text"\n placeholder="发个弹幕呗~"\n :value="value"\n @keydown.enter="send()"\n @input="updateValue($event.target.value)"\n maxlength="30"\n />\n</div>\n`,data(){return{value:s.value}},mounted(){s.addEventListener("input",this.listenChange);s.addEventListener("change",this.listenChange);if(!n){const e=Object.getOwnPropertyDescriptors(HTMLTextAreaElement.prototype).value;Object.defineProperty(s,"value",{...e,set(t){e.set.call(this,t);raiseEvent(s,"input")}});n=true}},beforeDestroy(){s.removeEventListener("input",this.listenChange);s.removeEventListener("change",this.listenChange)},methods:{updateValue(e){s.value=e;raiseEvent(s,"input")},send(){if(!i.disabled){this.value="";i.click()}},listenChange(e){this.value=e.target.value}}});const r=(new l).$mount().$el;t.insertAdjacentElement("afterend",r)}})})();return{reload:()=>document.body.classList.remove("danmaku-send-bar-unloaded"),unload:()=>document.body.classList.add("danmaku-send-bar-unloaded")}})();
|
||||
(()=>(e,t)=>{(async()=>{const{waitForControlBar:e}=await t.importAsync("live-control-bar");let n=false;let a;const l="danmaku-send-bar";e({init:()=>{t.applyStyle("danmakuSendBarStyle")},callback:async e=>{const t=dq(e,".left-area");const s=await SpinQuery.select(".chat-input-ctnr .chat-input");const r=await SpinQuery.select(".chat-input-ctnr ~ .bottom-actions .bl-button--primary");if([t,s,r].some((e=>e===null))){console.warn("[danmakuSendBar] ref elements not found",t===null,s===null,r===null);return}if(dq(e,`.${l}`)){return}if(!a){const e=Vue.extend({template:`\n<div class="${l}">\n<input\n type="text"\n placeholder="发个弹幕呗~"\n :value="value"\n @keydown.enter="send()"\n @input="updateValue($event.target.value)"\n maxlength="30"\n />\n</div>\n`,data(){return{value:s.value}},mounted(){s.addEventListener("input",this.listenChange);s.addEventListener("change",this.listenChange);if(!n){const e=Object.getOwnPropertyDescriptors(HTMLTextAreaElement.prototype).value;Object.defineProperty(s,"value",{...e,set(t){e.set.call(this,t);raiseEvent(s,"input")}});n=true}},beforeDestroy(){s.removeEventListener("input",this.listenChange);s.removeEventListener("change",this.listenChange)},methods:{updateValue(e){s.value=e;raiseEvent(s,"input")},send(){if(!r.disabled){this.value="";r.click()}},listenChange(e){this.value=e.target.value}}});a=(new e).$mount().$el}t.insertAdjacentElement("afterend",a)}})})();return{reload:()=>document.body.classList.remove("danmaku-send-bar-unloaded"),unload:()=>document.body.classList.add("danmaku-send-bar-unloaded")}})();
|
||||
2
min/dark.min.css
vendored
2
min/dark.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/default-player-mode.min.js
vendored
2
min/default-player-mode.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const t=[{name:"常规",action:()=>{}},{name:"宽屏",action:async()=>{const{playerScrollPatch:e}=await i.importAsync("player-scroll-patch");await e();document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition((()=>document.querySelector(".bilibili-player-video video")),(e=>e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()));if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let n=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any((()=>unsafeWindow.$(".bilibili-player-video-btn-setting")));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(".bilibili-player-video-btn-setting-right-others-content-lightoff .bui-checkbox-input");i.checked=e;raiseEvent(i,"change")};n=()=>i(true);a=()=>i(false)}}async function o(){await l();await SpinQuery.condition((()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area")),(e=>e.length===3&&$("video").length>0&&$("video").prop("duration")));const i=document.querySelector("video");if(!i){return}const o=t.find((i=>i.name===e.defaultPlayerMode));{const t=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};const l=_.get(JSON.parse(localStorage.getItem("bilibili_player_settings")),"video_status.autoplay",false);if(e.applyPlayerModeOnPlay&&!l){i.addEventListener("play",t,{once:true})}else{t()}if(l){n()}i.addEventListener("ended",a);i.addEventListener("pause",a);i.addEventListener("play",n)}}Observer.videoChange(o)})();
|
||||
(()=>(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const t=[{name:"常规",action:()=>{}},{name:"宽屏",action:async()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition((()=>document.querySelector(".bilibili-player-video video")),(e=>e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()));if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let n=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any((()=>unsafeWindow.$(".bilibili-player-video-btn-setting")));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(".bilibili-player-video-btn-setting-right-others-content-lightoff .bui-checkbox-input");i.checked=e;raiseEvent(i,"change")};n=()=>i(true);a=()=>i(false)}}async function o(){await l();await SpinQuery.condition((()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area")),(e=>e.length===3&&$("video").length>0&&$("video").prop("duration")));const i=document.querySelector("video");if(!i){return}const o=t.find((i=>i.name===e.defaultPlayerMode));{const t=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};const l=_.get(JSON.parse(localStorage.getItem("bilibili_player_settings")),"video_status.autoplay",false);if(e.applyPlayerModeOnPlay&&!l){i.addEventListener("play",t,{once:true})}else{t()}if(l){n()}i.addEventListener("ended",a);i.addEventListener("pause",a);i.addEventListener("play",n)}}Observer.videoChange(o)})();
|
||||
2
min/expand-description.min.css
vendored
2
min/expand-description.min.css
vendored
@ -1 +1 @@
|
||||
.play-up-info .play-up-self,.video-desc .info{height:auto!important}.play-up-info .play-up-self-btn,.video-desc .btn{display:none!important}
|
||||
.play-up-info .play-up-self,.video-desc .desc-info,.video-desc .info{height:auto!important}.play-up-info .play-up-self-btn,.video-desc .btn,.video-desc .toggle-btn{display:none!important}
|
||||
2
min/expand-description.min.js
vendored
2
min/expand-description.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,t)=>{const n="expandDescriptionStyle";const r=()=>{t.applyStyle(n);Observer.videoChange((async()=>{const e=await SpinQuery.select(".video-desc");if(!e){return}const t=await SpinQuery.select('.video-desc .btn[report-id="abstract_spread"]');t===null||t===void 0?void 0:t.click()}))};r();return{reload:r,unload:()=>t.removeStyle(n)}})();
|
||||
(()=>(e,t)=>{const n="expandDescriptionStyle";const o=()=>{t.applyStyle(n);Observer.videoChange((async()=>{const e=await SpinQuery.select(".video-desc");if(!e){return}const t=await SpinQuery.select('.video-desc .btn[report-id="abstract_spread"], .video-desc .toggle-btn');t===null||t===void 0?void 0:t.click()}))};o();return{reload:o,unload:()=>t.removeStyle(n)}})();
|
||||
2
min/feeds-apis.min.js
vendored
2
min/feeds-apis.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/fullscreen-gift-box.min.css
vendored
2
min/fullscreen-gift-box.min.css
vendored
@ -1 +1 @@
|
||||
.player-full-win .gift-control-section{display:block!important;left:unset;bottom:unset;top:100vh;right:302px}.player-full-win .z-gift-package .wrap{right:0;bottom:74px}.player-full-win.hide-aside-area .gift-control-section{right:0}.live-web-player-controller .fullscreen-gift-box{display:none}@media screen and (min-width:1038px){.player-full-win:not(.fullscreen-gift-box-unloaded) .gift-control-panel .z-gift-package .arrow-bottom.popup::after,.player-full-win:not(.fullscreen-gift-box-unloaded) .gift-control-panel .z-gift-package .arrow-bottom.popup::before{left:39%!important}.player-full-win:not(.fullscreen-gift-box-unloaded) .live-web-player-controller .control-area .fullscreen-gift-box{display:flex;align-self:center;margin:0 4px;padding:0 4px;cursor:pointer;color:#fdfdfd}.player-full-win:not(.fullscreen-gift-box-unloaded) .live-web-player-controller .control-area .fullscreen-gift-box:hover{color:#fff}}
|
||||
.player-full-win .gift-control-section{display:block!important;left:unset;bottom:unset;top:100vh;right:302px}.player-full-win .z-gift-package .wrap{right:0;bottom:74px}.player-full-win.hide-aside-area .gift-control-section{right:0}.live-web-player-controller .fullscreen-gift-box{display:none}@media screen and (min-width:1038px){.player-full-win:not(.fullscreen-gift-box-unloaded) .gift-control-panel .z-gift-package .arrow-bottom.popup::after,.player-full-win:not(.fullscreen-gift-box-unloaded) .gift-control-panel .z-gift-package .arrow-bottom.popup::before{left:50%!important}.player-full-win:not(.fullscreen-gift-box-unloaded) .live-web-player-controller .control-area .fullscreen-gift-box{display:flex;align-self:center;margin:0 4px;padding:0 4px;cursor:pointer;color:#fdfdfd}.player-full-win:not(.fullscreen-gift-box-unloaded) .live-web-player-controller .control-area .fullscreen-gift-box:hover{color:#fff}}
|
||||
2
min/fullscreen-gift-box.min.js
vendored
2
min/fullscreen-gift-box.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(t,e)=>{(async()=>{const{waitForControlBar:t}=await e.importAsync("live-control-bar");const n="fullscreen-gift-box";t({init:()=>e.applyImportantStyle("fullscreenGiftBoxStyle"),callback:async t=>{const e=dq(t,".right-area");if(!e){return}if(dq(e,`.${n}`)){return}const l=".gift-package";const o=document.createElement("div");o.innerHTML="包裹";o.classList.add(n);o.addEventListener("click",(()=>{const t=dq(l);t===null||t===void 0?void 0:t.click()}));e.appendChild(o)}})})();return{reload:()=>document.body.classList.remove("fullscreen-gift-box-unloaded"),unload:()=>document.body.classList.add("fullscreen-gift-box-unloaded")}})();
|
||||
(()=>(e,n)=>{(async()=>{const{waitForControlBar:e}=await n.importAsync("live-control-bar");const t="fullscreen-gift-box";let l;e({init:()=>n.applyImportantStyle("fullscreenGiftBoxStyle"),callback:async e=>{const n=dq(e,".right-area");if(!n){console.warn("[fullscreenGiftBox] ref elements not found",n===null);return}if(dq(n,`.${t}`)){return}if(!l){const e=".gift-package";l=document.createElement("div");l.innerHTML="包裹";l.classList.add(t);l.addEventListener("click",(()=>{const n=dq(e);n===null||n===void 0?void 0:n.click()}))}n.appendChild(l)}})})();return{reload:()=>document.body.classList.remove("fullscreen-gift-box-unloaded"),unload:()=>document.body.classList.add("fullscreen-gift-box-unloaded")}})();
|
||||
File diff suppressed because one or more lines are too long
2
min/hide-related-videos.min.js
vendored
2
min/hide-related-videos.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(i,n)=>n.toggleStyle(`\n #recom_module,#reco_list,.bilibili-player-ending-panel-box-videos {\n display: none !important;\n }\n .bilibili-player-ending-panel-box-functions .bilibili-player-upinfo-spans {\n position: static !important;\n }\n .bilibili-player-ending-panel-box {\n display: flex !important;\n justify-content: center !important;\n flex-direction: column !important;\n }\n`,`hide-related-videos-style`))();
|
||||
(()=>(i,n)=>n.toggleStyle(`\n #recom_module,#reco_list,.bilibili-player-ending-panel-box-videos,.r-con .rcmd-list {\n display: none !important;\n }\n .bilibili-player-ending-panel-box-functions .bilibili-player-upinfo-spans {\n position: static !important;\n }\n .bilibili-player-ending-panel-box {\n display: flex !important;\n justify-content: center !important;\n flex-direction: column !important;\n }\n`,`hide-related-videos-style`))();
|
||||
2
min/home-hidden.min.css
vendored
2
min/home-hidden.min.css
vendored
@ -1 +1 @@
|
||||
body.home-hidden-animal .storey-box .proxy-box #bili_animal,body.home-hidden-anime .storey-box .proxy-box #bili_anime,body.home-hidden-cheese .storey-box .proxy-box #bili_cheese,body.home-hidden-cinephile .storey-box .proxy-box #bili_cinephile,body.home-hidden-dance .storey-box .proxy-box #bili_dance,body.home-hidden-digital .storey-box .proxy-box #bili_digital,body.home-hidden-documentary .storey-box .proxy-box #bili_documentary,body.home-hidden-douga .storey-box .proxy-box #bili_douga,body.home-hidden-ent .storey-box .proxy-box #bili_ent,body.home-hidden-fashion .storey-box .proxy-box #bili_fashion,body.home-hidden-food .storey-box .proxy-box #bili_food,body.home-hidden-game .storey-box .proxy-box #bili_game,body.home-hidden-guochuang .storey-box .proxy-box #bili_guochuang,body.home-hidden-information .storey-box .proxy-box #bili_information,body.home-hidden-kichiku .storey-box .proxy-box #bili_kichiku,body.home-hidden-life .storey-box .proxy-box #bili_life,body.home-hidden-live .storey-box .proxy-box #bili_live,body.home-hidden-manga .storey-box .proxy-box #bili_manga,body.home-hidden-movie .storey-box .proxy-box #bili_movie,body.home-hidden-music .storey-box .proxy-box #bili_music,body.home-hidden-read .storey-box .proxy-box #bili_read,body.home-hidden-technology .storey-box .proxy-box #bili_technology,body.home-hidden-teleplay .storey-box .proxy-box #bili_teleplay{display:none!important}.gui-settings-flat-button .home-hidden-settings.popup{align-items:stretch}.home-hidden-settings-item{padding:4px 12px;display:flex;align-items:center;border-radius:8px}.home-hidden-settings-item .mdi-eye-off{display:none}.home-hidden-settings-item:hover{background:#8882}.home-hidden-settings-item.home-hidden{opacity:.5}.home-hidden-settings-item.home-hidden .mdi-eye{display:none}.home-hidden-settings-item.home-hidden .mdi-eye-off{display:inline-flex}
|
||||
.gui-settings-flat-button .home-hidden-settings.popup{align-items:flex-start;flex-direction:row;flex-wrap:wrap;max-width:180px;left:-24px;transform:translateY(-8px)}.gui-settings-flat-button .home-hidden-settings.popup.opened{transform:translateY(0)}.home-hidden-settings-item{padding:4px 12px;flex-grow:1;display:flex;align-items:center;border-radius:8px}.home-hidden-settings-item .mdi-eye-off{display:none}.home-hidden-settings-item:hover{background:#8882}.home-hidden-settings-item.home-hidden{opacity:.5}.home-hidden-settings-item.home-hidden .mdi-eye{display:none}.home-hidden-settings-item.home-hidden .mdi-eye-off{display:inline-flex}
|
||||
2
min/home-hidden.min.js
vendored
2
min/home-hidden.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,n)=>{const i=()=>!e.simplifyHome&&document.URL.includes("https://www.bilibili.com/");const a=[{name:"categories",displayName:"分区栏",style:`\n .bili-header-m>.bili-wrapper {\n visibility: hidden !important;\n height: 18px !important;\n }\n .primary-menu-itnl {\n visibility: hidden !important;\n height: 24px !important;\n padding: 0 !important;\n }\n`},{name:"trends",displayName:"活动/热门视频",style:`\n .first-screen #reportFirst1 { display: none !important; }\n .first-screen .space-between {\n margin-bottom: 0 !important;\n }\n .rcmd-box-wrap { display: none !important; }\n`},{name:"online",displayName:"在线列表",style:`\n .first-screen #reportFirst2 { display: none !important; }\n`},{name:"special",displayName:"特别推荐",style:`\n #bili_report_spe_rec { display: none !important; }\n`},{name:"contact",displayName:"联系方式",style:`\n .international-footer { display: none !important; }\n`},{name:"elevator",displayName:"右侧分区导航",style:`\n .storey-box .elevator { display: none !important; }\n`},{name:"live",displayName:"直播"},{name:"douga",displayName:"动画"},{name:"anime",displayName:"番剧"},{name:"guochuang",displayName:"国创"},{name:"manga",displayName:"漫画"},{name:"music",displayName:"音乐"},{name:"dance",displayName:"舞蹈"},{name:"game",displayName:"游戏"},{name:"technology",displayName:"知识"},{name:"cheese",displayName:"课堂"},{name:"digital",displayName:"数码"},{name:"life",displayName:"生活"},{name:"food",displayName:"美食"},{name:"animal",displayName:"动物圈"},{name:"kichiku",displayName:"鬼畜"},{name:"fashion",displayName:"时尚"},{name:"information",displayName:"资讯"},{name:"ent",displayName:"娱乐"},{name:"read",displayName:"专栏"},{name:"movie",displayName:"电影"},{name:"teleplay",displayName:"电视剧"},{name:"cinephile",displayName:"影视"},{name:"documentary",displayName:"纪录片"}];const t=i=>{if(!e.homeHiddenItems.includes(i.name)){if(i.style){var a;(a=dq(`#home-hidden-style-${i.name}`))===null||a===void 0?void 0:a.remove()}else{document.body.classList.remove(`home-hidden-${i.name}`)}}else{if(i.style){n.applyImportantStyleFromText(i.style,`home-hidden-style-${i.name}`)}else{document.body.classList.add(`home-hidden-${i.name}`)}}};if(i()){a.forEach(t);n.applyImportantStyle("homeHiddenStyle")}return{widget:{condition:i,content:`\n<div class="gui-settings-flat-button" style="position: relative" id="home-hidden">\n<i class="mdi mdi-24px mdi-settings"></i>\n<span>首页过滤</span>\n<div class="home-hidden-settings popup">\n<div v-for="item in items" @click="toggle(item)" :key="item.name" class="home-hidden-settings-item" :class="{ 'home-hidden': hiddenItems.includes(item.name) }">\n<i class="mdi mdi-18px mdi-eye"></i>\n<i class="mdi mdi-18px mdi-eye-off"></i>\n {{ item.displayName }}\n</div>\n</div>\n</div>\n`,success:async()=>{const n=dq("#home-hidden");new Vue({el:dq(n,".popup"),data(){return{items:a,hiddenItems:[...e.homeHiddenItems]}},watch:{hiddenItems(n){e.homeHiddenItems=[...n]}},mounted(){const e=this.$el;n.addEventListener("click",(n=>{if(n.target===e||e.contains(n.target)){return}e.classList.toggle("opened")}))},methods:{async toggle(e){const n=this.hiddenItems;const i=n.indexOf(e.name);if(i!==-1){n.splice(i,1)}else{n.push(e.name)}await this.$nextTick();t(e)}}})}}}})();
|
||||
(()=>(e,n)=>{const i=()=>{if(document.URL==="https://www.bilibili.com/"){return!e.simplifyHome}return document.URL.includes("https://www.bilibili.com/")};const t=[{name:"categories",displayName:"分区栏",style:`\n .bili-header-m>.bili-wrapper {\n visibility: hidden !important;\n height: 18px !important;\n }\n .primary-menu-itnl {\n visibility: hidden !important;\n height: 24px !important;\n padding: 0 !important;\n }\n`},{name:"trends",displayName:"活动/热门视频",style:`\n .first-screen #reportFirst1 { display: none !important; }\n .first-screen .space-between {\n margin-bottom: 0 !important;\n }\n .rcmd-box-wrap { display: none !important; }\n`},{name:"online",displayName:"在线列表",style:`\n .first-screen #reportFirst2 { display: none !important; }\n`},{name:"ext-box",displayName:"电竞赛事",style:`\n .first-screen #reportFirst3 { display: none !important; } `},{name:"special",displayName:"特别推荐",style:`\n #bili_report_spe_rec { display: none !important; }\n`},{name:"contact",displayName:"联系方式",style:`\n .international-footer { display: none !important; }\n`},{name:"elevator",displayName:"右侧分区导航",style:`\n .storey-box .elevator { display: none !important; }\n`}];const s=i=>{if(!e.homeHiddenItems.includes(i.name)){if(i.style){var t;(t=dq(`#home-hidden-style-${i.name}`))===null||t===void 0?void 0:t.remove()}else{document.body.classList.remove(`home-hidden-${i.name}`)}}else{if(i.style){n.applyImportantStyleFromText(i.style,`home-hidden-style-${i.name}`)}else{document.body.classList.add(`home-hidden-${i.name}`)}}};(async()=>{if(!i()){return}const e=(await SpinQuery.condition((()=>dqa(".proxy-box > div")),(e=>e.length>0||document.URL!=="https://www.bilibili.com/"))).map((e=>{var n,i,t;return{name:e.id.replace(/^bili_/,""),displayName:(n=(i=e.querySelector("header .name"))===null||i===void 0?void 0:(t=i.textContent)===null||t===void 0?void 0:t.trim())!==null&&n!==void 0?n:"未知分区"}}));t.push(...e);t.forEach(s);const o=e.map((({name:e})=>`\nbody.home-hidden-${e} .storey-box .proxy-box #bili_${e} {\n display: none !important;\n}\n`.trim())).join("\n");const d=n.import("homeHiddenStyle");n.applyImportantStyleFromText(o+d,"home-hidden-style")})();return{widget:{condition:i,content:`\n<div class="gui-settings-flat-button" style="position: relative" id="home-hidden">\n<i class="mdi mdi-24px mdi-settings"></i>\n<span>首页过滤</span>\n<div class="home-hidden-settings popup">\n<div v-for="item in items" @click="toggle(item)" :key="item.name" class="home-hidden-settings-item" :class="{ 'home-hidden': hiddenItems.includes(item.name) }">\n<i class="mdi mdi-18px mdi-eye"></i>\n<i class="mdi mdi-18px mdi-eye-off"></i>\n {{ item.displayName }}\n</div>\n</div>\n</div>\n`,success:async()=>{const n=dq("#home-hidden");new Vue({el:dq(n,".popup"),data(){return{items:t,hiddenItems:[...e.homeHiddenItems]}},watch:{hiddenItems(n){e.homeHiddenItems=[...n]}},mounted(){const e=this.$el;n.addEventListener("click",(n=>{if(n.target===e||e.contains(n.target)){return}e.classList.toggle("opened")}))},methods:{async toggle(e){const n=this.hiddenItems;const i=n.indexOf(e.name);if(i!==-1){n.splice(i,1)}else{n.push(e.name)}await this.$nextTick();s(e)}}})}}}})();
|
||||
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/image-resolution.min.js
vendored
2
min/image-resolution.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(t,e)=>{const n=/@(\d+)[Ww]_(\d+)[Hh]/;const o=t.imageResolutionScale==="auto"?window.devicePixelRatio:parseFloat(t.imageResolutionScale);const i=["#certify-img1","#certify-img2"];const r=(t,e)=>{const n=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,null);let o=n.nextNode();while(o){if(o instanceof HTMLElement){e(o)}o=n.nextNode()}};async function a(t){const e=(e,r)=>{const a=e(t);if(a===null){return}if(i.some((e=>t.matches(e)))){return}const s=a.match(n);if(!s){return}let[,c,l]=s;let u=parseInt(t.getAttribute("data-resolution-width")||"0");if(parseInt(c)>=u&&u!==0){return}if(t.getAttribute("width")===null&&t.getAttribute("height")===null){t.setAttribute("width",c)}c=Math.round(o*parseInt(c)).toString();l=Math.round(o*parseInt(l)).toString();t.setAttribute("data-resolution-width",c);r(t,a.replace(n,`@${c}w_${l}h`))};Observer.attributes(t,(()=>{e((t=>t.getAttribute("src")),((t,e)=>t.setAttribute("src",e)));e((t=>t.style.backgroundImage),((t,e)=>t.style.backgroundImage=e))}))}const s=async()=>{r(document.body,(t=>a(t)));Observer.childListSubtree(document.body,(t=>{for(const e of t){for(const t of e.addedNodes){if(t instanceof HTMLElement){a(t);if(t.nodeName.toUpperCase()!=="IMG"){r(t,(t=>a(t)))}}}}}))};s();e.applyStyleFromText(`\n.favInfo-box .favInfo-cover img {\n width: 100% !important;\n object-position: left !important;\n}\n.bili-avatar-img {\n width: 100% !important;\n}\n`,"image-resolution-fix");return{export:{imageResolution:a}}})();
|
||||
(()=>(t,e)=>{const n=/@(\d+)[Ww]_(\d+)[Hh]/;const i=t.imageResolutionScale==="auto"?window.devicePixelRatio:parseFloat(t.imageResolutionScale);const o=["#certify-img1","#certify-img2"];const r=(t,e)=>{const n=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,null);let i=n.nextNode();while(i){if(i instanceof HTMLElement){e(i)}i=n.nextNode()}};async function a(t){const e=(e,r)=>{const a=e(t);if(a===null){return}if(o.some((e=>t.matches(e)))){return}const s=a.match(n);if(!s){return}let[,l,c]=s;let d=parseInt(t.getAttribute("data-resolution-width")||"0");if(parseInt(l)>=d&&d!==0){return}if(t.getAttribute("width")===null&&t.getAttribute("height")===null){t.setAttribute("width",l)}l=Math.round(i*parseInt(l)).toString();c=Math.round(i*parseInt(c)).toString();t.setAttribute("data-resolution-width",l);r(t,a.replace(n,`@${l}w_${c}h`))};Observer.attributes(t,(()=>{e((t=>t.getAttribute("src")),((t,e)=>t.setAttribute("src",e)));e((t=>t.style.backgroundImage),((t,e)=>t.style.backgroundImage=e))}))}const s=async()=>{r(document.body,(t=>a(t)));Observer.childListSubtree(document.body,(t=>{for(const e of t){for(const t of e.addedNodes){if(t instanceof HTMLElement){a(t);if(t.nodeName.toUpperCase()!=="IMG"){r(t,(t=>a(t)))}}}}}))};s();e.applyStyleFromText(`\n.favInfo-box .favInfo-cover img {\n width: 100% !important;\n object-position: left !important;\n}\n.bili-avatar-img {\n width: 100% !important;\n}\n.bb-comment .sailing .sailing-img,\n.comment-bilibili-fold .sailing .sailing-img {\n width: 288px;\n}\n`,"image-resolution-fix");return{export:{imageResolution:a}}})();
|
||||
2
min/live-control-bar.min.js
vendored
2
min/live-control-bar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(r,t)=>{const i=async r=>{if(!document.URL.match(/^https:\/\/live.bilibili.com\/(blanc\/)?(\d+)/)){return}const t=await SpinQuery.select(".bilibili-live-player-video-controller, .web-player-controller-wrap");if(!t){return}const{init:i,callback:e}=r;i(t);Observer.childList(t,(async()=>{const r=dq(t,".control-area");if(!r){return}e(r)}))};return{export:{waitForControlBar:i}}})();
|
||||
(()=>(r,t)=>{const e=async r=>{if(!document.URL.match(/^https:\/\/live.bilibili.com\/(blanc\/)?(\d+)/)){return}const t=await SpinQuery.select(".bilibili-live-player-video-controller, .web-player-controller-wrap:not(.web-player-controller-bg)");if(!t){return}const{init:e,callback:l}=r;e(t);Observer.childList(t,(async()=>{const r=dq(t,".control-area");if(!r){return}l(r)}))};return{export:{waitForControlBar:e}}})();
|
||||
2
min/no-live-autoplay.min.js
vendored
2
min/no-live-autoplay.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,i)=>{(async()=>{const e=document.URL.replace(window.location.search,"");if(e!=="https://live.bilibili.com/"&&e!=="https://live.bilibili.com/index.html"){return}SpinQuery.condition((()=>document.querySelector(".component-ctnr video,.bilibili-live-player-video video")),(e=>e&&!e.paused),(()=>{const e=dq(".live-web-player-controller .left-area > :first-child");e===null||e===void 0?void 0:e.click()}));const i="hide-home-live-style";addSettingsListener("hideHomeLive",(e=>{if(e===true){const e=document.createElement("style");e.innerText=`.player-area-ctnr,#player-header { display: none !important }`;e.id=i;document.body.append(e)}else{const e=document.getElementById(i);e&&e.remove()}}),true)})()})();
|
||||
(()=>(e,t)=>{(async()=>{const e=document.URL.replace(window.location.search,"");if(e!=="https://live.bilibili.com/"&&e!=="https://live.bilibili.com/index.html"){return}SpinQuery.select("video").then((e=>{e.muted=true}));const t="hide-home-live-style";addSettingsListener("hideHomeLive",(e=>{if(e===true){const e=document.createElement("style");e.innerText=`.player-area-ctnr,#player-header { display: none !important }`;e.id=t;document.body.append(e)}else{const e=document.getElementById(t);e&&e.remove()}}),true)})()})();
|
||||
2
min/player-focus.min.js
vendored
2
min/player-focus.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(o,t)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")){return}const i=document.URL.includes("bangumi")?".bilibili-player":".video-info .video-title .tit";const l=await SpinQuery.select(i);const{playerReady:e}=await t.importAsync("player-ready");await e();const{playerScrollPatch:a}=await t.importAsync("player-scroll-patch");await a();console.log(l);if(l===null){return}l.scrollIntoView();if(o.playerFocusOffset!==0){window.scrollBy(0,o.playerFocusOffset)}console.log(l.offsetTop,o.playerFocusOffset,window.scrollY)})()})();
|
||||
(()=>(i,o)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")){return}const e=document.URL.includes("bangumi")?".bilibili-player":".video-info .video-title .tit";const t=await SpinQuery.select(e);const{playerReady:l}=await o.importAsync("player-ready");await l();console.log(t);if(t===null){return}t.scrollIntoView();if(i.playerFocusOffset!==0){window.scrollBy(0,i.playerFocusOffset)}console.log(t.offsetTop,i.playerFocusOffset,window.scrollY)})()})();
|
||||
1
min/player-scroll-patch.min.js
vendored
1
min/player-scroll-patch.min.js
vendored
@ -1 +0,0 @@
|
||||
(()=>(e,n)=>{const i=_.once((async()=>{await videoCondition();const e=await SpinQuery.select((()=>unsafeWindow.PlayerAgent));e.player_widewin=function(){unsafeWindow.isWide=true;unsafeWindow.setSize()}}));return{export:{playerScrollPatch:i}}})();
|
||||
2
min/remove-promotions.min.js
vendored
2
min/remove-promotions.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(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">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`);t.style.visibility="hidden";i.querySelector("a.more-text").style.display="none";i.querySelector("img").style.display="none"}}))}));SpinQuery.select(".focus-carousel.home-slide").then((t=>{if(!t){return}[...t.querySelectorAll(".gg-icon,.bypb-icon")].map((e=>e.parentElement.parentElement)).forEach((t=>{t.style.display="none";t.insertAdjacentHTML("afterend",`\n<div class="blocked new">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`)}))}))}addSettingsListener("preserveEventBanner",(e=>{document.body.classList.toggle("preserve-event-banner",e)}),true)})();
|
||||
(()=>(e,n)=>{if(document.URL.replace(window.location.search,"")==="https://www.bilibili.com/"){SpinQuery.any((()=>dqa(".gg-pic")),(n=>{n.forEach((n=>{const t=n.parentElement;t.style.display="none";const l=[...t.parentElement.childNodes].indexOf(t)+1;const i=t.parentElement.parentElement.querySelector(`.pic li:nth-child(${l})`);if(i){i.style.display="flex";const n=i.querySelector("a:not(.more-text)");n.insertAdjacentHTML("afterend",`\n<div class="blocked">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`);n.style.visibility="hidden";i.querySelector("a.more-text").style.display="none";i.querySelector("img").style.display="none"}}))}));SpinQuery.select(".focus-carousel.home-slide").then((n=>{if(!n){return}[...n.querySelectorAll(".gg-icon,.bypb-icon")].map((e=>e.parentElement.parentElement)).forEach((n=>{n.style.display="none";n.insertAdjacentHTML("afterend",`\n<div class="blocked new">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`)}))}))}addSettingsListener("preserveEventBanner",(e=>{document.body.classList.toggle("preserve-event-banner",e)}),true)})();
|
||||
1
min/scroll-out-player.min.js
vendored
Normal file
1
min/scroll-out-player.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>(e,t)=>{let r;let n;let a;let i=true;var l;(function(e){e["TOP"]="视频顶部";e["MID"]="视频中间";e["BOT"]="视频底部"})(l||(l={}));function u(e){switch(e){case l.TOP:return 1;case l.MID:return.5;case l.BOT:return 0;default:return.5}}let s=()=>{};let o=()=>{};async function c(){await SpinQuery.unsafeJquery();const e=await SpinQuery.any((()=>unsafeWindow.$(".bilibili-player-video-btn-setting")));if(!e){return}e.mouseover().mouseout();const t=async e=>{const t=await SpinQuery.select(".bilibili-player-video-btn-setting-right-others-content-lightoff .bui-checkbox-input");t.checked=e;raiseEvent(t,"change")};s=()=>t(true);o=()=>t(false)}function d(){a.observe(n)}function y(){a.unobserve(n)}let f=()=>{if(i)return;i=true;if(e.scrollOutPlayerAutoPause&&r.paused){r.play()}if(e.scrollOutPlayerAutoLightOn&&e.useDefaultPlayerMode&&e.autoLightOff&&!e.scrollOutPlayerAutoPause&&!r.paused){s()}};let v=()=>{if(!r.paused){i=false}if(e.scrollOutPlayerAutoPause&&!r.paused){r.pause()}if(e.scrollOutPlayerAutoLightOn&&e.useDefaultPlayerMode&&e.autoLightOff&&!e.scrollOutPlayerAutoPause){o()}};let O=t=>new IntersectionObserver((([e])=>{e.isIntersecting?f():v()}),{root:document,threshold:u(t?t:e.scrollOutPlayerTriggerPlace)});function p(){Observer.videoChange((async()=>{r.addEventListener("play",d);r.addEventListener("ended",y)}))}(async function e(){await c();addSettingsListener("scrollOutPlayerTriggerPlace",(e=>{y();a=O(e);d()}));r=dq(".bilibili-player-video video");n=dq(".player-wrap")||dq(".player-module");a=O();p()})();return{reload:()=>{d();p()},unload:()=>{Observer.videoChange((async()=>{r.removeEventListener("play",d);r.removeEventListener("ended",y)}));y()}}})();
|
||||
2
min/settings-tooltip.en-US.min.js
vendored
2
min/settings-tooltip.en-US.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/settings-tooltip.ja-JP.min.js
vendored
2
min/settings-tooltip.ja-JP.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/settings-tooltip.zh-CN.min.js
vendored
2
min/settings-tooltip.zh-CN.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/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-home.vue.min.js
vendored
2
min/simplify-home.vue.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,o)=>{const m=`<div class=simplify-home><component class=simplify-home-component :is=activeComponent></component></div>`;o.applyStyleFromText(`.simplify-home{padding-top:32px;display:flex;align-items:flex-start;justify-content:center;min-height:100vh;background-color:#f4f4f4}body.dark .simplify-home{background-color:#181818}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:m},{components:{"minimal-home":()=>o.importAsync("minimal-home.vue"),"simple-home":()=>o.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}})();
|
||||
(()=>(e,o)=>{const m=`<div class=simplify-home><component class=simplify-home-component :is=activeComponent></component></div>`;o.applyStyleFromText(`.simplify-home{padding-top:32px;display:flex;align-items:flex-start;justify-content:center;min-height:100vh;background-color:#f4f4f4;font-size:12px}body.dark .simplify-home{background-color:#181818}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:m},{components:{"minimal-home":()=>o.importAsync("minimal-home.vue"),"simple-home":()=>o.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}})();
|
||||
@ -4,11 +4,15 @@ export interface FeedsCardType {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
export interface RepostFeedsCardType extends FeedsCardType {
|
||||
id: 1
|
||||
name: '转发'
|
||||
}
|
||||
export const feedsCardTypes = {
|
||||
repost: {
|
||||
id: 1,
|
||||
name: '转发',
|
||||
} as FeedsCardType,
|
||||
} as RepostFeedsCardType,
|
||||
textWithImages: {
|
||||
id: 2,
|
||||
name: '图文'
|
||||
@ -68,7 +72,7 @@ export const feedsCardTypes = {
|
||||
liveRecord: {
|
||||
id: 2047, // FIXME: 暂时随便写个 id 了, 这个东西目前找不到 type
|
||||
name: '开播记录',
|
||||
},
|
||||
} as FeedsCardType,
|
||||
}
|
||||
export interface FeedsCard {
|
||||
id: string
|
||||
@ -82,6 +86,11 @@ export interface FeedsCard {
|
||||
presented: boolean
|
||||
getText: () => Promise<string>
|
||||
}
|
||||
export interface RepostFeedsCard extends FeedsCard {
|
||||
repostUsername: string
|
||||
repostText: string
|
||||
type: RepostFeedsCardType
|
||||
}
|
||||
const getFeedsCardType = (element: HTMLElement) => {
|
||||
if (element.querySelector('.repost')) {
|
||||
return feedsCardTypes.repost
|
||||
@ -112,7 +121,9 @@ const getFeedsCardType = (element: HTMLElement) => {
|
||||
}
|
||||
return feedsCardTypes.text
|
||||
}
|
||||
|
||||
const isRepostType = (card: FeedsCard): card is RepostFeedsCard => {
|
||||
return card.type === feedsCardTypes.repost
|
||||
}
|
||||
export type FeedsCardCallback = {
|
||||
added?: (card: FeedsCard) => void
|
||||
removed?: (card: FeedsCard) => void
|
||||
@ -213,6 +224,25 @@ class FeedsCardsManager extends EventTarget {
|
||||
const subElementText = subElement.innerText.trim()
|
||||
return subElementText
|
||||
}
|
||||
const getRepostData = (vueData: any) => {
|
||||
// 被转发动态已失效
|
||||
if (vueData.card.origin === undefined) {
|
||||
return {
|
||||
originalText: '',
|
||||
originalDescription: '',
|
||||
originalTitle: '',
|
||||
}
|
||||
}
|
||||
const originalCard = JSON.parse(vueData.card.origin)
|
||||
const originalText: string = vueData.originCardData.pureText
|
||||
const originalDescription: string = _.get(originalCard, 'item.description', '')
|
||||
const originalTitle: string = originalCard.title
|
||||
return {
|
||||
originalText,
|
||||
originalDescription,
|
||||
originalTitle,
|
||||
}
|
||||
}
|
||||
const getComplexText = async (type: FeedsCardType) => {
|
||||
if (type === feedsCardTypes.bangumi) {
|
||||
return ''
|
||||
@ -232,19 +262,10 @@ class FeedsCardsManager extends EventTarget {
|
||||
const vueData = getVueData(el)
|
||||
if (type === feedsCardTypes.repost) {
|
||||
const currentText = vueData.card.item.content
|
||||
// 被转发动态已失效
|
||||
if (vueData.card.origin === undefined) {
|
||||
return currentText
|
||||
}
|
||||
const originalCard = JSON.parse(vueData.card.origin)
|
||||
const originalText = vueData.originCardData.pureText
|
||||
const originalDescription = _.get(originalCard, 'item.description', '')
|
||||
const originalTitle = originalCard.title
|
||||
const repostData = getRepostData(vueData)
|
||||
return [
|
||||
currentText,
|
||||
originalText,
|
||||
originalDescription,
|
||||
originalTitle
|
||||
...Object.values(repostData).filter(it => it !== ''),
|
||||
].filter(it => Boolean(it)).join('\n')
|
||||
}
|
||||
const currentText = vueData.originCardData.pureText
|
||||
@ -281,13 +302,15 @@ class FeedsCardsManager extends EventTarget {
|
||||
await card.getText()
|
||||
card.presented = element.parentNode !== null
|
||||
element.setAttribute('data-type', card.type.id.toString())
|
||||
if (card.type === feedsCardTypes.repost) {
|
||||
if (isRepostType(card)) {
|
||||
const currentUsername = card.username
|
||||
const vueData = getVueData(card.element)
|
||||
const repostUsername = _.get(vueData, 'card.origin_user.info.uname', '')
|
||||
if (currentUsername === repostUsername) {
|
||||
element.setAttribute('data-self-repost', 'true')
|
||||
}
|
||||
card.repostUsername = repostUsername
|
||||
card.repostText = getRepostData(vueData).originalText
|
||||
}
|
||||
// if (card.text === '') {
|
||||
// console.warn('card text parsing failed!', card)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview)
|
||||
// @version 1.12.6
|
||||
// @version 1.12.8
|
||||
// @description Bilibili Evolved 的预览版, 可以抢先体验新功能.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2021, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -142,7 +142,6 @@ import { Resource } from './resource'
|
||||
import { resourceManifest } from './resource-manifest'
|
||||
import { StyleManager } from './style-manager'
|
||||
import { ResourceManager } from './resource-manager'
|
||||
import { getScriptBlocker } from './script-blocker'
|
||||
import { installStyle, uninstallStyle, toggleStyle } from './custom-styles'
|
||||
import { store } from './store'
|
||||
|
||||
@ -217,9 +216,9 @@ import { store } from './store'
|
||||
})
|
||||
await loadResources()
|
||||
await loadSettings()
|
||||
getScriptBlocker().then(scriptBlocker => {
|
||||
scriptBlocker.start()
|
||||
})
|
||||
// getScriptBlocker().then(scriptBlocker => {
|
||||
// scriptBlocker.start()
|
||||
// })
|
||||
if (settings.ajaxHook) {
|
||||
setupAjaxHook()
|
||||
}
|
||||
@ -274,7 +273,6 @@ import { store } from './store'
|
||||
formatFileSize,
|
||||
formatDuration,
|
||||
getDpiSourceSet,
|
||||
getScriptBlocker,
|
||||
isOffline,
|
||||
getUID,
|
||||
scriptVersion,
|
||||
|
||||
@ -156,7 +156,6 @@ Resource.manifest = {
|
||||
displayNames: {
|
||||
removeAds: '删除广告',
|
||||
showBlockedAdsTip: '显示占位文本',
|
||||
removeGameMatchModule: '删除电竞赛事',
|
||||
preserveEventBanner: '保留活动横幅',
|
||||
},
|
||||
},
|
||||
@ -337,7 +336,6 @@ Resource.manifest = {
|
||||
deadVideoTitleProvider: '信息来源',
|
||||
},
|
||||
},
|
||||
autoPlay: '自动播放视频',
|
||||
useCommentStyle: {
|
||||
path: 'comment.min.js',
|
||||
reloadable: true,
|
||||
@ -459,8 +457,8 @@ Resource.manifest = {
|
||||
},
|
||||
noLiveAutoplay: {
|
||||
displayNames: {
|
||||
noLiveAutoplay: '禁止直播首页自动播放',
|
||||
hideHomeLive: '隐藏首页推荐直播',
|
||||
noLiveAutoplay: '直播首页静音',
|
||||
hideHomeLive: '隐藏推荐直播',
|
||||
},
|
||||
},
|
||||
noMiniVideoAutoplay: '禁止小视频自动播放',
|
||||
|
||||
@ -197,7 +197,6 @@ export const settings = {
|
||||
keymapJumpSeconds: 85,
|
||||
urlParamsClean: true,
|
||||
collapseLiveSideBar: true,
|
||||
removeGameMatchModule: false,
|
||||
noDarkOnMember: true,
|
||||
feedsTranslate: false,
|
||||
feedsTranslateProvider: 'Bing',
|
||||
@ -255,11 +254,11 @@ export const settings = {
|
||||
checkInCenter: false,
|
||||
fullscreenGiftBox: false,
|
||||
autoPlayControl: true,
|
||||
cache: {},
|
||||
scrollOutPlayer: true,
|
||||
scrollOutPlayer: false,
|
||||
scrollOutPlayerTriggerPlace: '视频中间',
|
||||
scrollOutPlayerAutoPause: true,
|
||||
scrollOutPlayerAutoLightOn: true,
|
||||
cache: {},
|
||||
}
|
||||
const fixedSettings = {
|
||||
seedsToCoins: false,
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
const { waitForControlBar } = await import('../live-control-bar')
|
||||
|
||||
let changeEventHook = false
|
||||
let danmakuSendBarElement: Element
|
||||
const danmakuSendBarClass = 'danmaku-send-bar'
|
||||
waitForControlBar({
|
||||
init: () => {
|
||||
@ -13,14 +14,15 @@
|
||||
const sendButton = await SpinQuery.select('.chat-input-ctnr ~ .bottom-actions .bl-button--primary') as HTMLButtonElement
|
||||
|
||||
if ([leftController, originalTextArea, sendButton].some(it => it === null)) {
|
||||
console.warn('[danmakuSendBar] ref elements not found', leftController === null, originalTextArea === null, sendButton === null)
|
||||
return
|
||||
}
|
||||
if (dq(controlBar, `.${danmakuSendBarClass}`)) {
|
||||
return
|
||||
}
|
||||
|
||||
const DanmakuSendBar = Vue.extend({
|
||||
template: /*html*/`
|
||||
if (!danmakuSendBarElement) {
|
||||
const DanmakuSendBar = Vue.extend({
|
||||
template: /*html*/`
|
||||
<div class="${danmakuSendBarClass}">
|
||||
<input
|
||||
type="text"
|
||||
@ -32,48 +34,49 @@
|
||||
/>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
value: originalTextArea.value
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
originalTextArea.addEventListener('input', this.listenChange)
|
||||
originalTextArea.addEventListener('change', this.listenChange)
|
||||
if (!changeEventHook) {
|
||||
const original = Object.getOwnPropertyDescriptors(HTMLTextAreaElement.prototype).value
|
||||
Object.defineProperty(originalTextArea, 'value', {
|
||||
...original,
|
||||
set(value: string) {
|
||||
original.set!.call(this, value)
|
||||
raiseEvent(originalTextArea, 'input')
|
||||
}
|
||||
})
|
||||
changeEventHook = true
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
originalTextArea.removeEventListener('input', this.listenChange)
|
||||
originalTextArea.removeEventListener('change', this.listenChange)
|
||||
},
|
||||
methods: {
|
||||
updateValue(newValue: string) {
|
||||
originalTextArea.value = newValue
|
||||
raiseEvent(originalTextArea, 'input')
|
||||
},
|
||||
send() {
|
||||
if (!sendButton.disabled) {
|
||||
this.value = ''
|
||||
sendButton.click()
|
||||
data() {
|
||||
return {
|
||||
value: originalTextArea.value
|
||||
}
|
||||
},
|
||||
listenChange(e: InputEvent) {
|
||||
this.value = (e.target as HTMLTextAreaElement).value
|
||||
mounted() {
|
||||
originalTextArea.addEventListener('input', this.listenChange)
|
||||
originalTextArea.addEventListener('change', this.listenChange)
|
||||
if (!changeEventHook) {
|
||||
const original = Object.getOwnPropertyDescriptors(HTMLTextAreaElement.prototype).value
|
||||
Object.defineProperty(originalTextArea, 'value', {
|
||||
...original,
|
||||
set(value: string) {
|
||||
original.set!.call(this, value)
|
||||
raiseEvent(originalTextArea, 'input')
|
||||
}
|
||||
})
|
||||
changeEventHook = true
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
originalTextArea.removeEventListener('input', this.listenChange)
|
||||
originalTextArea.removeEventListener('change', this.listenChange)
|
||||
},
|
||||
methods: {
|
||||
updateValue(newValue: string) {
|
||||
originalTextArea.value = newValue
|
||||
raiseEvent(originalTextArea, 'input')
|
||||
},
|
||||
send() {
|
||||
if (!sendButton.disabled) {
|
||||
this.value = ''
|
||||
sendButton.click()
|
||||
}
|
||||
},
|
||||
listenChange(e: InputEvent) {
|
||||
this.value = (e.target as HTMLTextAreaElement).value
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
const sendBar = new DanmakuSendBar().$mount().$el
|
||||
leftController.insertAdjacentElement('afterend', sendBar)
|
||||
})
|
||||
danmakuSendBarElement = new DanmakuSendBar().$mount().$el
|
||||
}
|
||||
leftController.insertAdjacentElement('afterend', danmakuSendBarElement)
|
||||
},
|
||||
})
|
||||
})()
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
.gift-control-panel .z-gift-package .arrow-bottom.popup {
|
||||
&::before,
|
||||
&::after {
|
||||
left: 39% !important;
|
||||
left: 50% !important;
|
||||
}
|
||||
}
|
||||
.live-web-player-controller .control-area {
|
||||
|
||||
@ -1,25 +1,28 @@
|
||||
(async () => {
|
||||
const { waitForControlBar } = await import('../live-control-bar')
|
||||
const fullscreenGiftBoxClass = 'fullscreen-gift-box'
|
||||
let giftBoxButton: HTMLDivElement
|
||||
waitForControlBar({
|
||||
init: () => resources.applyImportantStyle('fullscreenGiftBoxStyle'),
|
||||
callback: async controlBar => {
|
||||
const rightController = dq(controlBar, '.right-area') as HTMLDivElement
|
||||
if (!rightController) {
|
||||
console.warn('[fullscreenGiftBox] ref elements not found', rightController === null)
|
||||
return
|
||||
}
|
||||
if (dq(rightController, `.${fullscreenGiftBoxClass}`)) {
|
||||
return
|
||||
}
|
||||
|
||||
const originalGiftBoxClass = '.gift-package'
|
||||
const giftBoxButton = document.createElement('div')
|
||||
giftBoxButton.innerHTML = '包裹'
|
||||
giftBoxButton.classList.add(fullscreenGiftBoxClass)
|
||||
giftBoxButton.addEventListener('click', () => {
|
||||
const button = dq(originalGiftBoxClass) as HTMLElement
|
||||
button?.click()
|
||||
})
|
||||
if (!giftBoxButton) {
|
||||
const originalGiftBoxClass = '.gift-package'
|
||||
giftBoxButton = document.createElement('div')
|
||||
giftBoxButton.innerHTML = '包裹'
|
||||
giftBoxButton.classList.add(fullscreenGiftBoxClass)
|
||||
giftBoxButton.addEventListener('click', () => {
|
||||
const button = dq(originalGiftBoxClass) as HTMLElement
|
||||
button?.click()
|
||||
})
|
||||
}
|
||||
rightController.appendChild(giftBoxButton)
|
||||
}
|
||||
})
|
||||
|
||||
@ -12,7 +12,7 @@ export const waitForControlBar = async (config: {
|
||||
return
|
||||
}
|
||||
const controllerContainer = (await SpinQuery.select(
|
||||
'.bilibili-live-player-video-controller, .web-player-controller-wrap'
|
||||
'.bilibili-live-player-video-controller, .web-player-controller-wrap:not(.web-player-controller-bg)'
|
||||
)) as HTMLDivElement
|
||||
if (!controllerContainer) {
|
||||
return
|
||||
@ -22,11 +22,11 @@ export const waitForControlBar = async (config: {
|
||||
init(controllerContainer)
|
||||
|
||||
Observer.childList(controllerContainer, async () => {
|
||||
const controlBar = dq(controllerContainer, '.control-area') as HTMLElement
|
||||
const controlBar = dq(controllerContainer, '.control-area')
|
||||
if (!controlBar) {
|
||||
return
|
||||
}
|
||||
callback(controlBar)
|
||||
callback(controlBar as HTMLElement)
|
||||
})
|
||||
}
|
||||
export default {
|
||||
|
||||
@ -3,14 +3,15 @@
|
||||
if (url !== 'https://live.bilibili.com/' && url !== 'https://live.bilibili.com/index.html') {
|
||||
return
|
||||
}
|
||||
SpinQuery.condition(
|
||||
() => document.querySelector('.component-ctnr video,.bilibili-live-player-video video'),
|
||||
(video: HTMLVideoElement) => video && !video.paused,
|
||||
() => {
|
||||
const button = dq('.live-web-player-controller .left-area > :first-child') as HTMLElement
|
||||
button?.click()
|
||||
}
|
||||
)
|
||||
// 不知道该怎么阻止自动播放了... (#1813)
|
||||
// 先屏蔽声音吧
|
||||
// SpinQuery.select('video').then((video: HTMLVideoElement) => {
|
||||
// video.autoplay = false
|
||||
// video.pause()
|
||||
// })
|
||||
SpinQuery.select('video').then((video: HTMLVideoElement) => {
|
||||
video.muted = true
|
||||
})
|
||||
const styleID = 'hide-home-live-style'
|
||||
addSettingsListener('hideHomeLive', value => {
|
||||
if (value === true) {
|
||||
|
||||
@ -189,12 +189,13 @@
|
||||
}
|
||||
.loading-state {
|
||||
font-size: 14px !important;
|
||||
height: auto !important;
|
||||
line-height: normal !important;
|
||||
height: 1.4em !important;
|
||||
line-height: 1.4 !important;
|
||||
margin: 12px 0 !important;
|
||||
&:empty {
|
||||
margin: 0 !important;
|
||||
}
|
||||
// #1789
|
||||
// &:empty {
|
||||
// margin: 0 !important;
|
||||
// }
|
||||
}
|
||||
.loading-state + .bottom-page {
|
||||
margin: 0 !important;
|
||||
|
||||
@ -158,7 +158,7 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
|
||||
.van-popover {
|
||||
z-index: 10002 !important;
|
||||
}
|
||||
:not(.international-home) > .international-header {
|
||||
.international-header {
|
||||
min-height: var(--navbar-height) !important;
|
||||
}
|
||||
.bili-header-m .head-banner {
|
||||
|
||||
@ -487,6 +487,15 @@ a {
|
||||
.emoji-box.top:after {
|
||||
@include no-image();
|
||||
}
|
||||
.video-desc .desc-info {
|
||||
@include color("e");
|
||||
& + .toggle-btn {
|
||||
@include color("a");
|
||||
&:hover {
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.simplify-comment) .bb-comment {
|
||||
.comment-send-lite {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export default resources.toggleStyle(`
|
||||
#recom_module,#reco_list,.bilibili-player-ending-panel-box-videos {
|
||||
#recom_module,#reco_list,.bilibili-player-ending-panel-box-videos,.r-con .rcmd-list {
|
||||
display: none !important;
|
||||
}
|
||||
.bilibili-player-ending-panel-box-functions .bilibili-player-upinfo-spans {
|
||||
|
||||
@ -1,43 +1,18 @@
|
||||
$items: (
|
||||
live,
|
||||
douga,
|
||||
anime,
|
||||
guochuang,
|
||||
manga,
|
||||
music,
|
||||
dance,
|
||||
game,
|
||||
technology,
|
||||
cheese,
|
||||
digital,
|
||||
car,
|
||||
life,
|
||||
food,
|
||||
animal,
|
||||
kichiku,
|
||||
fashion,
|
||||
information,
|
||||
ent,
|
||||
read,
|
||||
movie,
|
||||
teleplay,
|
||||
cinephile,
|
||||
documentary
|
||||
);
|
||||
@each $item in $items {
|
||||
body.home-hidden-#{$item} {
|
||||
.storey-box .proxy-box #bili_#{$item} {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.home-hidden-settings {
|
||||
.gui-settings-flat-button &.popup {
|
||||
align-items: stretch;
|
||||
align-items: flex-start;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
max-width: 180px;
|
||||
left: -24px;
|
||||
transform: translateY(-8px);
|
||||
&.opened {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
&-item {
|
||||
padding: 4px 12px;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 8px;
|
||||
|
||||
@ -4,7 +4,10 @@ type HomeHiddenOption = Readonly<{
|
||||
style?: string
|
||||
}>
|
||||
const isHome = () => {
|
||||
return !settings.simplifyHome && document.URL.includes('https://www.bilibili.com/')
|
||||
if (document.URL === 'https://www.bilibili.com/') {
|
||||
return !settings.simplifyHome
|
||||
}
|
||||
return document.URL.includes('https://www.bilibili.com/')
|
||||
}
|
||||
const homeHiddenOptions: HomeHiddenOption[] = [
|
||||
{
|
||||
@ -36,7 +39,8 @@ const homeHiddenOptions: HomeHiddenOption[] = [
|
||||
},
|
||||
{
|
||||
name: 'ext-box', displayName: '电竞赛事', style: `
|
||||
.first-screen #reportFirst3 { display: none !important; } `, },
|
||||
.first-screen #reportFirst3 { display: none !important; } `,
|
||||
},
|
||||
{
|
||||
name: 'special', displayName: '特别推荐', style: `
|
||||
#bili_report_spe_rec { display: none !important; }
|
||||
@ -52,102 +56,6 @@ const homeHiddenOptions: HomeHiddenOption[] = [
|
||||
.storey-box .elevator { display: none !important; }
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "live",
|
||||
displayName: "直播"
|
||||
},
|
||||
{
|
||||
name: "douga",
|
||||
displayName: "动画"
|
||||
},
|
||||
{
|
||||
name: "anime",
|
||||
displayName: "番剧"
|
||||
},
|
||||
{
|
||||
name: "guochuang",
|
||||
displayName: "国创"
|
||||
},
|
||||
{
|
||||
name: "manga",
|
||||
displayName: "漫画"
|
||||
},
|
||||
{
|
||||
name: "music",
|
||||
displayName: "音乐"
|
||||
},
|
||||
{
|
||||
name: "dance",
|
||||
displayName: "舞蹈"
|
||||
},
|
||||
{
|
||||
name: "game",
|
||||
displayName: "游戏"
|
||||
},
|
||||
{
|
||||
name: "technology",
|
||||
displayName: "知识"
|
||||
},
|
||||
{
|
||||
name: "cheese",
|
||||
displayName: "课堂"
|
||||
},
|
||||
{
|
||||
name: "digital",
|
||||
displayName: "数码"
|
||||
},
|
||||
{
|
||||
name: "car",
|
||||
displayName: "汽车"
|
||||
},
|
||||
{
|
||||
name: "life",
|
||||
displayName: "生活"
|
||||
},
|
||||
{
|
||||
name: "food",
|
||||
displayName: "美食"
|
||||
},
|
||||
{
|
||||
name: 'animal',
|
||||
displayName: '动物圈',
|
||||
},
|
||||
{
|
||||
name: "kichiku",
|
||||
displayName: "鬼畜"
|
||||
},
|
||||
{
|
||||
name: "fashion",
|
||||
displayName: "时尚"
|
||||
},
|
||||
{
|
||||
name: "information",
|
||||
displayName: "资讯"
|
||||
},
|
||||
{
|
||||
name: "ent",
|
||||
displayName: "娱乐"
|
||||
},
|
||||
{
|
||||
name: "read",
|
||||
displayName: "专栏"
|
||||
},
|
||||
{
|
||||
name: "movie",
|
||||
displayName: "电影"
|
||||
},
|
||||
{
|
||||
name: "teleplay",
|
||||
displayName: "电视剧"
|
||||
},
|
||||
{
|
||||
name: "cinephile",
|
||||
displayName: "影视"
|
||||
},
|
||||
{
|
||||
name: "documentary",
|
||||
displayName: "纪录片"
|
||||
}
|
||||
]
|
||||
const syncState = (item: HomeHiddenOption) => {
|
||||
if (!settings.homeHiddenItems.includes(item.name)) {
|
||||
@ -164,10 +72,29 @@ const syncState = (item: HomeHiddenOption) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isHome()) {
|
||||
;(async () => {
|
||||
if (!isHome()) {
|
||||
return
|
||||
}
|
||||
const generatedOptions: HomeHiddenOption[] = (await SpinQuery.condition(
|
||||
() => dqa('.proxy-box > div'),
|
||||
elements => elements.length > 0 || document.URL !== 'https://www.bilibili.com/',
|
||||
)).map(it => ({
|
||||
name: it.id.replace(/^bili_/, ''),
|
||||
displayName: it.querySelector('header .name')?.textContent?.trim() ?? '未知分区',
|
||||
}))
|
||||
homeHiddenOptions.push(...generatedOptions)
|
||||
homeHiddenOptions.forEach(syncState)
|
||||
resources.applyImportantStyle('homeHiddenStyle')
|
||||
const generatedStyles = generatedOptions.map(({ name }) => {
|
||||
return `
|
||||
body.home-hidden-${name} .storey-box .proxy-box #bili_${name} {
|
||||
display: none !important;
|
||||
}
|
||||
`.trim()
|
||||
}).join('\n')
|
||||
const fixedStyles: string = resources.import('homeHiddenStyle')
|
||||
resources.applyImportantStyleFromText(generatedStyles + fixedStyles, 'home-hidden-style')
|
||||
})()
|
||||
|
||||
export default {
|
||||
widget: {
|
||||
|
||||
@ -13,7 +13,7 @@ export const getBlackboards = async (): Promise<Blackboard[]> => {
|
||||
const locID = it.querySelector('a')!.getAttribute('data-loc-id')!
|
||||
return {
|
||||
url: initData.locsData[locID][index].url,
|
||||
title: (it.querySelector('.title') as HTMLElement).innerText!.trim(),
|
||||
title: (it.querySelector('.title') as HTMLElement).textContent!.trim(),
|
||||
isAd: Boolean(it.querySelector('.gg-icon,.bypb-icon')),
|
||||
imageUrl: it.querySelector('img')!.getAttribute('src')!.replace(/@.+$/, ''),
|
||||
} as Blackboard
|
||||
|
||||
@ -134,12 +134,13 @@ $first-row-height: 250px;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: block;
|
||||
transition: 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
|
||||
transition: 0.8s cubic-bezier(0.44, 0.29, 0.13, 1);
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: fill;
|
||||
display: block;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.title {
|
||||
position: absolute;
|
||||
|
||||
@ -60,7 +60,13 @@ export default {
|
||||
height: 40px;
|
||||
}
|
||||
&:checked:nth-of-type(#{$i}) ~ .blackboard-cards .blackboard-card {
|
||||
transform: translateY(calc(-1 * #{$i - 1} * var(--blackboard-height)));
|
||||
transform: translateY(calc(-1 * #{$i - 1} * var(--blackboard-height))) scale(0.95);
|
||||
&:nth-of-type(#{$i}) {
|
||||
transform: translateY(calc(-1 * #{$i - 1} * var(--blackboard-height)));
|
||||
img {
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ export default {
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
background-color: #f4f4f4;
|
||||
font-size: 12px;
|
||||
|
||||
body.dark & {
|
||||
background-color: #181818;
|
||||
|
||||
@ -153,7 +153,6 @@
|
||||
<category icon="tool">工具</category>
|
||||
<checkbox indent="0" key="removeAds" dependencies=""></checkbox>
|
||||
<checkbox indent="1" key="showBlockedAdsTip" dependencies="removeAds"></checkbox>
|
||||
<checkbox indent="1" key="removeGameMatchModule" dependencies="removeAds"></checkbox>
|
||||
<checkbox indent="1" key="preserveEventBanner" dependencies="removeAds"></checkbox>
|
||||
<checkbox indent="0" key="watchLaterRedirect" dependencies=""></checkbox>
|
||||
<checkbox indent="1" key="watchLaterRedirectNavbar" dependencies="watchLaterRedirect"></checkbox>
|
||||
|
||||
@ -15,7 +15,6 @@ Warning: Some features won't work on old layout.`],
|
||||
["enableDanmaku", `Disable this if you want to turn off danmakus by default.`],
|
||||
["rememberDanmakuSettings", `Remember the "Prevent blocking subtitles" and "Smart danmaku mask" settings. If you change these settings on player, every video will apply these settings by default.`],
|
||||
["expandDanmakuList", `Auto expand the danmaku list.`],
|
||||
["autoPlay", `Auto start playing video on page load.`],
|
||||
["autoContinue", `If playback history exists, auto continue from it.`],
|
||||
["skipChargeList", `Skip charge acknowledgements on the end of some videos.`],
|
||||
["framePlayback", `Append 2 buttons to the right of video time to seek video by frame. Support keyboard shortcut <kbd>Shift</kbd>+<kbd>←</kbd>/<kbd>→</kbd>. (Old layout can only use keyboard shortcut)`],
|
||||
@ -100,7 +99,7 @@ The default format is <span>[title][ - ep]</span>, representing video title and
|
||||
Put your variables inside square brackets, other contents inside brackets (like "<span> - </span>" in "<span>[ - ep]</span>") will only appear when the variable exists. For instance, if the format is <span>[title] - [ep]</span>. Even there's no episode title, that "<span> - </span>" will still appear in filename (which is meaningless). So in default format, when episode title not exists, "<span> - </span>" will also disappear.
|
||||
|
||||
A more specific example: To use a "video title + AV ID + time" format, we can use <span>[title][ AVaid] [y]-[M]-[d] [h]-[m]-[s]</span>. And get filenames like "<span>xxxx AV23333 2019-05-29 19-59-44</span>".`],
|
||||
['noLiveAutoplay', `Disable autoplay on live homepage.`],
|
||||
['noLiveAutoplay', `Auto mute on live homepage.`],
|
||||
['hideHomeLive', `Hide recommended live rooms on live homepage.`],
|
||||
['sideBarOffset', `Set vertical offset of side bar (in percent). Valid range: -40% ~ 40%.`],
|
||||
['hideCategory', `Hide category bar on main site, you can select category from Home in navbar.`],
|
||||
@ -166,7 +165,7 @@ Additional variables:
|
||||
[`preferAvUrl`, `Convert BV ID to AV ID for URL of video.`],
|
||||
[`elegantScrollbar`, `Use narrow scrollbar in place of system default. (No effect to dark mode)`],
|
||||
[`quickFavorite`, `Enable quick favorite. Add a video to the selected favorite folder by one click in video page.`],
|
||||
[`darkColorScheme`, `Set dark mode to follow your system theme.`],
|
||||
[`darkColorScheme`, `Set dark mode to follow your system theme. (or browser theme in some supported browsers like Edge)`],
|
||||
[`disableFeedsDetails`, `Don't open feed details page after click, useful for selecting texts.`],
|
||||
[`danmakuSendBar`, `Show danmaku bar on bottom when fullscreen or web fullscreen.`],
|
||||
[`watchLaterRedirectNavbar`, `Redirect links on navbar.`],
|
||||
@ -189,6 +188,12 @@ Additional variables:
|
||||
[`removeGuidePopup`, `Remove irrelevant popups on videos.`],
|
||||
[`fullscreenGiftBox`, `Open gift box quickly when using web fullscreen mode.`],
|
||||
[`keymapPreset`, `Select preferred preset for keymap.`],
|
||||
[`removeVideoPopup`, `Remove "related video" popup when playing videos.`],
|
||||
[`removeGuidePopup`, `Remove "ask to follow" popup when playing videos.`],
|
||||
[`removeVotePopup`, `Remove "danmaku vote" popup when playing videos.`],
|
||||
[`autoPlayControl`, `Auto play episodes of current video / videos of current playlist, but stop playing related videos.`],
|
||||
[`scrollOutPlayer`, `Run actions when player goes out of view.`],
|
||||
[`scrollOutPlayerAutoLightOn`, `Auto turn on light, only works when <span>Auto pause</span> is turned off and <span>Default player mode - Turn off light when playing</span> is turned on.`],
|
||||
]);
|
||||
export default {
|
||||
export: { toolTips },
|
||||
|
||||
@ -198,7 +198,8 @@ export const toolTips = new Map<keyof BilibiliEvolvedSettings, string>([
|
||||
[`preferAvUrl`, /*html*/`動画のリンクがBV番号の場合、自動的にAV番号に変換されます.`],
|
||||
[`elegantScrollbar`, /*html*/`薄いスクロールバーを使用してシステムのデフォルトのスクロールバーを置き換える. (無効な夜間モード)`],
|
||||
[`quickFavorite`, /*html*/`すばやくのお気に入りを有効にし、動画ページで、1つのキーでお気に入りを特定のお気に入りセットに追加できます.`],
|
||||
[`darkColorScheme`, /*html*/`夜間モードでシステムが設定した「明るい/暗いテーマ」を同期させる.`],
|
||||
[`darkColorScheme`, /*html*/`夜間モードでシステムが設定した「明るい/暗いテーマ」を同期させる.
|
||||
注意:いくつかのブラウザ(例えば<span>Microsoft Edge</span>)では、夜間モードはシステムの代わりにブラウザに従います。.`],
|
||||
[`disableFeedsDetails`, /*html*/`フィードページをクリックして詳細ページにジャンプすることは禁止されています.これはテキストを選択するのに便利です.`],
|
||||
[`danmakuSendBar`, /*html*/`生放送ページの全画面モードとウェブの全画面モードでは、弾幕欄が下部に表示されます.`],
|
||||
[`watchLaterRedirectNavbar`, /*html*/`頂欄の「後で見る」リンクをリダイレクトします.`],
|
||||
@ -219,7 +220,15 @@ export const toolTips = new Map<keyof BilibiliEvolvedSettings, string>([
|
||||
[`alwaysShowDuration`, /*html*/`スクリプトによって表示される動画カードで、 たとえば、「ホームページを簡素化」や「カスタム頂欄を使用」のさまざまなポップアップウィンドウでは、マウスを通過せずに動画の長さを表示できます.`],
|
||||
[`expandDanmakuListIgnoreMediaList`, /*html*/`弾幕リストはコレクションページ(お気に入り/後で見る)で展開されていないので、動画リストを閲覧するのに便利です.`],
|
||||
[`removeGuidePopup`, /*html*/`動画に表示される三連プロンプトボックスを削除します.`],
|
||||
[`removeVideoPopup`, /*html*/`動画に表示されるおすすめ動画ボックスを削除します.`],
|
||||
[`removeVotePopup`, /*html*/`動画に表示される投票ボックスを削除します.`],
|
||||
[`fullscreenGiftBox`, /*html*/`ウェブページの全画面モードで、ギフトボックスを直接クリックできます.これはギフトを贈るのに便利です.`],
|
||||
[`keymapPreset`, /*html*/`予約設定のショートカットを交換します.`],
|
||||
[`autoPlayControl`, /*html*/`伝統的な放送モードを使用して、複数のP/お気に入りや後で見るリストがあるときにAUTO放送モードを自動的にオンにします.単一のP動画が自動的にAUTO放送モードをオフにすると、おすすめ動画の再生を防ぐ.`],
|
||||
[`scrollOutPlayer`, /*html*/`プレーヤーがページから削除されたときのアクションをトリガーする.`],
|
||||
[`scrollOutPlayerAutoPause`, /*html*/`プレイヤーの<span>选定触发位置</span>がページにない場合は、再生が自動的に一時停止され、プレーヤーが戻ってきたときに再生を復元する.`],
|
||||
[`scrollOutPlayerAutoLightOn`, /*html*/`自動一時停止がオンになっていないし、再生中に自動的にライトがオフになっている場合、この機能は、プレーヤーがページにないときに自動的に点灯し、プレーヤーが戻ってきたときに自動的にオフになります.
|
||||
<b>注: この機能は自動的に一時停止されると無視されます</b>`]
|
||||
]);
|
||||
export default {
|
||||
export: { toolTips },
|
||||
|
||||
@ -16,7 +16,6 @@ export const toolTips = new Map<keyof BilibiliEvolvedSettings, string>([
|
||||
["rememberDanmakuSettings", /*html*/`控制是否记住弹幕设置, 包括防挡字幕和智能防挡弹幕. 在播放器中改动这些设置后, 每个视频都会默认使用这些设置.`],
|
||||
["expandDanmakuList", /*html*/`新版播放页面中, 弹幕列表默认收起以显示推荐的其他视频. 启用此功能可在每次加载视频时自动展开弹幕列表.`],
|
||||
["expandDescription", /*html*/`长的视频简介默认会被折叠, 启用此功能可以强制展开完整的视频简介.`],
|
||||
["autoPlay", /*html*/`进入视频页面时自动开始播放视频.`],
|
||||
["autoContinue", /*html*/`播放视频时如果检测到历史记录信息(<span>上次看到...</span>消息), 则自动跳转到相应的时间播放.`],
|
||||
["airborne", /*html*/`当弹幕出现视频时间点时用下划线标记,点击即可空降到相应时间点.`],
|
||||
["skipChargeList", /*html*/`自动跳过视频结尾的充电鸣谢.`],
|
||||
@ -214,7 +213,8 @@ export const toolTips = new Map<keyof BilibiliEvolvedSettings, string>([
|
||||
[`preferAvUrl`, /*html*/`当视频的链接是BV号时, 自动转换为AV号.`],
|
||||
[`elegantScrollbar`, /*html*/`使用细的滚动条替代系统默认的滚动条. (对夜间模式无效)`],
|
||||
[`quickFavorite`, /*html*/`启用快速收藏, 在视频页面可以一键收藏到设定的某个收藏夹.`],
|
||||
[`darkColorScheme`, /*html*/`使夜间模式同步系统设置的亮/暗主题.`],
|
||||
[`darkColorScheme`, /*html*/`使夜间模式同步系统设置的亮/暗主题.
|
||||
注意:在某些浏览器(如<span>Microsoft Edge</span>)中,夜间模式会跟随浏览器而<b>非</b>系统的亮/暗主题.`],
|
||||
[`disableFeedsDetails`, /*html*/`禁止动态点击后跳转详情页, 方便选择其中的文字.`],
|
||||
[`danmakuSendBar`, /*html*/`在直播的网页全屏和全屏模式状态下, 在底部显示弹幕栏.`],
|
||||
[`watchLaterRedirectNavbar`, /*html*/`重定向顶栏稍后再看中的链接.`],
|
||||
@ -239,11 +239,11 @@ export const toolTips = new Map<keyof BilibiliEvolvedSettings, string>([
|
||||
[`fullscreenGiftBox`, /*html*/`在网页全屏状态下, 可以直接点开礼物包裹, 方便送辣条和小心心.`],
|
||||
[`keymapPreset`, /*html*/`更换快捷键的预设.`],
|
||||
[`autoPlayControl`, /*html*/`使用传统的连播模式, 视频有多P时 / 在收藏夹或稍后再看列表里时自动开启连播, 单P视频自动关闭连播防止播放推荐视频.`],
|
||||
[`scrollOutPlayer`, /*html*/`当播放器被移出页面时触发动作.`],
|
||||
[`scrollOutPlayerAutoPause`, /*html*/`当播放器的<span>选定触发位置</span>被移出页面时自动暂停播放, 且当播放器回来时恢复播放.`],
|
||||
[`scrollOutPlayerAutoLightOn`, /*html*/`在没有开启自动暂停, 且开启了播放时自动关灯, 那么该功能会在播放器的<span>选定触发位置</span>被移出页面时自动开灯, 当播放器回来时自动关灯.
|
||||
[`scrollOutPlayer`, /*html*/`当播放器被移出页面时触发动作.`],
|
||||
[`scrollOutPlayerAutoPause`, /*html*/`当播放器的<span>选定触发位置</span>被移出页面时自动暂停播放, 且当播放器回来时恢复播放.`],
|
||||
[`scrollOutPlayerAutoLightOn`, /*html*/`在没有开启自动暂停, 且开启了播放时自动关灯, 那么该功能会在播放器的<span>选定触发位置</span>被移出页面时自动开灯, 当播放器回来时自动关灯.
|
||||
<b>注: 在自动暂停开启时, 该功能会被忽略</b>`]
|
||||
]);
|
||||
export default {
|
||||
export: { toolTips },
|
||||
};
|
||||
};
|
||||
|
||||
@ -979,6 +979,23 @@ export const map = new Map([
|
||||
[`快捷键预设`, `Preset`],
|
||||
[`签到助手`, `Check-in helper`],
|
||||
[`直播间签到`, `Live check in`],
|
||||
[`直播首页静音`, `Mute on live home`],
|
||||
[`删除关注弹窗`, `Remove follow popup`],
|
||||
[`删除关联视频弹窗`, `Remove related videos popup`],
|
||||
[`删除投票弹窗`, `Remove vote popup`],
|
||||
[`传统连播模式`, `Legacy playlist`],
|
||||
[`当播放器退出页面时`, `Player out-of-view actions`],
|
||||
[`选定触发位置`, `Trigger at`],
|
||||
[`视频顶部`, `Top`],
|
||||
[`视频中间`, `Center`],
|
||||
[`视频底部`, `Bottom`],
|
||||
[`自动暂停`, `Auto pause`],
|
||||
[`自动开灯`, `Auto turn on light`],
|
||||
[`详情`, `Details`],
|
||||
[`的图片`, ``], // 直接去掉感觉还好些(
|
||||
[`的文章`, ``],
|
||||
[`的投稿视频`, ``],
|
||||
[`赞了`, `Liked`],
|
||||
[`*`, [
|
||||
{
|
||||
selector: `.gui-settings-widgets-box .widgets-container .empty-tip`,
|
||||
|
||||
@ -867,6 +867,21 @@ export const map = new Map([
|
||||
[`删除视频弹窗`, `動画ポップアップを削除`],
|
||||
[`直播全屏包裹`, `全画面ライブボックス`],
|
||||
[`总是显示视频时长`, `常に動画の長さを表示`],
|
||||
[`合集类页面不展开`, `コレクションページは展開されません`],
|
||||
[`删除关注弹窗`, `三連プロンプトボックスを削除`],
|
||||
[`删除关联视频弹窗`, `おすすめ動画ボックスを削除`],
|
||||
[`删除投票弹窗`, `投票ボックスを削除`],
|
||||
[`传统连播模式`, `伝統的なAUTO放送モード`],
|
||||
[`当播放器退出页面时`, `プレーヤーがページにないとき`],
|
||||
[`选定触发位置`, `機能トリガ位置を設定`],
|
||||
[`视频顶部`, `動画トップ`],
|
||||
[`视频中间`, `動画中間`],
|
||||
[`视频底部`, `動画底部`],
|
||||
[`自动暂停`, `自動一時停止`],
|
||||
[`自动开灯`, `自動的に点灯し`],
|
||||
[`直播首页静音`, `ライブホームミュート`],
|
||||
[`签到助手`, `サインインアシスタント`],
|
||||
[`直播间签到`, `ライブサインイン`],
|
||||
[`主线`, [
|
||||
`主路線`,
|
||||
{
|
||||
|
||||
@ -69,6 +69,10 @@ resources.applyStyleFromText(`
|
||||
.bili-avatar-img {
|
||||
width: 100% !important;
|
||||
}
|
||||
.bb-comment .sailing .sailing-img,
|
||||
.comment-bilibili-fold .sailing .sailing-img {
|
||||
width: 288px;
|
||||
}
|
||||
`, 'image-resolution-fix')
|
||||
export default {
|
||||
export: { imageResolution }
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
if (document.URL.replace(window.location.search, '') === 'https://www.bilibili.com/') {
|
||||
addSettingsListener('removeGameMatchModule', value => {
|
||||
document.body.classList.toggle('remove-game-match-module', value)
|
||||
}, true)
|
||||
// addSettingsListener('removeGameMatchModule', value => {
|
||||
// document.body.classList.toggle('remove-game-match-module', value)
|
||||
// }, true)
|
||||
SpinQuery.any(
|
||||
() => dqa('.gg-pic'),
|
||||
it => {
|
||||
|
||||
@ -11,21 +11,32 @@
|
||||
enable: ['.multi-page .next-button', '.player-auxiliary-autoplay-switch input'],
|
||||
disable: ['.recommend-list .next-button'],
|
||||
}
|
||||
const disableConditions = [
|
||||
// 最后 1P 时不能开启连播
|
||||
() => Boolean(dq('.multi-page .list-box li.on:last-child')),
|
||||
]
|
||||
const isChecked = (container: HTMLElement) => {
|
||||
return Boolean(container.querySelector('.switch-button.on, :checked'))
|
||||
}
|
||||
const { playerReady } = await import('./player-ready')
|
||||
await playerReady()
|
||||
const element = await SpinQuery.select(
|
||||
[...autoPlayControls.enable, ...autoPlayControls.disable].join(',')
|
||||
)
|
||||
if (!element) {
|
||||
return
|
||||
}
|
||||
const shouldChecked = autoPlayControls.enable.some(selector => element.matches(selector))
|
||||
const checked = isChecked(element)
|
||||
console.log(checked, shouldChecked, element)
|
||||
if (shouldChecked !== checked) {
|
||||
element.click()
|
||||
const checkPlayMode = async () => {
|
||||
const element = await SpinQuery.select(
|
||||
[...autoPlayControls.disable, ...autoPlayControls.enable].join(',')
|
||||
)
|
||||
if (!element) {
|
||||
return
|
||||
}
|
||||
const shouldChecked = autoPlayControls.enable.some(selector => element.matches(selector)) && disableConditions.every(condition => !Boolean(condition()))
|
||||
const checked = isChecked(element)
|
||||
console.log(checked, shouldChecked, element)
|
||||
if (shouldChecked !== checked) {
|
||||
element.click()
|
||||
}
|
||||
}
|
||||
Observer.videoChange(() => {
|
||||
const video = dq('.bilibili-player-video video') as HTMLVideoElement
|
||||
checkPlayMode()
|
||||
video?.addEventListener('ended', checkPlayMode)
|
||||
})
|
||||
})()
|
||||
|
||||
@ -9,8 +9,6 @@ const playerModes = [
|
||||
{
|
||||
name: '宽屏',
|
||||
action: async () => {
|
||||
const { playerScrollPatch } = await import('./player-scroll-patch')
|
||||
await playerScrollPatch()
|
||||
document.querySelector('.bilibili-player-video-btn-widescreen').click()
|
||||
// document.querySelector("#bilibili-player").scrollIntoView({ behavior: "smooth" });
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
.video-desc .info,
|
||||
.video-desc .desc-info,
|
||||
.play-up-info .play-up-self {
|
||||
height: auto !important;
|
||||
}
|
||||
.video-desc .btn,
|
||||
.video-desc .toggle-btn,
|
||||
.play-up-info .play-up-self-btn {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ const load = () => {
|
||||
// if (!subtitle) {
|
||||
// return
|
||||
// }
|
||||
const expandButton = await SpinQuery.select('.video-desc .btn[report-id="abstract_spread"]') as HTMLElement
|
||||
const expandButton = await SpinQuery.select('.video-desc .btn[report-id="abstract_spread"], .video-desc .toggle-btn') as HTMLElement
|
||||
expandButton?.click()
|
||||
})
|
||||
}
|
||||
|
||||
@ -6,8 +6,6 @@
|
||||
const element = await SpinQuery.select(target)
|
||||
const { playerReady } = await import('./player-ready')
|
||||
await playerReady()
|
||||
const { playerScrollPatch } = await import('./player-scroll-patch')
|
||||
await playerScrollPatch()
|
||||
console.log(element)
|
||||
if (element === null) {
|
||||
return
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
/**
|
||||
* 禁用播放器宽屏模式时的自动定位效果
|
||||
* @see https://github.com/the1812/Bilibili-Evolved/issues/483
|
||||
* @see https://greasyfork.org/zh-CN/scripts/421421
|
||||
* @author https://github.com/CKylinMC
|
||||
*/
|
||||
export const playerScrollPatch = _.once(async () => {
|
||||
await videoCondition()
|
||||
const agent = await SpinQuery.select(() => unsafeWindow.PlayerAgent)
|
||||
agent.player_widewin = function () {
|
||||
unsafeWindow.isWide = true
|
||||
unsafeWindow.setSize()
|
||||
}
|
||||
})
|
||||
|
||||
export default {
|
||||
export: {
|
||||
playerScrollPatch,
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
let videoEl: HTMLVideoElement;
|
||||
let playerWrap: HTMLElement;
|
||||
let observer: IntersectionObserver;
|
||||
let intersectionLock = true; // Lock intersection action
|
||||
let videoEl: HTMLVideoElement
|
||||
let playerWrap: HTMLElement
|
||||
let observer: IntersectionObserver
|
||||
let intersectionLock = true // Lock intersection action
|
||||
|
||||
enum MODE {
|
||||
TOP = '视频顶部',
|
||||
@ -12,117 +12,127 @@ enum MODE {
|
||||
function getToTop(_mode: string): number {
|
||||
switch (_mode) {
|
||||
case MODE.TOP:
|
||||
return 1;
|
||||
return 1
|
||||
case MODE.MID:
|
||||
return 0.5;
|
||||
return 0.5
|
||||
case MODE.BOT:
|
||||
return 0;
|
||||
return 0
|
||||
default:
|
||||
return 0.5;
|
||||
return 0.5
|
||||
}
|
||||
}
|
||||
|
||||
let lightOff = () => {};
|
||||
let lightOn = () => {};
|
||||
// TODO: refactor to light API
|
||||
let lightOff = () => { }
|
||||
let lightOn = () => { }
|
||||
async function initLights() {
|
||||
await SpinQuery.unsafeJquery();
|
||||
await SpinQuery.unsafeJquery()
|
||||
const settingsButton = await SpinQuery.any(() =>
|
||||
unsafeWindow.$('.bilibili-player-video-btn-setting')
|
||||
);
|
||||
)
|
||||
if (!settingsButton) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
settingsButton.mouseover().mouseout();
|
||||
settingsButton.mouseover().mouseout()
|
||||
const setLight = async (state: boolean) => {
|
||||
const checkbox = (await SpinQuery.select(
|
||||
'.bilibili-player-video-btn-setting-right-others-content-lightoff .bui-checkbox-input'
|
||||
)) as HTMLInputElement;
|
||||
checkbox.checked = state;
|
||||
raiseEvent(checkbox, 'change');
|
||||
};
|
||||
lightOff = () => setLight(true);
|
||||
lightOn = () => setLight(false);
|
||||
)) as HTMLInputElement
|
||||
checkbox.checked = state
|
||||
raiseEvent(checkbox, 'change')
|
||||
}
|
||||
lightOff = () => setLight(true)
|
||||
lightOn = () => setLight(false)
|
||||
}
|
||||
|
||||
function addPlayerOutEvent() {
|
||||
// window.addEventListener('scroll', onPlayerOutEvent, { passive: true });
|
||||
observer.observe(playerWrap);
|
||||
observer.observe(playerWrap)
|
||||
}
|
||||
|
||||
function removePlayerOutEvent() {
|
||||
// window.removeEventListener('scroll', onPlayerOutEvent);
|
||||
observer.unobserve(playerWrap);
|
||||
observer.unobserve(playerWrap)
|
||||
}
|
||||
|
||||
let intersectingCall = () => {
|
||||
if (intersectionLock) return;
|
||||
intersectionLock = true; // relock
|
||||
if (settings.scrollOutPlayerAutoPause && videoEl.paused) videoEl.play();
|
||||
if (intersectionLock) return
|
||||
intersectionLock = true // relock
|
||||
if (settings.scrollOutPlayerAutoPause && videoEl.paused) {
|
||||
videoEl.play()
|
||||
}
|
||||
if (
|
||||
settings.scrollOutPlayerAutoLightOn &&
|
||||
settings.useDefaultPlayerMode &&
|
||||
settings.autoLightOff &&
|
||||
!settings.scrollOutPlayerAutoPause &&
|
||||
!videoEl.paused
|
||||
)
|
||||
lightOff();
|
||||
};
|
||||
) {
|
||||
lightOff()
|
||||
}
|
||||
}
|
||||
|
||||
let disIntersectingCall = () => {
|
||||
// if video is playing, unlock intersecting action
|
||||
!videoEl.paused ? (intersectionLock = false) : '';
|
||||
if (settings.scrollOutPlayerAutoPause && !videoEl.paused) videoEl.pause();
|
||||
if (!videoEl.paused) {
|
||||
intersectionLock = false
|
||||
}
|
||||
if (settings.scrollOutPlayerAutoPause && !videoEl.paused) {
|
||||
videoEl.pause()
|
||||
}
|
||||
if (
|
||||
settings.scrollOutPlayerAutoLightOn &&
|
||||
settings.useDefaultPlayerMode &&
|
||||
settings.autoLightOff &&
|
||||
!settings.scrollOutPlayerAutoPause
|
||||
)
|
||||
lightOn();
|
||||
};
|
||||
) {
|
||||
lightOn()
|
||||
}
|
||||
}
|
||||
|
||||
let createObserver = (mode?: string) =>
|
||||
new IntersectionObserver(
|
||||
([e]) => {
|
||||
e.isIntersecting ? intersectingCall() : disIntersectingCall();
|
||||
e.isIntersecting ? intersectingCall() : disIntersectingCall()
|
||||
},
|
||||
{
|
||||
threshold: getToTop(mode ? mode : settings.scrollOutPlayerTriggerPlace),
|
||||
}
|
||||
);
|
||||
)
|
||||
|
||||
function mountPlayListener() {
|
||||
Observer.videoChange(async () => {
|
||||
videoEl.addEventListener('play', addPlayerOutEvent);
|
||||
videoEl.addEventListener('play', addPlayerOutEvent)
|
||||
// videoEl.addEventListener('pause', removePlayerOutEvent);
|
||||
videoEl.addEventListener('ended', removePlayerOutEvent);
|
||||
});
|
||||
videoEl.addEventListener('ended', removePlayerOutEvent)
|
||||
})
|
||||
}
|
||||
|
||||
(async function setup() {
|
||||
await initLights();
|
||||
await initLights()
|
||||
addSettingsListener('scrollOutPlayerTriggerPlace', (value) => {
|
||||
removePlayerOutEvent();
|
||||
observer = createObserver(value);
|
||||
addPlayerOutEvent();
|
||||
});
|
||||
videoEl = dq('.bilibili-player-video video') as HTMLVideoElement;
|
||||
playerWrap = (dq('.player-wrap') || dq('.player-module')) as HTMLElement;
|
||||
observer = createObserver();
|
||||
addPlayerOutEvent();
|
||||
mountPlayListener();
|
||||
})();
|
||||
removePlayerOutEvent()
|
||||
observer = createObserver(value)
|
||||
addPlayerOutEvent()
|
||||
})
|
||||
videoEl = dq('.bilibili-player-video video') as HTMLVideoElement
|
||||
playerWrap = (dq('.player-wrap') || dq('.player-module')) as HTMLElement
|
||||
observer = createObserver()
|
||||
mountPlayListener()
|
||||
})()
|
||||
|
||||
export default {
|
||||
reload: () => {
|
||||
addPlayerOutEvent();
|
||||
mountPlayListener();
|
||||
addPlayerOutEvent()
|
||||
mountPlayListener()
|
||||
},
|
||||
unload: () => {
|
||||
// umount player listener
|
||||
Observer.videoChange(async () => {
|
||||
videoEl.removeEventListener('play', addPlayerOutEvent);
|
||||
videoEl.removeEventListener('play', addPlayerOutEvent)
|
||||
// videoEl.removeEventListener('pause', removePlayerOutEvent);
|
||||
videoEl.removeEventListener('ended', removePlayerOutEvent);
|
||||
});
|
||||
removePlayerOutEvent();
|
||||
videoEl.removeEventListener('ended', removePlayerOutEvent)
|
||||
})
|
||||
removePlayerOutEvent()
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
1.12.6
|
||||
1.12.8
|
||||
Loading…
Reference in New Issue
Block a user