mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Merge branch 'preview-fixes'
This commit is contained in:
commit
e79632da1b
@ -3,4 +3,5 @@ typings/
|
||||
dist/
|
||||
dev/
|
||||
node_modules/
|
||||
!.github-json/
|
||||
.eslintrc.*
|
||||
|
||||
3
.github-json/README.md
Normal file
3
.github-json/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Fuck YAML
|
||||
|
||||
在项目根目录使用 `pnpm build-github-config` 来生成 GitHub 相关配置.
|
||||
36
.github-json/data/DISCUSSION_TEMPLATE/功能建议-ideas.json
Normal file
36
.github-json/data/DISCUSSION_TEMPLATE/功能建议-ideas.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"title": "功能建议",
|
||||
"labels": [],
|
||||
"body": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"attributes": {
|
||||
"value": "默认您已阅读 [常见问题解答](https://github.com/the1812/Bilibili-Evolved/discussions/1301)\n请勿重复发起, 发之前记得搜索一下. 如果需要反馈 Bug, 请前往 [Issues](https://github.com/the1812/Bilibili-Evolved/issues) 发起.\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "description",
|
||||
"attributes": {
|
||||
"label": "期望的效果",
|
||||
"description": "描述你遇到的问题, 以及建议的解决方式",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"id": "script-version",
|
||||
"attributes": {
|
||||
"label": "脚本版本",
|
||||
"description": "可在设置面板的关于弹窗中找到脚本版本信息",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
15
.github-json/data/FUNDING.json
Normal file
15
.github-json/data/FUNDING.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"github": null,
|
||||
"patreon": null,
|
||||
"open_collective": null,
|
||||
"ko_fi": null,
|
||||
"tidelift": null,
|
||||
"community_bridge": null,
|
||||
"liberapay": null,
|
||||
"issuehunt": null,
|
||||
"otechie": null,
|
||||
"lfx_crowdfunding": null,
|
||||
"custom": [
|
||||
"https://github.com/the1812/Bilibili-Evolved/blob/preview/doc/donate.md"
|
||||
]
|
||||
}
|
||||
122
.github-json/data/ISSUE_TEMPLATE/bug_report.json
Normal file
122
.github-json/data/ISSUE_TEMPLATE/bug_report.json
Normal file
@ -0,0 +1,122 @@
|
||||
{
|
||||
"name": "Bug 反馈",
|
||||
"description": "功能运行不正常 / 失效",
|
||||
"body": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"attributes": {
|
||||
"value": "默认您已阅读 [Issues 须知](https://github.com/the1812/Bilibili-Evolved/blob/preview/doc/issue-rules.md)\n请勿重复发起, 发之前记得看下[置顶问题 (Pinned issues)](https://github.com/the1812/Bilibili-Evolved/issues) (如果有的话), 以及[常见问题解答](https://github.com/the1812/Bilibili-Evolved/discussions/1301)\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "feature",
|
||||
"attributes": {
|
||||
"label": "对应功能",
|
||||
"description": "(指本脚本的某项具体功能, 不是指 b 站的) 可以在设置中尝试开启 / 关闭某项功能来排查. 最好能附上功能的 Commit 值 (在设置里功能选项的底部).\n<img src=\"https://user-images.githubusercontent.com/26504152/152666017-8a5acabc-2ad1-47ef-b0a2-cd5c54c867ab.jpg\" width=\"400\">\n请注意: 以下功能已不再维护 (不再修复 bug 和添加新功能), 但是你仍然可以为其提供 Pull Request.\n- 直播间自动抽奖\n- 默认播放器模式\n- 播放器置顶\n- 播放器定位\n",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "description",
|
||||
"attributes": {
|
||||
"label": "问题描述",
|
||||
"description": "如何重现此问题, 在哪个页面里出现这个问题, 比如视频相关的可以提供一下 av / BV 号",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"id": "script-version",
|
||||
"attributes": {
|
||||
"label": "脚本版本",
|
||||
"description": "可在设置面板的关于弹窗中找到脚本版本信息",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"id": "script-manager-version",
|
||||
"attributes": {
|
||||
"label": "脚本管理器及版本",
|
||||
"description": "例如 Tampermonkey v4.19.6176",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"id": "browser-version",
|
||||
"attributes": {
|
||||
"label": "浏览器及版本",
|
||||
"description": "可在浏览器的关于页面中找到浏览器版本信息",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"id": "player-version",
|
||||
"attributes": {
|
||||
"label": "播放器版本",
|
||||
"description": "在 b 站播放器上右键可以看到播放器版本号\n",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dropdown",
|
||||
"id": "player-codec",
|
||||
"attributes": {
|
||||
"label": "播放策略",
|
||||
"description": "在 b 站播放器设置 - 更多播放设置 里可以看到播放策略",
|
||||
"options": [
|
||||
"默认",
|
||||
"AV1",
|
||||
"HEVC",
|
||||
"AVC"
|
||||
]
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "logs",
|
||||
"attributes": {
|
||||
"label": "错误信息",
|
||||
"description": "脚本直接报告的错误信息, 或者浏览器开发者工具 (F12 或 Ctrl+Shift+I 召唤) 里 Console / 控制台 一栏的输出, 太长的话可以截图放下面. <br><img width=\"400\" src=\"https://user-images.githubusercontent.com/26504152/173189611-f1e9e46a-a31d-4d21-a95a-5771e16372dd.png\">\n",
|
||||
"render": "Shell",
|
||||
"placeholder": "请输入"
|
||||
},
|
||||
"validations": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "screenshots",
|
||||
"attributes": {
|
||||
"label": "附加截图",
|
||||
"placeholder": "可在此粘贴图片"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
30
.github-json/data/ISSUE_TEMPLATE/config.json
Normal file
30
.github-json/data/ISSUE_TEMPLATE/config.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"blank_issues_enabled": false,
|
||||
"contact_links": [
|
||||
{
|
||||
"name": "转到讨论区",
|
||||
"url": "https://github.com/the1812/Bilibili-Evolved/discussions",
|
||||
"about": "Issues 用于反馈 Bug, 新的功能建议和提问答疑请到讨论区发起"
|
||||
},
|
||||
{
|
||||
"name": "查看 Issues 须知",
|
||||
"url": "https://github.com/the1812/Bilibili-Evolved/blob/preview/doc/issue-rules.md",
|
||||
"about": "默认所有 Issues 发起者均已了解此处的内容"
|
||||
},
|
||||
{
|
||||
"name": "查看讨论区指南",
|
||||
"url": "https://github.com/the1812/Bilibili-Evolved/discussions/1297",
|
||||
"about": "默认所有讨论发起者均已了解此处的内容"
|
||||
},
|
||||
{
|
||||
"name": "查看置顶问题",
|
||||
"url": "https://github.com/the1812/Bilibili-Evolved/issues",
|
||||
"about": "在 Pinned issues 中会包含一些近期常见问题, 已有的其他问题也会在下面列出, 请务必查看避免重复发起"
|
||||
},
|
||||
{
|
||||
"name": "查看常见问题",
|
||||
"url": "https://github.com/the1812/Bilibili-Evolved/discussions/1301",
|
||||
"about": "一些老生常谈的问题, 或许里面就有你想问的"
|
||||
}
|
||||
]
|
||||
}
|
||||
72
.github-json/data/workflows/build.json
Normal file
72
.github-json/data/workflows/build.json
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "Build",
|
||||
"on": {
|
||||
"push": {
|
||||
"branches": [
|
||||
"master",
|
||||
"master-cdn"
|
||||
]
|
||||
}
|
||||
},
|
||||
"jobs": {
|
||||
"build": {
|
||||
"runs-on": "ubuntu-latest",
|
||||
"steps": [
|
||||
{
|
||||
"uses": "actions/checkout@v2",
|
||||
"with": {
|
||||
"fetch-depth": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Install dependencies",
|
||||
"uses": "pnpm/action-setup@v2.2.4",
|
||||
"with": {
|
||||
"version": "latest",
|
||||
"run_install": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Type check",
|
||||
"run": "pnpm run type"
|
||||
},
|
||||
{
|
||||
"name": "ESLint check",
|
||||
"run": "pnpm run lint"
|
||||
},
|
||||
{
|
||||
"name": "Build core",
|
||||
"run": "pnpm run build-core"
|
||||
},
|
||||
{
|
||||
"name": "Build features",
|
||||
"run": "cd registry\npnpm install\ncd ../\npnpm run build-features\n"
|
||||
},
|
||||
{
|
||||
"name": "Build GitHub config",
|
||||
"run": "pnpm run build-github-config"
|
||||
},
|
||||
{
|
||||
"name": "Git commit",
|
||||
"id": "commit",
|
||||
"run": "git config --local user.email github-actions[bot]@users.noreply.github.com\ngit config --local user.name github-actions[bot]\ngit config --global core.autocrlf true\ngit config --global core.safecrlf false\ngit add --all\ngit commit -m \"CI build\"\n",
|
||||
"continue-on-error": true
|
||||
},
|
||||
{
|
||||
"name": "Git push",
|
||||
"uses": "ad-m/github-push-action@master",
|
||||
"if": "${{ steps.commit.outcome == 'success' }}",
|
||||
"with": {
|
||||
"github_token": "${{ secrets.GITHUB_TOKEN }}",
|
||||
"branch": "${{ github.ref }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Log",
|
||||
"if": "${{ steps.commit.outcome != 'success' }}",
|
||||
"run": "echo Nothing to commit."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
47
.github-json/data/workflows/pull-request-check.json
Normal file
47
.github-json/data/workflows/pull-request-check.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "Pull Request Check",
|
||||
"on": [
|
||||
"pull_request"
|
||||
],
|
||||
"jobs": {
|
||||
"check": {
|
||||
"runs-on": "ubuntu-latest",
|
||||
"steps": [
|
||||
{
|
||||
"uses": "actions/checkout@v2",
|
||||
"with": {
|
||||
"ref": "${{ github.event.pull_request.head.sha }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Install dependencies",
|
||||
"uses": "pnpm/action-setup@v2.2.4",
|
||||
"with": {
|
||||
"version": "latest",
|
||||
"run_install": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Type check",
|
||||
"run": "pnpm run type"
|
||||
},
|
||||
{
|
||||
"name": "ESLint check",
|
||||
"run": "pnpm run lint-check"
|
||||
},
|
||||
{
|
||||
"name": "Build core",
|
||||
"run": "pnpm run build-core"
|
||||
},
|
||||
{
|
||||
"name": "Build features",
|
||||
"run": "cd registry\npnpm install\ncd ../\npnpm run build-features\n"
|
||||
},
|
||||
{
|
||||
"name": "Log",
|
||||
"run": "echo Check complete."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
26
.github-json/index.ts
Normal file
26
.github-json/index.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { readFileSync, writeFileSync } from 'fs'
|
||||
import { glob } from 'glob'
|
||||
import { basename, dirname, extname, join, resolve } from 'path'
|
||||
import { stringify } from 'yaml'
|
||||
|
||||
const jsonFiles = glob.sync('./.github-json/data/**/*.json')
|
||||
const changeExtension = (path: string, extension: string) => {
|
||||
const fileName = basename(path, extname(path))
|
||||
return join(dirname(path), fileName + extension)
|
||||
}
|
||||
const transformPath = (sourcePath: string) => {
|
||||
const path = resolve(sourcePath).replace(resolve('./.github-json/data'), resolve('./.github'))
|
||||
return changeExtension(path, '.yml')
|
||||
}
|
||||
jsonFiles.forEach(jsonFile => {
|
||||
const json = JSON.parse(readFileSync(jsonFile, { encoding: 'utf-8' }))
|
||||
const yaml = stringify(json, {
|
||||
nullStr: '',
|
||||
doubleQuotedMinMultiLineLength: Infinity,
|
||||
lineWidth: 0,
|
||||
minContentWidth: 0,
|
||||
})
|
||||
const yamlFile = transformPath(jsonFile)
|
||||
// console.log(`${jsonFile} -> ${yamlFile}`)
|
||||
writeFileSync(yamlFile, yaml)
|
||||
})
|
||||
24
.github/DISCUSSION_TEMPLATE/功能建议-ideas.yml
vendored
Normal file
24
.github/DISCUSSION_TEMPLATE/功能建议-ideas.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
title: 功能建议
|
||||
labels: []
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
默认您已阅读 [常见问题解答](https://github.com/the1812/Bilibili-Evolved/discussions/1301)
|
||||
请勿重复发起, 发之前记得搜索一下. 如果需要反馈 Bug, 请前往 [Issues](https://github.com/the1812/Bilibili-Evolved/issues) 发起.
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 期望的效果
|
||||
description: 描述你遇到的问题, 以及建议的解决方式
|
||||
placeholder: 请输入
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: script-version
|
||||
attributes:
|
||||
label: 脚本版本
|
||||
description: 可在设置面板的关于弹窗中找到脚本版本信息
|
||||
placeholder: 请输入
|
||||
validations:
|
||||
required: true
|
||||
25
.github/FUNDING.yml
vendored
25
.github/FUNDING.yml
vendored
@ -1,13 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: ['https://github.com/the1812/Bilibili-Evolved/blob/preview/doc/donate.md'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
github:
|
||||
patreon:
|
||||
open_collective:
|
||||
ko_fi:
|
||||
tidelift:
|
||||
community_bridge:
|
||||
liberapay:
|
||||
issuehunt:
|
||||
otechie:
|
||||
lfx_crowdfunding:
|
||||
custom:
|
||||
- https://github.com/the1812/Bilibili-Evolved/blob/preview/doc/donate.md
|
||||
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -15,4 +15,3 @@ contact_links:
|
||||
- name: 查看常见问题
|
||||
url: https://github.com/the1812/Bilibili-Evolved/discussions/1301
|
||||
about: 一些老生常谈的问题, 或许里面就有你想问的
|
||||
|
||||
|
||||
103
.github/workflows/build.yml
vendored
103
.github/workflows/build.yml
vendored
@ -1,66 +1,51 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Build
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
on:
|
||||
push:
|
||||
branches: [ master, master-cdn ]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
branches:
|
||||
- master
|
||||
- master-cdn
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Install dependencies
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
with:
|
||||
version: latest
|
||||
run_install: true
|
||||
|
||||
- name: Type check
|
||||
run: pnpm run type
|
||||
|
||||
- name: ESLint check
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Build core
|
||||
run: pnpm run build-core
|
||||
|
||||
- name: Build features
|
||||
run: |
|
||||
cd registry
|
||||
pnpm install
|
||||
cd ../
|
||||
pnpm run build-features
|
||||
|
||||
- name: Git commit
|
||||
id: commit
|
||||
run: |
|
||||
git config --local user.email github-actions[bot]@users.noreply.github.com
|
||||
git config --local user.name github-actions[bot]
|
||||
git config --global core.autocrlf true
|
||||
git config --global core.safecrlf false
|
||||
git add --all
|
||||
git commit -m "CI build"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Git push
|
||||
uses: ad-m/github-push-action@master
|
||||
if: ${{ steps.commit.outcome == 'success' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
- name: Log
|
||||
if: ${{ steps.commit.outcome != 'success' }}
|
||||
run: echo Nothing to commit.
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: "0"
|
||||
- name: Install dependencies
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
with:
|
||||
version: latest
|
||||
run_install: true
|
||||
- name: Type check
|
||||
run: pnpm run type
|
||||
- name: ESLint check
|
||||
run: pnpm run lint
|
||||
- name: Build core
|
||||
run: pnpm run build-core
|
||||
- name: Build features
|
||||
run: |
|
||||
cd registry
|
||||
pnpm install
|
||||
cd ../
|
||||
pnpm run build-features
|
||||
- name: Build GitHub config
|
||||
run: pnpm run build-github-config
|
||||
- name: Git commit
|
||||
id: commit
|
||||
run: |
|
||||
git config --local user.email github-actions[bot]@users.noreply.github.com
|
||||
git config --local user.name github-actions[bot]
|
||||
git config --global core.autocrlf true
|
||||
git config --global core.safecrlf false
|
||||
git add --all
|
||||
git commit -m "CI build"
|
||||
continue-on-error: true
|
||||
- name: Git push
|
||||
uses: ad-m/github-push-action@master
|
||||
if: ${{ steps.commit.outcome == 'success' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
- name: Log
|
||||
if: ${{ steps.commit.outcome != 'success' }}
|
||||
run: echo Nothing to commit.
|
||||
|
||||
64
.github/workflows/pull-request-check.yml
vendored
64
.github/workflows/pull-request-check.yml
vendored
@ -1,45 +1,29 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Pull Request Check
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
on: [pull_request]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
on:
|
||||
- pull_request
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
check:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Install dependencies
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
with:
|
||||
version: latest
|
||||
run_install: true
|
||||
|
||||
- name: Type check
|
||||
run: pnpm run type
|
||||
|
||||
- name: ESLint check
|
||||
run: pnpm run lint-check
|
||||
|
||||
- name: Build core
|
||||
run: pnpm run build-core
|
||||
|
||||
- name: Build features
|
||||
run: |
|
||||
cd registry
|
||||
pnpm install
|
||||
cd ../
|
||||
pnpm run build-features
|
||||
|
||||
- name: Log
|
||||
run: echo Check complete.
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install dependencies
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
with:
|
||||
version: latest
|
||||
run_install: true
|
||||
- name: Type check
|
||||
run: pnpm run type
|
||||
- name: ESLint check
|
||||
run: pnpm run lint-check
|
||||
- name: Build core
|
||||
run: pnpm run build-core
|
||||
- name: Build features
|
||||
run: |
|
||||
cd registry
|
||||
pnpm install
|
||||
cd ../
|
||||
pnpm run build-features
|
||||
- name: Log
|
||||
run: echo Check complete.
|
||||
|
||||
7
.vscode/tasks.json
vendored
7
.vscode/tasks.json
vendored
@ -108,6 +108,13 @@
|
||||
"problemMatcher": [],
|
||||
"label": "功能:编译所有 prod:build-features"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "pnpm build-github-config",
|
||||
"group": "build",
|
||||
"problemMatcher": [],
|
||||
"label": "功能:生成 GitHub 配置 prod:build-github-config"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "pnpm webpack --config ./registry/webpack/docs.ts --progress",
|
||||
|
||||
139
CHANGELOG.md
139
CHANGELOG.md
@ -1,5 +1,144 @@
|
||||
# 更新日志
|
||||
|
||||
## v2.8.0-preview
|
||||
`2023-06-03`
|
||||
|
||||
包含 v2.7.2 的所有更新内容.
|
||||
|
||||
✨新增
|
||||
|
||||
- `清爽首页` 改进:
|
||||
- 支持自定义板块的布局和可见性. (操作方式和自定义顶栏那个差不多)
|
||||
- 番剧时间表优化样式, 增加翻页按钮.
|
||||
|
||||
<div>
|
||||
<img height="400" src="https://user-images.githubusercontent.com/26504152/242905984-895cb72c-b344-40c3-91a0-2a6b20d5f783.png">
|
||||
<img height="400" src="https://user-images.githubusercontent.com/26504152/242905640-cbc948f1-734e-46f2-96a7-d57787b7cf47.png">
|
||||
</div>
|
||||
|
||||
- 新增功能 `首页净化`. (PR #4153 by [RieN](https://github.com/rien7))
|
||||
> 删除首页特定类型的卡片.
|
||||
|
||||
- `自定义顶栏` 增加 `创作中心` 入口, `排行` 新增 `全站音乐榜` 和 `短剧榜` 的入口. (#4101, PR #4154 by [星海](https://github.com/lovelyCARDINAL), PR #4155 by [星海](https://github.com/lovelyCARDINAL))
|
||||
- `播放器置顶(新)` 增加选项 `顶部留白`. (#4152, PR #4165 by [Ziu](https://github.com/ZiuChen))
|
||||
- `播放器置顶(新)` 的标题改为放置到播放器和点赞中间. (PR #4208 by [LockRim](https://github.com/LockRim))
|
||||
- `显示视频投稿时间` 支持转义字符. (#4160, PR #4167 [呼乎户](https://github.com/wisokey))
|
||||
- `隐藏视频推荐` 支持稍后再看和收藏夹播放页, 并适配 bpx 播放器. (#4174)
|
||||
- 新增功能 `隐藏记笔记` 和 `隐藏稿件投诉`. (#4124)
|
||||
- 优化了 `自定义顶栏` 中订阅在筛选时的 API 调用. (#4120)
|
||||
- 优化粗体的显示: 优先调用 Semibold 字重, 若字体不支持则使用 Bold 字重.
|
||||
- `自定义顶栏` 增加选项:
|
||||
- 支持自定义消息提醒样式, 可设置为 `数字`, `点状` 或 `隐藏`. (#4125)
|
||||
- 支持自定义搜索栏宽度. (#4112)
|
||||
- 搜索在纯数字输入时, 增加对 UID 和直播间的搜索. (#677)
|
||||
|
||||
☕开发者相关
|
||||
- 播放器模式转换出的 bpx class 更换为更统一的名称, 并增加事件派发. (PR #4191 by [Ziu](https://github.com/ZiuChen))
|
||||
- 需要选择组件 / 插件的构建任务中, 优化了选项的长度. (PR #4192 by [Ziu](https://github.com/ZiuChen))
|
||||
- 弃用 utils 中的 `formData`. (名称具有歧义, 应使用 `URLSearchParams` 来代替)
|
||||
- `addComponentListener` / `removeComponentListener` 支持传入多层的组件 options 路径.
|
||||
- 移除依赖 `vue-fragment`. (使用 `display: contents` 代替)
|
||||
|
||||
## v2.7.2
|
||||
`2023-06-03`
|
||||
|
||||
> ⚠ 对浏览器的要求中, Safari 提升至 15.4
|
||||
|
||||
✨新增
|
||||
|
||||
<details>
|
||||
<summary>获得 v2.6.1-preview ~ v2.7.1-preview 的所有新功能, 点击展开查看</summary>
|
||||
|
||||
- `自定义顶栏` 搜索优化:
|
||||
- 提高了搜索 av 号 / BV 号结果的优先级, 输入编号后直接回车就可以前往视频.
|
||||
- 支持搜索多种 ID, 可以通过安装对应的插件来使用: (#677)
|
||||
- 搜索 av / BV 号时, 支持显示视频标题
|
||||
- 支持搜索专栏 cv 号 / 文集 rl 号
|
||||
- 支持搜索音频 au 号 / 播放列表 am 号
|
||||
- 支持搜索番剧 ss / ep 号, 或番剧详情 md 号
|
||||
- 支持搜索用户 uid 号
|
||||
- 纯数字输入时, 支持同时搜索视频和专栏
|
||||
- `自定义顶栏` 的收藏和稍后再看支持显示数量. (#4069)
|
||||
- `自定义顶栏` 的订阅支持过滤 在看 / 看过 / 想看. (#3217)
|
||||
- 添加跨域存储功能 (`crossOriginLocalStorage`), 支持搜索历史跨域同步. (#3893)
|
||||
- 新增功能 `弹幕转义`. (#3470)
|
||||
> 将弹幕中的 `\n` 替换为真实的换行, 注意这可能导致原先不重叠的弹幕发生重叠.
|
||||
- 新增功能 `组件二等分`, 在出现问题时可帮助定位是哪个组件导致的问题. (#3829, PR #3965 by [JLoeve](https://github.com/LonelySteve))
|
||||
- 优化了 `网址参数清理` 的逻辑, 通过 Hook History API 来减少出现重复的历史记录. (#4039)
|
||||
- 新增功能 `隐藏热搜`. (#3744)
|
||||
> 隐藏搜索栏和搜索页面中的 `bilibili 热搜`.
|
||||
- 新增功能 `隐藏视频分享`. (#3663)
|
||||
> 隐藏视频和番剧播放器下方的分享按钮.
|
||||
- 新增插件 `快捷键扩展 - 开关灯`. (#3587)
|
||||
> 在快捷键的动作列表里添加一个 "开关灯".
|
||||
- `显示视频投稿时间` 允许自定义替换文本格式. (PR #4136 by [呼乎户](https://github.com/wisokey))
|
||||
- `清爽首页` 排行榜支持切换为列表模式, 能够查看 10 项左右的排行. (#3611, #3175)
|
||||
- 新增功能 `动态看图自动回顶`. (#4029)
|
||||
> 在动态里查看图片详情时 (非全屏), 切换图片自动回到图片顶部; 退出查看图片模式时, 自动将动态移入视图内.
|
||||
- 重构了 `直播信息扩充` 面板, 改为完全自主实现, 支持显示超过 10 条的直播间, 并可以进行搜索和刷新操作. (#3774, #4035, #4034)
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/26504152/234049176-7ae3e3cf-6956-4efe-aec1-66218d940c93.png" width="300">
|
||||
|
||||
- 新增功能 `反转滚轮调音量`. (#4053)
|
||||
> 反转在网页全屏 / 全屏模式下使用滚轮调节音量的方向, 使其更符合使用触控板时的操作方向. 请注意不能和 `禁止滚轮调音量` 一同使用.
|
||||
> - 手指向上推时, 增加音量
|
||||
> - 手指向下推时, 减少音量
|
||||
> - 可以自定义 `灵敏度`, 同样的滚动幅度下, 灵敏度越高变化的音量越多
|
||||
|
||||
- 新增功能 `自动点赞`. (#2354)
|
||||
> 进入视频 / 查看动态时, 自动点赞.
|
||||
|
||||
- 新增功能 `隐藏用户信息卡片`. (PR #4093 by [WakelessSloth56](https://github.com/WakelessSloth56))
|
||||
> 隐藏鼠标指向用户名或用户头像时弹出的浮动用户信息卡片.
|
||||
|
||||
- 新增功能 `播放器置顶(新)`. (#3030, #PR #4152 by [RieN 7z](https://github.com/rien7))
|
||||
> 原来的播放器置顶组件,现在已经不可用了,这是一个新的版本,可以在视频页面中将播放器放在页面最上方.
|
||||
|
||||
- 启用新的代码加载方式. (PR #3938 by [timongh](https://github.com/timongh))
|
||||
- Comments API 支持读取评论图片. (PR #4130 by [manip_ego](https://github.com/manipEgo))
|
||||
```diff
|
||||
export interface CommentItem extends CommentReplyItem {
|
||||
+ /** 评论图片 */
|
||||
+ pictures?: string[]
|
||||
/** 回复 */
|
||||
replies: CommentReplyItem[]
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
- `网址参数清理` 增加清理会员购和直播间的一些参数. (PR #4189, PR #4214 by [星海](https://github.com/lovelyCARDINAL))
|
||||
- `删除广告` 增加选项 `保留小喇叭通知`. (PR #4199 by [imshixin](https://github.com/imshixin))
|
||||
> 指评论区上方的小喇叭通知, 待 `简化评论区` 完成功能拆分后会移动到那边去.
|
||||
|
||||
- `与 "解除 B 站区域限制" 互斥` 现在不再在番剧详情页面生效. (#4157)
|
||||
|
||||
🐛修复
|
||||
- 修复播放器模式切换时 `body` 类名响应问题. (PR #4188 by [Ziu](https://github.com/ZiuChen))
|
||||
- 修复 `播放器控制栏背景色` 位置不正确. (#3713)
|
||||
- 修复勋章过多时, `直播勋章快速更换` 的弹窗溢出视图. (#4181)
|
||||
- 修复 `清爽首页` 在非内测首页上无法隐藏原版首页. (#3981)
|
||||
- 修复 `自定义顶栏` 导致分区页面内容错位. (#4183)
|
||||
- 修复 `删除广告` 未能删除活动横幅. (#4177)
|
||||
- 修复 `外置稍后再看` 没有隐藏菜单中的相同选项. (#4175)
|
||||
- 修复 `直播全屏包裹` 的一部分样式问题. (#4166, #4210)
|
||||
- 修复检查更新的查看详情弹窗内容溢出. (#4164)
|
||||
- 修复 `播放前显示封面` 在预览关联视频时封面消失. (#4197)
|
||||
- 修复 `禁止跳转动态详情` 对新版专栏卡片无效.
|
||||
- 修复 `动态过滤器` 在切换了 UP 主过滤后失效. (#4149)
|
||||
- 修复 `简化直播间` 的 `标题栏活动` 内容出现溢出. (#4215)
|
||||
- 新版动态页面适配:
|
||||
- `快速收起评论区`
|
||||
- `addMenuItem` API (涉及 `图片批量导出` 和 `复制动态链接`)
|
||||
- `强制固定动态侧栏`: 由于 class 名称和旧版一样, 目前只能先把宽度也锁死在旧版的宽度.
|
||||
- `夜间模式`
|
||||
- `feedsCardsManager` API
|
||||
|
||||
☕开发者相关
|
||||
- GitHub 相关配置更换为 JSON 格式, 并由脚本自动生成 YAML.
|
||||
- 增加了讨论区 `功能建议` 的模板.
|
||||
|
||||
## v2.7.1-preview
|
||||
`2023-04-25`
|
||||
|
||||
|
||||
10
README.md
10
README.md
@ -71,13 +71,13 @@
|
||||
<img alt="about-panel" src="images/v2/about-panel.jpg" width="450">
|
||||
|
||||
# 推荐配置
|
||||
- 操作系统: 64-bit Windows 10+ / macOS 10.15+
|
||||
- 分辨率: 2K+ / 192ppi
|
||||
- 浏览器: Chrome 100+ / Firefox 103+ / Edge 100+ / Safari 15+
|
||||
- 处理器: 8代 Intel Core i7+ / AMD Ryzen 5000+
|
||||
- 操作系统: 64-bit Windows 10 / macOS Ventura
|
||||
- 分辨率: 3840x2160 / 192ppi
|
||||
- 浏览器: Chrome 100+ / Firefox 103+ / Edge 100+ / Safari 15.4+
|
||||
- 处理器: Intel Core i7-9750H / AMD Ryzen 5 5600H
|
||||
- 内存: 8GB
|
||||
- 脚本管理器: Tampermonkey 4.14 / Violentmonkey 2.13
|
||||
- 显卡: GeForce GTX 660 / Radeon HD 7870
|
||||
- 显卡: GeForce GTX 1050 / Radeon HD 7870
|
||||
- 网络: 10MB/s
|
||||
|
||||
# 兼容性
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import parse from 'csv-parse/lib/sync'
|
||||
import fs from 'fs-extra'
|
||||
import fs from 'fs'
|
||||
|
||||
const files = process.argv.slice(2)
|
||||
const parseAliPay = (csv: Record<string, string>[]) => {
|
||||
@ -60,4 +60,5 @@ const items = files
|
||||
})
|
||||
.flat()
|
||||
.sort((a, b) => parseInt(b.sortKey) - parseInt(a.sortKey))
|
||||
fs.outputFileSync('dist/output.md', items.join('\n'))
|
||||
fs.mkdirSync('dist/', { recursive: true })
|
||||
fs.writeFileSync('dist/output.md', items.join('\n'))
|
||||
|
||||
@ -6,11 +6,9 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"csv-parse": "^4.15.4",
|
||||
"fs-extra": "^10.1.0"
|
||||
"csv-parse": "^4.15.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/node": "^17.0.38",
|
||||
"ts-node": "^10.8.0",
|
||||
"typescript": "^4.7.2"
|
||||
|
||||
54
dev-tools/donate-table/pnpm-lock.yaml
generated
54
dev-tools/donate-table/pnpm-lock.yaml
generated
@ -1,17 +1,15 @@
|
||||
lockfileVersion: '6.0'
|
||||
lockfileVersion: '6.1'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
dependencies:
|
||||
csv-parse:
|
||||
specifier: ^4.15.4
|
||||
version: registry.npmmirror.com/csv-parse@4.15.4
|
||||
fs-extra:
|
||||
specifier: ^10.1.0
|
||||
version: registry.npmmirror.com/fs-extra@10.1.0
|
||||
|
||||
devDependencies:
|
||||
'@types/fs-extra':
|
||||
specifier: ^9.0.13
|
||||
version: registry.npmmirror.com/@types/fs-extra@9.0.13
|
||||
'@types/node':
|
||||
specifier: ^17.0.38
|
||||
version: registry.npmmirror.com/@types/node@17.0.38
|
||||
@ -79,14 +77,6 @@ packages:
|
||||
version: 1.0.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@types/fs-extra@9.0.13:
|
||||
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-9.0.13.tgz}
|
||||
name: '@types/fs-extra'
|
||||
version: 9.0.13
|
||||
dependencies:
|
||||
'@types/node': registry.npmmirror.com/@types/node@17.0.38
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@types/node@17.0.38:
|
||||
resolution: {integrity: sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-17.0.38.tgz}
|
||||
name: '@types/node'
|
||||
@ -133,33 +123,6 @@ packages:
|
||||
engines: {node: '>=0.3.1'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/fs-extra@10.1.0:
|
||||
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz}
|
||||
name: fs-extra
|
||||
version: 10.1.0
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
graceful-fs: registry.npmmirror.com/graceful-fs@4.2.10
|
||||
jsonfile: registry.npmmirror.com/jsonfile@6.1.0
|
||||
universalify: registry.npmmirror.com/universalify@2.0.0
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/graceful-fs@4.2.10:
|
||||
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz}
|
||||
name: graceful-fs
|
||||
version: 4.2.10
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/jsonfile@6.1.0:
|
||||
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz}
|
||||
name: jsonfile
|
||||
version: 6.1.0
|
||||
dependencies:
|
||||
universalify: registry.npmmirror.com/universalify@2.0.0
|
||||
optionalDependencies:
|
||||
graceful-fs: registry.npmmirror.com/graceful-fs@4.2.10
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/make-error@1.3.6:
|
||||
resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz}
|
||||
name: make-error
|
||||
@ -208,13 +171,6 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/universalify@2.0.0:
|
||||
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz}
|
||||
name: universalify
|
||||
version: 2.0.0
|
||||
engines: {node: '>= 10.0.0'}
|
||||
dev: false
|
||||
|
||||
registry.npmmirror.com/v8-compile-cache-lib@3.0.1:
|
||||
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz}
|
||||
name: v8-compile-cache-lib
|
||||
|
||||
@ -28,6 +28,10 @@ https://afdian.net/@the1812?tab=sponsor
|
||||
|
||||
| 时间 | 用户名 | 单号后4位 | 金额 |
|
||||
| ------------------- | ---------------- | --------- | ------- |
|
||||
| 2023.05.22 13:38:55 | 匿名 | 4950 | ¥10.00 |
|
||||
| 2023.04.26 20:14:14 | 鹏*u | 3047 | ¥50.00 |
|
||||
| 2023.04.25 21:08:48 | 匿名 | 8365 | ¥20.00 |
|
||||
| 2023.04.25 19:58:14 | *哈 | 6384 | ¥1.00 |
|
||||
| 2023.04.23 17:50:52 | 匿名 | 8968 | ¥2.00 |
|
||||
| 2023.04.22 23:13:20 | 匿名 | 3581 | ¥5.00 |
|
||||
| 2023.04.10 00:29:46 | *- | 3636 | ¥10.00 |
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
"type": "component",
|
||||
"name": "extendFeedsLive",
|
||||
"displayName": "直播信息扩充",
|
||||
"description": "在动态的`正在直播`中, 为每一个直播间加上标题, 并且能够显示超过10个的直播间.",
|
||||
"description": "替换动态的 `正在直播` 面板, 能够显示超过 10 个的直播间.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/feeds/extend-live.js",
|
||||
"fullAbsolutePath": "registry/dist/components/feeds/extend-live.js"
|
||||
},
|
||||
@ -27,7 +27,7 @@
|
||||
"type": "component",
|
||||
"name": "feedsFilter",
|
||||
"displayName": "动态过滤器",
|
||||
"description": "按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片.",
|
||||
"description": "按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片. 详细设置请前往[动态首页](https://t.bilibili.com/)查看.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/feeds/filter.js",
|
||||
"fullAbsolutePath": "registry/dist/components/feeds/filter.js"
|
||||
},
|
||||
@ -71,6 +71,14 @@
|
||||
"fullRelativePath": "../../registry/dist/components/feeds/hide-comment-preview.js",
|
||||
"fullAbsolutePath": "registry/dist/components/feeds/hide-comment-preview.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "imageAutoBackToTop",
|
||||
"displayName": "动态看图自动回顶",
|
||||
"description": "在动态里查看图片详情时 (非全屏), 切换图片自动回到图片顶部; 退出查看图片模式时, 自动将动态移入视图内.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/feeds/image-auto-back-to-top.js",
|
||||
"fullAbsolutePath": "registry/dist/components/feeds/image-auto-back-to-top.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "unfoldFeeds",
|
||||
@ -215,6 +223,22 @@
|
||||
"fullRelativePath": "../../registry/dist/components/style/hide/banner.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/hide/banner.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "hideTrendingSearch",
|
||||
"displayName": "隐藏热搜",
|
||||
"description": "隐藏搜索栏和搜索页面中的 `bilibili 热搜`. 请注意这只是视觉上的隐藏, 如果不输入任何关键词就点 Enter 或搜索按钮, 仍然会跳转至推荐的热搜词.",
|
||||
"fullRelativePath": "../../registry/dist/components/style/hide/trending-search.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/hide/trending-search.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "hideUserCard",
|
||||
"displayName": "隐藏用户信息卡片",
|
||||
"description": "by [@WakelessSloth56](https://github.com/WakelessSloth56)\n\n隐藏鼠标指向用户名或用户头像时弹出的浮动用户信息卡片",
|
||||
"fullRelativePath": "../../registry/dist/components/style/hide/user-card.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/hide/user-card.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "hideRecommendedLive",
|
||||
@ -231,6 +255,14 @@
|
||||
"fullRelativePath": "../../registry/dist/components/style/hide/video/related-videos.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/hide/video/related-videos.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "hideVideoShare",
|
||||
"displayName": "隐藏视频分享",
|
||||
"description": "隐藏视频和番剧播放器下方的分享按钮.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/style/hide/video/share.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/hide/video/share.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "hideVideoTopMask",
|
||||
@ -255,6 +287,14 @@
|
||||
"fullRelativePath": "../../registry/dist/components/style/home-redesign/minimal.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/home-redesign/minimal.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "playerOnTopNew",
|
||||
"displayName": "播放器置顶(新)",
|
||||
"description": "by [@RieN7](https://github.com/rien7)\n\n原来的播放器置顶插件,现在已经不可用了,这是一个新的版本,可以在视频页面中将播放器放在页面最上方.",
|
||||
"fullRelativePath": "../../registry/dist/components/style/player-on-top-new.js",
|
||||
"fullAbsolutePath": "registry/dist/components/style/player-on-top-new.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "playerOnTop",
|
||||
@ -367,6 +407,14 @@
|
||||
"fullRelativePath": "../../registry/dist/components/touch/player-gestures.js",
|
||||
"fullAbsolutePath": "registry/dist/components/touch/player-gestures.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "autoLike",
|
||||
"displayName": "自动点赞",
|
||||
"description": "进入视频 / 查看动态时, 自动点赞.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/utils/auto-like.js",
|
||||
"fullAbsolutePath": "registry/dist/components/utils/auto-like.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "blackList",
|
||||
@ -467,7 +515,7 @@
|
||||
"type": "component",
|
||||
"name": "removePromotions",
|
||||
"displayName": "删除广告",
|
||||
"description": "删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示\"🚫已屏蔽广告\"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.",
|
||||
"description": "删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示\"🚫已屏蔽广告\"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.\n- `保留小喇叭`: 保留视频页面的活动横幅下方评论区上方的黄色小喇叭通知以及动态的黄色小喇叭.",
|
||||
"fullRelativePath": "../../registry/dist/components/utils/remove-promotions.js",
|
||||
"fullAbsolutePath": "registry/dist/components/utils/remove-promotions.js"
|
||||
},
|
||||
@ -475,7 +523,7 @@
|
||||
"type": "component",
|
||||
"name": "urlParamsClean",
|
||||
"displayName": "网址参数清理",
|
||||
"description": "自动删除网址中的多余跟踪参数. 请注意这会导致浏览器历史记录出现重复的标题 (分别是转换前后的网址), 并可能导致后退要多退几次.",
|
||||
"description": "自动删除网址中的多余跟踪参数. 请注意这会导致浏览器历史记录出现重复的标题 (分别是转换前后的网址), 并可能导致后退要多退几次.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/utils/url-params-clean.js",
|
||||
"fullAbsolutePath": "registry/dist/components/utils/url-params-clean.js"
|
||||
},
|
||||
@ -551,6 +599,14 @@
|
||||
"fullRelativePath": "../../registry/dist/components/video/danmaku/expand.js",
|
||||
"fullAbsolutePath": "registry/dist/components/video/danmaku/expand.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "unescapeDanmaku",
|
||||
"displayName": "弹幕转义",
|
||||
"description": "将弹幕中的 `\\n` 替换为真实的换行, 注意这可能导致原先不重叠的弹幕发生重叠.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/video/danmaku/unescape.js",
|
||||
"fullAbsolutePath": "registry/dist/components/video/danmaku/unescape.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "videoDefaultLocation",
|
||||
@ -619,7 +675,7 @@
|
||||
"type": "component",
|
||||
"name": "disableScrollVolume",
|
||||
"displayName": "禁止滚轮调音量",
|
||||
"description": "在网页全屏 / 全屏模式下, 禁止鼠标滚轮控制播放器的音量.",
|
||||
"description": "在网页全屏 / 全屏模式下, 禁止鼠标滚轮控制播放器的音量. 请注意不能和 `反转滚轮调音量` 一同使用.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/video/player/disable-scroll-volume.js",
|
||||
"fullAbsolutePath": "registry/dist/components/video/player/disable-scroll-volume.js"
|
||||
},
|
||||
@ -655,6 +711,14 @@
|
||||
"fullRelativePath": "../../registry/dist/components/video/player/intersection-actions.js",
|
||||
"fullAbsolutePath": "registry/dist/components/video/player/intersection-actions.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "invertScrollVolume",
|
||||
"displayName": "反转滚轮调音量",
|
||||
"description": "反转在网页全屏 / 全屏模式下使用滚轮调节音量的方向, 使其更符合使用触控板时的操作方向. 请注意不能和 `禁止滚轮调音量` 一同使用.\r\n\r\n- 手指向上推时, 增加音量\r\n- 手指向下推时, 减少音量\r\n- 可以自定义 `灵敏度`, 同样的滚动幅度下, 灵敏度越高变化的音量越多",
|
||||
"fullRelativePath": "../../registry/dist/components/video/player/invert-scroll-volume.js",
|
||||
"fullAbsolutePath": "registry/dist/components/video/player/invert-scroll-volume.js"
|
||||
},
|
||||
{
|
||||
"type": "component",
|
||||
"name": "legacyAutoPlay",
|
||||
@ -715,7 +779,7 @@
|
||||
"type": "component",
|
||||
"name": "showUploadTime",
|
||||
"displayName": "显示视频投稿时间",
|
||||
"description": "by [@wisokey](https://github.com/wisokey)\n\n为视频播放页面的推荐列表中的视频添加显示视频投稿时间.",
|
||||
"description": "by [@wisokey](https://github.com/wisokey)\n\n为视频播放页面的推荐列表中的视频添加显示视频投稿时间.\r\n\r\n`时间格式` 替换up名的文本格式 (默认为'up · yyyy-MM-dd'):\r\n - y: 年\r\n - M: 月\r\n - d: 日\r\n - h: 时\r\n - m: 分\r\n - s: 秒\r\n - q: 季度\r\n - up: up名\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/video/player/show-upload-time.js",
|
||||
"fullAbsolutePath": "registry/dist/components/video/player/show-upload-time.js"
|
||||
},
|
||||
@ -760,6 +824,38 @@
|
||||
"description": "by FoundTheWOUT\n\n在视频播放器右上角显示系统时间.",
|
||||
"owner": "FoundTheWOUT"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "launchBar.actions.audioSearch",
|
||||
"displayName": "搜索栏 - 音频跳转",
|
||||
"description": "在输入音频的 au 号或播放列表的 am 号时, 提供对应的跳转选项.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/plugins/launch-bar/audio-search.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/launch-bar/audio-search.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "launchBar.actions.bangumiSearch",
|
||||
"displayName": "搜索栏 - 番剧跳转",
|
||||
"description": "在输入番剧的 ss 号 / ep 号, 或番剧详情的 md 号时, 提供对应的跳转选项.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/plugins/launch-bar/bangumi-search.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/launch-bar/bangumi-search.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "launchBar.actions.cvSearch",
|
||||
"displayName": "搜索栏 - 专栏跳转",
|
||||
"description": "在输入专栏的 cv 号或专栏文集的 rl 号时, 提供对应的跳转选项.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/plugins/launch-bar/cv-search.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/launch-bar/cv-search.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "launchBar.actions.numberSearch",
|
||||
"displayName": "搜索栏 - 数字联想",
|
||||
"description": "在输入纯数字时, 提供以下选项:\r\n- 跳转至相应的视频 (视为 av 号)\r\n- 跳转至相应的专栏 (视为 cv 号)\r\n",
|
||||
"fullRelativePath": "../../registry/dist/plugins/launch-bar/number-search.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/launch-bar/number-search.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "launchBar.trendingSearch",
|
||||
@ -768,6 +864,14 @@
|
||||
"fullRelativePath": "../../registry/dist/plugins/launch-bar/trending-search.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/launch-bar/trending-search.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "launchBar.actions.uidSearch",
|
||||
"displayName": "搜索栏 - UID 跳转",
|
||||
"description": "在输入 UID (用户 ID) 时, 提供对应的跳转选项.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/plugins/launch-bar/uid-search.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/launch-bar/uid-search.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "settingsPanel.tagFilters.recentComponents",
|
||||
@ -816,6 +920,14 @@
|
||||
"fullRelativePath": "../../registry/dist/plugins/utils/keymap-toggle-danmaku-list.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/utils/keymap-toggle-danmaku-list.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "keymap.actions.togglePlayerLight",
|
||||
"displayName": "快捷键扩展 - 开关灯",
|
||||
"description": "在快捷键的动作列表里添加一个 \"开关灯\".",
|
||||
"fullRelativePath": "../../registry/dist/plugins/utils/keymap-toggle-player-light.js",
|
||||
"fullAbsolutePath": "registry/dist/plugins/utils/keymap-toggle-player-light.js"
|
||||
},
|
||||
{
|
||||
"type": "plugin",
|
||||
"name": "keymap.actions.toggleSubtitle",
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/feeds/extend-live.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/feeds/extend-live.js)
|
||||
|
||||
在动态的`正在直播`中, 为每一个直播间加上标题, 并且能够显示超过10个的直播间.
|
||||
替换动态的 `正在直播` 面板, 能够显示超过 10 个的直播间.
|
||||
|
||||
### [动态过滤器](../../registry/dist/components/feeds/filter.js)
|
||||
`feedsFilter`
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/feeds/filter.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/feeds/filter.js)
|
||||
|
||||
按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片.
|
||||
按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片. 详细设置请前往[动态首页](https://t.bilibili.com/)查看.
|
||||
|
||||
### [强制固定动态侧栏](../../registry/dist/components/feeds/fixed-sidebars.js)
|
||||
`fixedFeedsSidebars`
|
||||
@ -83,6 +83,15 @@
|
||||
|
||||
隐藏动态评论按钮上方的精选评论预览. (详细可看 [#3322](https://github.com/the1812/Bilibili-Evolved/discussions/3322))
|
||||
|
||||
### [动态看图自动回顶](../../registry/dist/components/feeds/image-auto-back-to-top.js)
|
||||
`imageAutoBackToTop`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/feeds/image-auto-back-to-top.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/feeds/image-auto-back-to-top.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/feeds/image-auto-back-to-top.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/feeds/image-auto-back-to-top.js)
|
||||
|
||||
在动态里查看图片详情时 (非全屏), 切换图片自动回到图片顶部; 退出查看图片模式时, 自动将动态移入视图内.
|
||||
|
||||
### [动态反折叠](../../registry/dist/components/feeds/unfold.js)
|
||||
`unfoldFeeds`
|
||||
|
||||
@ -255,6 +264,26 @@
|
||||
|
||||
隐藏首页顶部横幅.
|
||||
|
||||
### [隐藏热搜](../../registry/dist/components/style/hide/trending-search.js)
|
||||
`hideTrendingSearch`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/style/hide/trending-search.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/style/hide/trending-search.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/trending-search.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/trending-search.js)
|
||||
|
||||
隐藏搜索栏和搜索页面中的 `bilibili 热搜`. 请注意这只是视觉上的隐藏, 如果不输入任何关键词就点 Enter 或搜索按钮, 仍然会跳转至推荐的热搜词.
|
||||
|
||||
### [隐藏用户信息卡片](../../registry/dist/components/style/hide/user-card.js)
|
||||
`hideUserCard`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/style/hide/user-card.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/style/hide/user-card.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/user-card.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/user-card.js)
|
||||
|
||||
by [@WakelessSloth56](https://github.com/WakelessSloth56)
|
||||
|
||||
隐藏鼠标指向用户名或用户头像时弹出的浮动用户信息卡片
|
||||
|
||||
### [隐藏直播推荐](../../registry/dist/components/style/hide/video/recommended-live.js)
|
||||
`hideRecommendedLive`
|
||||
|
||||
@ -273,6 +302,15 @@
|
||||
|
||||
隐藏番剧和视频页面右侧的推荐视频列表. 注意: 如果你想关闭 b 站的自动连播 (自动播放下一个推荐视频) 功能, 需要先取消隐藏视频推荐才能看到开关.
|
||||
|
||||
### [隐藏视频分享](../../registry/dist/components/style/hide/video/share.js)
|
||||
`hideVideoShare`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/style/hide/video/share.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/style/hide/video/share.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/hide/video/share.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/hide/video/share.js)
|
||||
|
||||
隐藏视频和番剧播放器下方的分享按钮.
|
||||
|
||||
### [隐藏视频标题层](../../registry/dist/components/style/hide/video/top-mask.js)
|
||||
`hideVideoTopMask`
|
||||
|
||||
@ -310,6 +348,17 @@
|
||||
- 个性化推荐: 启用时展示推荐视频, 禁用时展示热门视频
|
||||
- 自定义列数: 为 `0` 时根据视图宽度推断, 大于 `0` 的值将作为固定的列数
|
||||
|
||||
### [播放器置顶(新)](../../registry/dist/components/style/player-on-top-new.js)
|
||||
`playerOnTopNew`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/style/player-on-top-new.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/style/player-on-top-new.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/style/player-on-top-new.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/style/player-on-top-new.js)
|
||||
|
||||
by [@RieN7](https://github.com/rien7)
|
||||
|
||||
原来的播放器置顶插件,现在已经不可用了,这是一个新的版本,可以在视频页面中将播放器放在页面最上方.
|
||||
|
||||
### [播放器置顶](../../registry/dist/components/style/player-on-top.js)
|
||||
`playerOnTop`
|
||||
|
||||
@ -449,6 +498,15 @@
|
||||
- 进度调整可在左上角和右上角取消
|
||||
- 进度调整时在不同位置滑动, 可以使用3档不同的灵敏度.
|
||||
|
||||
### [自动点赞](../../registry/dist/components/utils/auto-like.js)
|
||||
`autoLike`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/utils/auto-like.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/utils/auto-like.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/auto-like.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/utils/auto-like.js)
|
||||
|
||||
进入视频 / 查看动态时, 自动点赞.
|
||||
|
||||
### [屏蔽黑名单up主](../../registry/dist/components/utils/black-list.js)
|
||||
`blackList`
|
||||
|
||||
@ -598,6 +656,7 @@ by [@aiden](https://github.com/swhoro)
|
||||
|
||||
- `占位文本`: 删除首页推广模块的广告后显示"🚫已屏蔽广告"来替代空白区域.
|
||||
- `保留活动横幅`: 保留视频页面的活动横幅.
|
||||
- `保留小喇叭`: 保留视频页面的活动横幅下方评论区上方的黄色小喇叭通知以及动态的黄色小喇叭.
|
||||
|
||||
### [网址参数清理](../../registry/dist/components/utils/url-params-clean.js)
|
||||
`urlParamsClean`
|
||||
@ -691,6 +750,15 @@ by [@kdxcxs](https://github.com/kdxcxs)
|
||||
|
||||
每次加载视频时自动展开弹幕列表, 如果弹幕装载量超过 `最大弹幕数量`, 则不展开以免对页面造成卡顿. (`最大弹幕数量` 是和视频的总弹幕量对比, 不一定和播放器实际装载的弹幕量相等)
|
||||
|
||||
### [弹幕转义](../../registry/dist/components/video/danmaku/unescape.js)
|
||||
`unescapeDanmaku`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/video/danmaku/unescape.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/video/danmaku/unescape.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/video/danmaku/unescape.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/video/danmaku/unescape.js)
|
||||
|
||||
将弹幕中的 `\n` 替换为真实的换行, 注意这可能导致原先不重叠的弹幕发生重叠.
|
||||
|
||||
### [视频页默认定位](../../registry/dist/components/video/default-location.js)
|
||||
`videoDefaultLocation`
|
||||
|
||||
@ -794,7 +862,7 @@ by [@kdxcxs](https://github.com/kdxcxs)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/video/player/disable-scroll-volume.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/video/player/disable-scroll-volume.js)
|
||||
|
||||
在网页全屏 / 全屏模式下, 禁止鼠标滚轮控制播放器的音量.
|
||||
在网页全屏 / 全屏模式下, 禁止鼠标滚轮控制播放器的音量. 请注意不能和 `反转滚轮调音量` 一同使用.
|
||||
|
||||
### [双击全屏](../../registry/dist/components/video/player/double-click-fullscreen.js)
|
||||
`doubleClickFullscreen`
|
||||
@ -862,6 +930,19 @@ by [@FoundTheWOUT](https://github.com/FoundTheWOUT)
|
||||
|
||||
设置当播放器移出视图的位置变化时执行的动作.
|
||||
|
||||
### [反转滚轮调音量](../../registry/dist/components/video/player/invert-scroll-volume.js)
|
||||
`invertScrollVolume`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/components/video/player/invert-scroll-volume.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/components/video/player/invert-scroll-volume.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/video/player/invert-scroll-volume.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/components/video/player/invert-scroll-volume.js)
|
||||
|
||||
反转在网页全屏 / 全屏模式下使用滚轮调节音量的方向, 使其更符合使用触控板时的操作方向. 请注意不能和 `禁止滚轮调音量` 一同使用.
|
||||
|
||||
- 手指向上推时, 增加音量
|
||||
- 手指向下推时, 减少音量
|
||||
- 可以自定义 `灵敏度`, 同样的滚动幅度下, 灵敏度越高变化的音量越多
|
||||
|
||||
### [传统连播模式](../../registry/dist/components/video/player/legacy-auto-play.js)
|
||||
`legacyAutoPlay`
|
||||
|
||||
@ -960,6 +1041,16 @@ by [@wisokey](https://github.com/wisokey)
|
||||
|
||||
为视频播放页面的推荐列表中的视频添加显示视频投稿时间.
|
||||
|
||||
`时间格式` 替换up名的文本格式 (默认为'up · yyyy-MM-dd'):
|
||||
- y: 年
|
||||
- M: 月
|
||||
- d: 日
|
||||
- h: 时
|
||||
- m: 分
|
||||
- s: 秒
|
||||
- q: 季度
|
||||
- up: up名
|
||||
|
||||
### [跳过充电鸣谢](../../registry/dist/components/video/player/skip-charge-list.js)
|
||||
`skipChargeList`
|
||||
|
||||
@ -1008,6 +1099,44 @@ by FoundTheWOUT
|
||||
在视频播放器右上角显示系统时间.
|
||||
## 插件
|
||||
|
||||
### [搜索栏 - 音频跳转](../../registry/dist/plugins/launch-bar/audio-search.js)
|
||||
`launchBar.actions.audioSearch`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/launch-bar/audio-search.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/launch-bar/audio-search.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/launch-bar/audio-search.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/launch-bar/audio-search.js)
|
||||
|
||||
在输入音频的 au 号或播放列表的 am 号时, 提供对应的跳转选项.
|
||||
|
||||
### [搜索栏 - 番剧跳转](../../registry/dist/plugins/launch-bar/bangumi-search.js)
|
||||
`launchBar.actions.bangumiSearch`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/launch-bar/bangumi-search.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/launch-bar/bangumi-search.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/launch-bar/bangumi-search.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/launch-bar/bangumi-search.js)
|
||||
|
||||
在输入番剧的 ss 号 / ep 号, 或番剧详情的 md 号时, 提供对应的跳转选项.
|
||||
|
||||
### [搜索栏 - 专栏跳转](../../registry/dist/plugins/launch-bar/cv-search.js)
|
||||
`launchBar.actions.cvSearch`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/launch-bar/cv-search.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/launch-bar/cv-search.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/launch-bar/cv-search.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/launch-bar/cv-search.js)
|
||||
|
||||
在输入专栏的 cv 号或专栏文集的 rl 号时, 提供对应的跳转选项.
|
||||
|
||||
### [搜索栏 - 数字联想](../../registry/dist/plugins/launch-bar/number-search.js)
|
||||
`launchBar.actions.numberSearch`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/launch-bar/number-search.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/launch-bar/number-search.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/launch-bar/number-search.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/launch-bar/number-search.js)
|
||||
|
||||
在输入纯数字时, 提供以下选项:
|
||||
- 跳转至相应的视频 (视为 av 号)
|
||||
- 跳转至相应的专栏 (视为 cv 号)
|
||||
|
||||
### [搜索栏 - 搜索推荐](../../registry/dist/plugins/launch-bar/trending-search.js)
|
||||
`launchBar.trendingSearch`
|
||||
|
||||
@ -1017,6 +1146,15 @@ by FoundTheWOUT
|
||||
|
||||
在脚本的搜索栏中默认显示类似 b 站搜索栏的搜索推荐词, 替代原来的 "搜索" 两字.
|
||||
|
||||
### [搜索栏 - UID 跳转](../../registry/dist/plugins/launch-bar/uid-search.js)
|
||||
`launchBar.actions.uidSearch`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/launch-bar/uid-search.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/launch-bar/uid-search.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/launch-bar/uid-search.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/launch-bar/uid-search.js)
|
||||
|
||||
在输入 UID (用户 ID) 时, 提供对应的跳转选项.
|
||||
|
||||
### [设置面板 - "最近使用" 类别](../../registry/dist/plugins/settings-panel/recent-components.js)
|
||||
`settingsPanel.tagFilters.recentComponents`
|
||||
|
||||
@ -1071,6 +1209,15 @@ by FoundTheWOUT
|
||||
|
||||
在快捷键的动作列表里添加一个 "开关弹幕列表".
|
||||
|
||||
### [快捷键扩展 - 开关灯](../../registry/dist/plugins/utils/keymap-toggle-player-light.js)
|
||||
`keymap.actions.togglePlayerLight`
|
||||
|
||||
**jsDelivr:** [`Stable`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@master/registry/dist/plugins/utils/keymap-toggle-player-light.js) / [`Preview`](https://fastly.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/registry/dist/plugins/utils/keymap-toggle-player-light.js)
|
||||
|
||||
**GitHub:** [`Stable`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/plugins/utils/keymap-toggle-player-light.js) / [`Preview`](https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/utils/keymap-toggle-player-light.js)
|
||||
|
||||
在快捷键的动作列表里添加一个 "开关灯".
|
||||
|
||||
### [快捷键扩展 - 开关 CC 字幕](../../registry/dist/plugins/utils/keymap-toggle-subtitle.js)
|
||||
`keymap.actions.toggleSubtitle`
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"type": "component",
|
||||
"name": "removePromotions",
|
||||
"displayName": "删除广告",
|
||||
"description": "删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示\"🚫已屏蔽广告\"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.",
|
||||
"description": "删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示\"🚫已屏蔽广告\"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.\n- `保留小喇叭`: 保留视频页面的活动横幅下方评论区上方的黄色小喇叭通知以及动态的黄色小喇叭.",
|
||||
"fullRelativePath": "../../registry/dist/components/utils/remove-promotions.js",
|
||||
"fullAbsolutePath": "registry/dist/components/utils/remove-promotions.js"
|
||||
},
|
||||
@ -200,7 +200,7 @@
|
||||
"type": "component",
|
||||
"name": "removePromotions",
|
||||
"displayName": "删除广告",
|
||||
"description": "删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示\"🚫已屏蔽广告\"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.",
|
||||
"description": "删除站内的各种广告. 包括首页的推广模块, 手机 app 推荐, 视频页面右侧的广告等. 注意: 首页推广模块删除后留下空白区域是正常现象, 如果觉得怪可以开启 `占位文本` 选项.\n\n- `占位文本`: 删除首页推广模块的广告后显示\"🚫已屏蔽广告\"来替代空白区域.\n- `保留活动横幅`: 保留视频页面的活动横幅.\n- `保留小喇叭`: 保留视频页面的活动横幅下方评论区上方的黄色小喇叭通知以及动态的黄色小喇叭.",
|
||||
"fullRelativePath": "../../registry/dist/components/utils/remove-promotions.js",
|
||||
"fullAbsolutePath": "registry/dist/components/utils/remove-promotions.js"
|
||||
},
|
||||
@ -216,7 +216,7 @@
|
||||
"type": "component",
|
||||
"name": "urlParamsClean",
|
||||
"displayName": "网址参数清理",
|
||||
"description": "自动删除网址中的多余跟踪参数. 请注意这会导致浏览器历史记录出现重复的标题 (分别是转换前后的网址), 并可能导致后退要多退几次.",
|
||||
"description": "自动删除网址中的多余跟踪参数. 请注意这会导致浏览器历史记录出现重复的标题 (分别是转换前后的网址), 并可能导致后退要多退几次.\r\n",
|
||||
"fullRelativePath": "../../registry/dist/components/utils/url-params-clean.js",
|
||||
"fullAbsolutePath": "registry/dist/components/utils/url-params-clean.js"
|
||||
},
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
# 发布新的正式版前要做的事
|
||||
# 发版流程
|
||||
|
||||
## 正式版
|
||||
- 编写 change log
|
||||
- 更新版本号, 打上 tag
|
||||
- 更新 donate.md
|
||||
- 生成文档
|
||||
- 带 tag 推送
|
||||
- 测下 Firefox + Violentmonkey
|
||||
|
||||
## 预览版
|
||||
- 更新版本号, 打上 tag
|
||||
- 生成文档
|
||||
- 编译预览版
|
||||
- 带 tag 推送
|
||||
- 打开 Tampermonkey, 更新其中的预览版, 测试功能
|
||||
- 测下 Firefox + Violentmonkey
|
||||
- 测下 Edge + Tampermonkey
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
"scripts": {
|
||||
"build-core": "webpack --config ./webpack/webpack.prod.ts --bail",
|
||||
"build-features": "webpack --config ./registry/webpack/all.ts --bail",
|
||||
"build-github-config": "ts-node ./.github-json/index.ts",
|
||||
"lint": "eslint --quiet --fix . --ext .ts,.vue",
|
||||
"lint-check": "eslint . --ext .ts,.vue",
|
||||
"type": "tsc -p tsconfig.type-check.json --noEmit"
|
||||
@ -45,6 +46,7 @@
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "7.1.0",
|
||||
"fast-sass-loader": "^2.0.0",
|
||||
"glob": "^10.2.6",
|
||||
"postcss": "^8.1.0",
|
||||
"postcss-loader": "^4.0.4",
|
||||
"postcss-preset-env": "^7.5.0",
|
||||
@ -63,7 +65,8 @@
|
||||
"webpack": "^5.31.2",
|
||||
"webpack-bundle-analyzer": "^4.5.0",
|
||||
"webpack-cli": "^4.6.0",
|
||||
"ws": "^8.5.0"
|
||||
"ws": "^8.5.0",
|
||||
"yaml": "^2.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.6.0",
|
||||
|
||||
182
pnpm-lock.yaml
generated
182
pnpm-lock.yaml
generated
@ -1,4 +1,8 @@
|
||||
lockfileVersion: '6.0'
|
||||
lockfileVersion: '6.1'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
overrides:
|
||||
caniuse-lite: ^1.0.30001481
|
||||
@ -135,6 +139,9 @@ devDependencies:
|
||||
fast-sass-loader:
|
||||
specifier: ^2.0.0
|
||||
version: registry.npmmirror.com/fast-sass-loader@2.0.1(sass@1.51.0)(webpack@5.72.0)
|
||||
glob:
|
||||
specifier: ^10.2.6
|
||||
version: registry.npmmirror.com/glob@10.2.6
|
||||
postcss:
|
||||
specifier: ^8.1.0
|
||||
version: registry.npmmirror.com/postcss@8.4.13
|
||||
@ -192,6 +199,9 @@ devDependencies:
|
||||
ws:
|
||||
specifier: ^8.5.0
|
||||
version: registry.npmmirror.com/ws@8.5.0
|
||||
yaml:
|
||||
specifier: ^2.3.1
|
||||
version: registry.npmmirror.com/yaml@2.3.1
|
||||
|
||||
packages:
|
||||
|
||||
@ -1878,6 +1888,20 @@ packages:
|
||||
version: 1.2.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@isaacs/cliui@8.0.2:
|
||||
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz}
|
||||
name: '@isaacs/cliui'
|
||||
version: 8.0.2
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
string-width: registry.npmmirror.com/string-width@5.1.2
|
||||
string-width-cjs: registry.npmmirror.com/string-width@4.2.3
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi@7.1.0
|
||||
strip-ansi-cjs: registry.npmmirror.com/strip-ansi@6.0.1
|
||||
wrap-ansi: registry.npmmirror.com/wrap-ansi@8.1.0
|
||||
wrap-ansi-cjs: registry.npmmirror.com/wrap-ansi@7.0.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@jridgewell/gen-mapping@0.1.1:
|
||||
resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz}
|
||||
name: '@jridgewell/gen-mapping'
|
||||
@ -1955,6 +1979,15 @@ packages:
|
||||
fastq: registry.npmmirror.com/fastq@1.13.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/@pkgjs/parseargs@0.11.0:
|
||||
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz}
|
||||
name: '@pkgjs/parseargs'
|
||||
version: 0.11.0
|
||||
engines: {node: '>=14'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
registry.npmmirror.com/@polka/url@1.0.0-next.21:
|
||||
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@polka/url/-/url-1.0.0-next.21.tgz}
|
||||
name: '@polka/url'
|
||||
@ -2773,6 +2806,13 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/ansi-regex@6.0.1:
|
||||
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz}
|
||||
name: ansi-regex
|
||||
version: 6.0.1
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/ansi-styles@2.2.1:
|
||||
resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-styles/-/ansi-styles-2.2.1.tgz}
|
||||
name: ansi-styles
|
||||
@ -2798,6 +2838,13 @@ packages:
|
||||
color-convert: registry.npmmirror.com/color-convert@2.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/ansi-styles@6.2.1:
|
||||
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz}
|
||||
name: ansi-styles
|
||||
version: 6.2.1
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/anymatch@3.1.2:
|
||||
resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/anymatch/-/anymatch-3.1.2.tgz}
|
||||
name: anymatch
|
||||
@ -3020,6 +3067,14 @@ packages:
|
||||
concat-map: registry.npmmirror.com/concat-map@0.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/brace-expansion@2.0.1:
|
||||
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz}
|
||||
name: brace-expansion
|
||||
version: 2.0.1
|
||||
dependencies:
|
||||
balanced-match: registry.npmmirror.com/balanced-match@1.0.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/braces@3.0.2:
|
||||
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz}
|
||||
name: braces
|
||||
@ -3734,6 +3789,12 @@ packages:
|
||||
version: 0.1.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/eastasianwidth@0.2.0:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz}
|
||||
name: eastasianwidth
|
||||
version: 0.2.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/electron-to-chromium@1.4.284:
|
||||
resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz}
|
||||
name: electron-to-chromium
|
||||
@ -3746,6 +3807,12 @@ packages:
|
||||
version: 8.0.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/emoji-regex@9.2.2:
|
||||
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz}
|
||||
name: emoji-regex
|
||||
version: 9.2.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/emojis-list@3.0.0:
|
||||
resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz}
|
||||
name: emojis-list
|
||||
@ -4367,6 +4434,16 @@ packages:
|
||||
version: 3.2.5
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/foreground-child@3.1.1:
|
||||
resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/foreground-child/-/foreground-child-3.1.1.tgz}
|
||||
name: foreground-child
|
||||
version: 3.1.1
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
cross-spawn: registry.npmmirror.com/cross-spawn@7.0.3
|
||||
signal-exit: registry.npmmirror.com/signal-exit@4.0.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/fraction.js@4.2.0:
|
||||
resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fraction.js/-/fraction.js-4.2.0.tgz}
|
||||
name: fraction.js
|
||||
@ -4494,6 +4571,20 @@ packages:
|
||||
version: 0.4.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/glob@10.2.6:
|
||||
resolution: {integrity: sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/glob/-/glob-10.2.6.tgz}
|
||||
name: glob
|
||||
version: 10.2.6
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
foreground-child: registry.npmmirror.com/foreground-child@3.1.1
|
||||
jackspeak: registry.npmmirror.com/jackspeak@2.2.1
|
||||
minimatch: registry.npmmirror.com/minimatch@9.0.1
|
||||
minipass: registry.npmmirror.com/minipass@6.0.2
|
||||
path-scurry: registry.npmmirror.com/path-scurry@1.9.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/glob@7.2.0:
|
||||
resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/glob/-/glob-7.2.0.tgz}
|
||||
name: glob
|
||||
@ -4956,6 +5047,17 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/jackspeak@2.2.1:
|
||||
resolution: {integrity: sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jackspeak/-/jackspeak-2.2.1.tgz}
|
||||
name: jackspeak
|
||||
version: 2.2.1
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@isaacs/cliui': registry.npmmirror.com/@isaacs/cliui@8.0.2
|
||||
optionalDependencies:
|
||||
'@pkgjs/parseargs': registry.npmmirror.com/@pkgjs/parseargs@0.11.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/jest-worker@27.5.1:
|
||||
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz}
|
||||
name: jest-worker
|
||||
@ -5211,6 +5313,13 @@ packages:
|
||||
yallist: registry.npmmirror.com/yallist@4.0.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/lru-cache@9.1.1:
|
||||
resolution: {integrity: sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lru-cache/-/lru-cache-9.1.1.tgz}
|
||||
name: lru-cache
|
||||
version: 9.1.1
|
||||
engines: {node: 14 || >=16.14}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/make-dir@3.1.0:
|
||||
resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz}
|
||||
name: make-dir
|
||||
@ -5320,12 +5429,28 @@ packages:
|
||||
brace-expansion: registry.npmmirror.com/brace-expansion@1.1.11
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/minimatch@9.0.1:
|
||||
resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/minimatch/-/minimatch-9.0.1.tgz}
|
||||
name: minimatch
|
||||
version: 9.0.1
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
dependencies:
|
||||
brace-expansion: registry.npmmirror.com/brace-expansion@2.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/minimist@1.2.6:
|
||||
resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/minimist/-/minimist-1.2.6.tgz}
|
||||
name: minimist
|
||||
version: 1.2.6
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/minipass@6.0.2:
|
||||
resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/minipass/-/minipass-6.0.2.tgz}
|
||||
name: minipass
|
||||
version: 6.0.2
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/mrmime@1.0.0:
|
||||
resolution: {integrity: sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/mrmime/-/mrmime-1.0.0.tgz}
|
||||
name: mrmime
|
||||
@ -5651,6 +5776,16 @@ packages:
|
||||
version: 1.0.7
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/path-scurry@1.9.2:
|
||||
resolution: {integrity: sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/path-scurry/-/path-scurry-1.9.2.tgz}
|
||||
name: path-scurry
|
||||
version: 1.9.2
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
dependencies:
|
||||
lru-cache: registry.npmmirror.com/lru-cache@9.1.1
|
||||
minipass: registry.npmmirror.com/minipass@6.0.2
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/path-to-regexp@2.2.1:
|
||||
resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz}
|
||||
name: path-to-regexp
|
||||
@ -6689,6 +6824,13 @@ packages:
|
||||
version: 3.0.7
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/signal-exit@4.0.2:
|
||||
resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/signal-exit/-/signal-exit-4.0.2.tgz}
|
||||
name: signal-exit
|
||||
version: 4.0.2
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/simple-swizzle@0.2.2:
|
||||
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz}
|
||||
name: simple-swizzle
|
||||
@ -6781,6 +6923,17 @@ packages:
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi@6.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/string-width@5.1.2:
|
||||
resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz}
|
||||
name: string-width
|
||||
version: 5.1.2
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
eastasianwidth: registry.npmmirror.com/eastasianwidth@0.2.0
|
||||
emoji-regex: registry.npmmirror.com/emoji-regex@9.2.2
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi@7.1.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/string.prototype.trimend@1.0.5:
|
||||
resolution: {integrity: sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz}
|
||||
name: string.prototype.trimend
|
||||
@ -6827,6 +6980,15 @@ packages:
|
||||
ansi-regex: registry.npmmirror.com/ansi-regex@5.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/strip-ansi@7.1.0:
|
||||
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz}
|
||||
name: strip-ansi
|
||||
version: 7.1.0
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
ansi-regex: registry.npmmirror.com/ansi-regex@6.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/strip-bom@3.0.0:
|
||||
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz}
|
||||
name: strip-bom
|
||||
@ -7584,6 +7746,17 @@ packages:
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi@6.0.1
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/wrap-ansi@8.1.0:
|
||||
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz}
|
||||
name: wrap-ansi
|
||||
version: 8.1.0
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
ansi-styles: registry.npmmirror.com/ansi-styles@6.2.1
|
||||
string-width: registry.npmmirror.com/string-width@5.1.2
|
||||
strip-ansi: registry.npmmirror.com/strip-ansi@7.1.0
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/wrappy@1.0.2:
|
||||
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz}
|
||||
name: wrappy
|
||||
@ -7645,6 +7818,13 @@ packages:
|
||||
engines: {node: '>= 6'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/yaml@2.3.1:
|
||||
resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/yaml/-/yaml-2.3.1.tgz}
|
||||
name: yaml
|
||||
version: 2.3.1
|
||||
engines: {node: '>= 14'}
|
||||
dev: true
|
||||
|
||||
registry.npmmirror.com/yn@3.1.1:
|
||||
resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/yn/-/yn-3.1.1.tgz}
|
||||
name: yn
|
||||
|
||||
1
registry/dist/components/style/player-on-top-new.js
vendored
Normal file
1
registry/dist/components/style/player-on-top-new.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["style/player-on-top-new"]=o():e["style/player-on-top-new"]=o()}(globalThis,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)},o={};e.d(o,{component:()=>p});const t=coreApis.componentApis.define,n=coreApis.utils;function r(e,o){const t=e.parentElement;t&&(t.removeChild(e),t.insertBefore(e,o.nextSibling))}const p=(0,t.defineComponentMetadata)({name:"playerOnTopNew",author:{name:"RieN7",link:"https://github.com/rien7"},tags:[componentsTags.style,componentsTags.video],displayName:"播放器置顶(新)",description:"原来的播放器置顶插件,现在已经不可用了,这是一个新的版本,可以在视频页面中将播放器放在页面最上方.",entry:async()=>{await(0,n.playerReady)();r(document.querySelector("#viewbox_report"),document.querySelector("#arc_toolbar_report"));r(document.querySelector("#v_upinfo").parentElement,document.querySelector("#danmukuBox"))},commitHash:"b08ebfbef7d0b5320ae67d8f0568d8bb0ed24635",coreVersion:"2.7.0"});return o=o.component})()));
|
||||
@ -1,6 +1,4 @@
|
||||
[data-module="desc"][data-orig],
|
||||
.card[data-did] .content {
|
||||
cursor: text;
|
||||
@mixin details() {
|
||||
.details {
|
||||
color: #222;
|
||||
font-size: 12px;
|
||||
@ -13,8 +11,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
[data-module='desc'][data-orig],
|
||||
.card[data-did] .content {
|
||||
cursor: text;
|
||||
@include details();
|
||||
}
|
||||
.bili-rich-text-module {
|
||||
&.at {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.dyn-card-opus {
|
||||
&__summary {
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ const entry = async () => {
|
||||
}
|
||||
const contents = dqa(
|
||||
element,
|
||||
'.content, .bili-dyn-content [data-module="desc"] .bili-rich-text',
|
||||
'.content, .bili-dyn-content [data-module="desc"] .bili-rich-text, .dyn-card-opus__summary',
|
||||
)
|
||||
const target = e.target as HTMLElement
|
||||
if (target.hasAttribute('click-title')) {
|
||||
|
||||
227
registry/lib/components/feeds/extend-live/LiveList.vue
Normal file
227
registry/lib/components/feeds/extend-live/LiveList.vue
Normal file
@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<div class="be-live-list">
|
||||
<div class="be-live-list-header">
|
||||
<div class="be-live-list-title">
|
||||
正在直播
|
||||
<div class="be-live-list-count">({{ items.length }})</div>
|
||||
</div>
|
||||
<div class="be-live-list-actions">
|
||||
<div v-if="loaded" class="be-live-list-refresh" title="刷新" @click="refresh">
|
||||
<VIcon icon="mdi-refresh" :size="16" />
|
||||
</div>
|
||||
<a
|
||||
class="be-live-list-more"
|
||||
target="_blank"
|
||||
href="https://link.bilibili.com/p/center/index#/user-center/follow/1"
|
||||
>
|
||||
更多
|
||||
<VIcon icon="right-arrow" :size="14" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="be-live-list-search">
|
||||
<VIcon icon="search" :size="18" />
|
||||
<TextBox v-model="keyword" placeholder="搜索" />
|
||||
</div>
|
||||
<div class="be-live-list-content">
|
||||
<VLoading v-if="!loaded" />
|
||||
<VEmpty v-if="loaded && filteredItems.length === 0" />
|
||||
<a
|
||||
v-for="item of filteredItems"
|
||||
:key="item.roomid"
|
||||
class="be-live-list-item"
|
||||
target="_blank"
|
||||
:href="item.link"
|
||||
>
|
||||
<div class="be-live-list-item-avatar">
|
||||
<DpiImage :src="item.face" :alt="item.title" :size="36" />
|
||||
</div>
|
||||
<div class="be-live-list-item-info">
|
||||
<div class="be-live-list-item-title" :title="item.title">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="be-live-list-item-user" :title="item.uname">
|
||||
{{ item.uname }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VIcon, TextBox, DpiImage, VEmpty, VLoading } from '@/ui'
|
||||
import { getJsonWithCredentials, responsiveGetPages } from '@/core/ajax'
|
||||
|
||||
interface LiveInfo {
|
||||
cover: string
|
||||
face: string
|
||||
uname: string
|
||||
title: string
|
||||
roomid: number
|
||||
pic: string
|
||||
online: number
|
||||
uid: number
|
||||
link: string
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
VIcon,
|
||||
TextBox,
|
||||
DpiImage,
|
||||
VEmpty,
|
||||
VLoading,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
loaded: false,
|
||||
keyword: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredItems() {
|
||||
if (this.keyword) {
|
||||
return (this.items as LiveInfo[]).filter(it => {
|
||||
const matchField = (field: keyof LiveInfo) => {
|
||||
return it[field].toString().toLowerCase().includes(this.keyword.toLowerCase())
|
||||
}
|
||||
return (
|
||||
matchField('title') || matchField('uname') || matchField('roomid') || matchField('uid')
|
||||
)
|
||||
})
|
||||
}
|
||||
return this.items
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.refresh()
|
||||
},
|
||||
methods: {
|
||||
async refresh() {
|
||||
try {
|
||||
this.items = []
|
||||
this.loaded = false
|
||||
const pageSize = 24
|
||||
const [promise] = responsiveGetPages<LiveInfo>({
|
||||
api: page =>
|
||||
getJsonWithCredentials(
|
||||
`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${page}&pagesize=${pageSize}`,
|
||||
),
|
||||
getList: json => lodash.get(json, 'data.list', []),
|
||||
getTotal: json => lodash.get(json, 'data.results', 0),
|
||||
})
|
||||
this.items = await promise
|
||||
} finally {
|
||||
this.loaded = true
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import 'common';
|
||||
|
||||
.be-live-list {
|
||||
@include v-stretch(12px);
|
||||
padding: 12px 16px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
body.dark & {
|
||||
background-color: #444;
|
||||
color: #eee;
|
||||
}
|
||||
&-header {
|
||||
@include h-center();
|
||||
justify-content: space-between;
|
||||
}
|
||||
&-title {
|
||||
@include h-center(4px);
|
||||
font-size: 14px;
|
||||
}
|
||||
&-count {
|
||||
opacity: 0.5;
|
||||
font-size: 12px;
|
||||
}
|
||||
&-actions {
|
||||
@include h-center(4px);
|
||||
}
|
||||
&-refresh {
|
||||
cursor: pointer;
|
||||
padding: 2px;
|
||||
.be-icon {
|
||||
opacity: 0.5;
|
||||
transition: 0.35s ease-out;
|
||||
}
|
||||
&:hover .be-icon {
|
||||
transform: rotate(360deg);
|
||||
opacity: 1;
|
||||
color: var(--theme-color);
|
||||
}
|
||||
}
|
||||
&-more {
|
||||
opacity: 0.5;
|
||||
padding: 2px;
|
||||
cursor: pointer;
|
||||
@include h-center();
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
color: var(--theme-color);
|
||||
}
|
||||
}
|
||||
&-search {
|
||||
@include h-center(8px);
|
||||
.be-icon {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.be-textbox {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
&-content {
|
||||
@include no-scrollbar();
|
||||
@include v-stretch(8px);
|
||||
// 默认状态
|
||||
max-height: calc(100vh - 358px);
|
||||
// 开启过滤器
|
||||
body.enable-feeds-filter & {
|
||||
max-height: calc(100vh - 414px);
|
||||
}
|
||||
// 禁掉 profile 后
|
||||
body.feeds-filter-side-block-profile & {
|
||||
max-height: calc(100vh - 218px);
|
||||
}
|
||||
}
|
||||
&-item {
|
||||
@include h-center(8px);
|
||||
cursor: pointer;
|
||||
&-avatar {
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
border: 1px solid #8884;
|
||||
}
|
||||
&-info {
|
||||
@include v-stretch(2px);
|
||||
flex-grow: 1;
|
||||
width: 0;
|
||||
}
|
||||
&-title,
|
||||
&-user {
|
||||
@include single-line();
|
||||
}
|
||||
&-title {
|
||||
font-size: 14px;
|
||||
transition: 0.2s ease-out;
|
||||
}
|
||||
&-user {
|
||||
opacity: 0.6;
|
||||
}
|
||||
&:hover &-title {
|
||||
color: var(--theme-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,28 +1,4 @@
|
||||
@import "common";
|
||||
@import "../feeds-panel-shared";
|
||||
|
||||
.live-up-list {
|
||||
@include no-scrollbar();
|
||||
.live-detail[data-live-title] {
|
||||
color: black;
|
||||
body.dark & {
|
||||
color: #eee;
|
||||
}
|
||||
.up-name {
|
||||
font-size: 13px !important;
|
||||
opacity: 0.6;
|
||||
}
|
||||
&::before {
|
||||
content: attr(data-live-title);
|
||||
color: black;
|
||||
line-height: 1.5;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
body.dark & {
|
||||
color: #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
.live-up-list,
|
||||
.bili-dyn-home--member .bili-dyn-live-users {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
1
registry/lib/components/feeds/extend-live/index.md
Normal file
1
registry/lib/components/feeds/extend-live/index.md
Normal file
@ -0,0 +1 @@
|
||||
替换动态的 `正在直播` 面板, 能够显示超过 10 个的直播间.
|
||||
@ -1,83 +1,48 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { styledComponentEntry } from '@/components/styled-component'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { mountVueComponent } from '@/core/utils'
|
||||
import { useScopedConsole } from '@/core/utils/log'
|
||||
|
||||
interface LiveInfo {
|
||||
cover: string
|
||||
face: string
|
||||
uname: string
|
||||
title: string
|
||||
roomid: number
|
||||
pic: string
|
||||
online: number
|
||||
link: string
|
||||
}
|
||||
const entry = async () => {
|
||||
const { select } = await import('@/core/spin-query')
|
||||
const liveList = (await select('.live-up-list, .bili-dyn-live-users__body')) as HTMLElement
|
||||
if (liveList === null) {
|
||||
return
|
||||
const console = useScopedConsole('extendFeedsLive')
|
||||
const aside = (await select('.bili-dyn-home--member aside.left')) as HTMLElement
|
||||
if (!aside) {
|
||||
console.error('aside not found')
|
||||
}
|
||||
const pageSize = 24
|
||||
const { getPages, getJsonWithCredentials } = await import('@/core/ajax')
|
||||
const fullList: LiveInfo[] = await getPages({
|
||||
api: page =>
|
||||
getJsonWithCredentials(
|
||||
`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${page}&pagesize=${pageSize}`,
|
||||
),
|
||||
getList: json => lodash.get(json, 'data.list', []),
|
||||
getTotal: json => lodash.get(json, 'data.results', 0),
|
||||
})
|
||||
const upNameSelector = '.up-name, .bili-dyn-live-users__item__uname'
|
||||
const liveListNames = dqa(liveList, upNameSelector)
|
||||
const presentedNames = liveListNames.map((it: HTMLElement) => it.innerText.trim())
|
||||
// const presentedNames = []
|
||||
const presented = fullList.filter(it => presentedNames.includes(it.uname))
|
||||
const extend = fullList.filter(it => !presentedNames.includes(it.uname))
|
||||
|
||||
const liveDetailItem = liveList.children[0] as HTMLElement
|
||||
extend.forEach(it => {
|
||||
const existingNames = dqa(liveList, upNameSelector) as HTMLElement[]
|
||||
if (existingNames.some(n => n.innerText.trim() === it.uname)) {
|
||||
return
|
||||
let container: HTMLElement
|
||||
const isStickySection = (node: Node) => {
|
||||
if (node.nodeType === Node.COMMENT_NODE) {
|
||||
return false
|
||||
}
|
||||
const cloneItem = (() => {
|
||||
const clone = liveDetailItem.cloneNode(true) as HTMLElement
|
||||
const url = `https://live.bilibili.com/${it.roomid}`
|
||||
dqa(clone, 'a[href]').forEach(a => a.setAttribute('href', url))
|
||||
if (clone.matches('.bili-dyn-live-users__item, .bili-dyn-live-users__container')) {
|
||||
clone.addEventListener('click', () => {
|
||||
window.open(url, '_blank')
|
||||
})
|
||||
}
|
||||
const face = dq(
|
||||
clone,
|
||||
'.live-up-img, .bili-dyn-live-users__item__face, .bili-awesome-img',
|
||||
) as HTMLElement
|
||||
face.style.backgroundImage = `url(${it.face})`
|
||||
face.style.backgroundSize = 'cover'
|
||||
const facepic = dq(clone, '.b-img--face') as HTMLElement
|
||||
facepic.style.visibility = 'hidden'
|
||||
const title = dq(clone, '.live-name, .bili-dyn-live-users__item__title') as HTMLElement
|
||||
title.innerHTML = it.title
|
||||
title.title = it.title
|
||||
const name = dq(clone, upNameSelector) as HTMLElement
|
||||
name.innerHTML = it.uname
|
||||
name.title = it.uname
|
||||
return clone
|
||||
})()
|
||||
liveList.insertAdjacentElement('beforeend', cloneItem)
|
||||
})
|
||||
const { disableProfilePopup } = await import('@/components/feeds/disable-profile-popup')
|
||||
disableProfilePopup()
|
||||
console.log(presented, extend)
|
||||
if (
|
||||
node instanceof HTMLElement &&
|
||||
node.tagName.toLowerCase() === 'section' &&
|
||||
node.classList.contains('sticky')
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
if (!isStickySection(aside.childNodes[aside.childNodes.length - 1])) {
|
||||
const stickySection = document.createElement('section')
|
||||
stickySection.classList.add('sticky')
|
||||
aside.appendChild(stickySection)
|
||||
container = stickySection
|
||||
} else {
|
||||
container = (await select(() => dq(aside, 'section.sticky'))) as HTMLElement
|
||||
}
|
||||
if (!container) {
|
||||
console.error('container not found')
|
||||
}
|
||||
const LiveList = await import('./LiveList.vue').then(m => m.default)
|
||||
const liveList = mountVueComponent(LiveList)
|
||||
container.appendChild(liveList.$el)
|
||||
}
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'extendFeedsLive',
|
||||
displayName: '直播信息扩充',
|
||||
description: {
|
||||
'zh-CN': '在动态的`正在直播`中, 为每一个直播间加上标题, 并且能够显示超过10个的直播间.',
|
||||
},
|
||||
entry: styledComponentEntry(() => import('./extend-feeds-live.scss'), entry),
|
||||
tags: [componentsTags.feeds, componentsTags.live],
|
||||
urlInclude: [/^https:\/\/t\.bilibili\.com\/$/],
|
||||
|
||||
@ -59,12 +59,12 @@ import {
|
||||
} from '@/components/feeds/api'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { attributes } from '@/core/observer'
|
||||
import { attributes, attributesSubtree } from '@/core/observer'
|
||||
import { VIcon, TextBox, VButton } from '@/ui'
|
||||
import { FeedsFilterOptions } from '.'
|
||||
import { FeedsFilterOptions } from './options'
|
||||
import { hasBlockedPattern } from './pattern'
|
||||
|
||||
const options = getComponentSettings('feedsFilter').options as FeedsFilterOptions
|
||||
const { options } = getComponentSettings<FeedsFilterOptions>('feedsFilter')
|
||||
interface SideCardType {
|
||||
className: string
|
||||
displayName: string
|
||||
@ -157,16 +157,13 @@ export default Vue.extend({
|
||||
})
|
||||
}
|
||||
if (cardsManager.managerType === 'v2') {
|
||||
const firstTab = tabBar.children[0]
|
||||
if (!firstTab) {
|
||||
return
|
||||
}
|
||||
attributes(firstTab, () => {
|
||||
document.body.classList.toggle(
|
||||
// 'enable-feeds-filter',
|
||||
'by-type',
|
||||
!firstTab.classList.contains('active'),
|
||||
)
|
||||
const mainContainer = (await select('.bili-dyn-home--member main')) as HTMLElement
|
||||
/** 类型过滤选中"全部" */
|
||||
const isAllTypesSelected = () => Boolean(dq('.bili-dyn-list-tabs__item:first-child.active'))
|
||||
/** 关注列表选中"全部动态" */
|
||||
const isAllUpsSelected = () => Boolean(dq('.bili-dyn-up-list__item:first-child.active'))
|
||||
attributesSubtree(mainContainer, () => {
|
||||
document.body.classList.toggle('by-type', isAllUpsSelected() && !isAllTypesSelected())
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -240,8 +237,6 @@ body.disable-feeds-filter {
|
||||
background-color: white;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
// float: left;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
@ -257,13 +252,26 @@ body.disable-feeds-filter {
|
||||
transition: 0.2s ease-out;
|
||||
transition-property: border-color, color, background-color;
|
||||
}
|
||||
& > * {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
&:first-child {
|
||||
padding-top: 12px;
|
||||
}
|
||||
&:last-child {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
}
|
||||
body.dark & {
|
||||
color: #eee;
|
||||
background-color: #444;
|
||||
}
|
||||
.feeds-filter-header {
|
||||
cursor: pointer;
|
||||
margin-bottom: 14px;
|
||||
padding-bottom: 14px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: inherit;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@ -275,7 +283,7 @@ body.disable-feeds-filter {
|
||||
}
|
||||
&.collapse {
|
||||
.feeds-filter-header {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 12px;
|
||||
.be-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
@ -12,8 +12,9 @@
|
||||
<script lang="ts">
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { VIcon } from '@/ui'
|
||||
import { FeedsFilterOptions } from './options'
|
||||
|
||||
const { options } = getComponentSettings('feedsFilter')
|
||||
const { options } = getComponentSettings<FeedsFilterOptions>('feedsFilter')
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
VIcon,
|
||||
@ -50,12 +51,13 @@ export default Vue.extend({
|
||||
if (!updateSettings) {
|
||||
return
|
||||
}
|
||||
const optionKey = this.optionKey as 'types' | 'specialTypes'
|
||||
if (disabled) {
|
||||
options[this.optionKey].push(this.type.id)
|
||||
options[optionKey].push(this.type.id)
|
||||
} else {
|
||||
const index = options[this.optionKey].indexOf(this.type.id)
|
||||
const index = options[optionKey].indexOf(this.type.id)
|
||||
if (index !== -1) {
|
||||
options[this.optionKey].splice(index, 1)
|
||||
options[optionKey].splice(index, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
1
registry/lib/components/feeds/filter/index.md
Normal file
1
registry/lib/components/feeds/filter/index.md
Normal file
@ -0,0 +1 @@
|
||||
按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片. 详细设置请前往[动态首页](https://t.bilibili.com/)查看.
|
||||
@ -1,10 +1,7 @@
|
||||
import {
|
||||
defineOptionsMetadata,
|
||||
defineComponentMetadata,
|
||||
OptionsOfMetadata,
|
||||
} from '@/components/define'
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { feedsCardsManager } from '@/components/feeds/api'
|
||||
import { feedsFilterPlugin } from './plugin'
|
||||
import { options } from './options'
|
||||
|
||||
const entry = async () => {
|
||||
const { select } = await import('@/core/spin-query')
|
||||
@ -26,38 +23,9 @@ const entry = async () => {
|
||||
leftPanel.insertAdjacentElement('afterbegin', mountVueComponent(FeedsFilterCard).$el)
|
||||
}
|
||||
|
||||
const options = defineOptionsMetadata({
|
||||
types: {
|
||||
defaultValue: [] as number[],
|
||||
displayName: '过滤动态类型',
|
||||
hidden: true,
|
||||
},
|
||||
patterns: {
|
||||
defaultValue: [] as string[],
|
||||
displayName: '过滤关键词',
|
||||
hidden: true,
|
||||
},
|
||||
sideCards: {
|
||||
/** FIXME: 虽然代码里按照`number[]`, 但其实存进去的是`string[]`? */
|
||||
defaultValue: [] as number[],
|
||||
displayName: '过滤侧边栏',
|
||||
hidden: true,
|
||||
},
|
||||
specialTypes: {
|
||||
defaultValue: [] as number[],
|
||||
displayName: '过滤特殊动态类型',
|
||||
hidden: true,
|
||||
},
|
||||
})
|
||||
|
||||
export type FeedsFilterOptions = OptionsOfMetadata<typeof options>
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'feedsFilter',
|
||||
displayName: '动态过滤器',
|
||||
description: {
|
||||
'zh-CN': '按照类型或者关键词过滤动态首页的内容, 也可以移除动态页的一些侧边卡片.',
|
||||
},
|
||||
entry,
|
||||
tags: [componentsTags.feeds],
|
||||
options,
|
||||
|
||||
27
registry/lib/components/feeds/filter/options.ts
Normal file
27
registry/lib/components/feeds/filter/options.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { OptionsOfMetadata, defineOptionsMetadata } from '@/components/define'
|
||||
|
||||
export const options = defineOptionsMetadata({
|
||||
types: {
|
||||
defaultValue: [] as number[],
|
||||
displayName: '过滤动态类型',
|
||||
hidden: true,
|
||||
},
|
||||
patterns: {
|
||||
defaultValue: [] as string[],
|
||||
displayName: '过滤关键词',
|
||||
hidden: true,
|
||||
},
|
||||
sideCards: {
|
||||
/** FIXME: 虽然代码里按照`number[]`, 但其实存进去的是`string[]`? */
|
||||
defaultValue: [] as number[],
|
||||
displayName: '过滤侧边栏',
|
||||
hidden: true,
|
||||
},
|
||||
specialTypes: {
|
||||
defaultValue: [] as number[],
|
||||
displayName: '过滤特殊动态类型',
|
||||
hidden: true,
|
||||
},
|
||||
})
|
||||
|
||||
export type FeedsFilterOptions = OptionsOfMetadata<typeof options>
|
||||
@ -67,6 +67,7 @@
|
||||
}
|
||||
aside {
|
||||
position: fixed !important;
|
||||
margin: 0 !important;
|
||||
&.left {
|
||||
right: var(--fixed-offset);
|
||||
}
|
||||
@ -74,6 +75,10 @@
|
||||
left: var(--fixed-offset);
|
||||
}
|
||||
}
|
||||
main {
|
||||
width: var(--center-width);
|
||||
margin: 0 var(--gap);
|
||||
}
|
||||
@media screen and (min-width: 1921px) {
|
||||
--center-width: 32.92vw;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
.bb-comment {
|
||||
.bb-comment,
|
||||
.bili-comment-container {
|
||||
.fold-comment {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
height: 40px;
|
||||
@ -28,3 +28,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.bili-comment-container {
|
||||
&.bili-dyn-comment .reply-list {
|
||||
padding-bottom: 8px !important;
|
||||
}
|
||||
.fold-comment {
|
||||
font-size: 13px;
|
||||
}
|
||||
.at-panel,
|
||||
.emoji-panel {
|
||||
z-index: 111;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import { childListSubtree } from '@/core/observer'
|
||||
const entry = async () => {
|
||||
const { forEachFeedsCard } = await import('@/components/feeds/api')
|
||||
const { childList } = await import('@/core/observer')
|
||||
const commentSelector = '.bb-comment'
|
||||
const commentSelector = '.bb-comment, .bili-comment-container'
|
||||
const injectButton = (card: HTMLElement) => {
|
||||
const injectToComment = async (panelArea: HTMLElement, clickHandler: () => void) => {
|
||||
const commentBox = await select(() => dq(panelArea, commentSelector))
|
||||
@ -24,7 +24,8 @@ const entry = async () => {
|
||||
button.innerHTML = '收起评论'
|
||||
button.addEventListener('click', () => {
|
||||
clickHandler()
|
||||
card.scrollIntoView({ behavior: 'smooth' })
|
||||
card.scrollIntoView()
|
||||
window.scrollBy({ top: -75 })
|
||||
})
|
||||
commentBox.insertAdjacentElement('beforeend', button)
|
||||
}
|
||||
|
||||
@ -0,0 +1 @@
|
||||
在动态里查看图片详情时 (非全屏), 切换图片自动回到图片顶部; 退出查看图片模式时, 自动将动态移入视图内.
|
||||
@ -0,0 +1,69 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { forEachFeedsCard } from '@/components/feeds/api'
|
||||
import { attributesSubtree, mutationObserve } from '@/core/observer'
|
||||
import { useScopedConsole } from '@/core/utils/log'
|
||||
import { feedsUrlsWithoutDetail } from '@/core/utils/urls'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'imageAutoBackToTop',
|
||||
displayName: '动态看图自动回顶',
|
||||
tags: [componentsTags.feeds],
|
||||
urlInclude: feedsUrlsWithoutDetail,
|
||||
entry: () => {
|
||||
const console = useScopedConsole('imageAutoBackToTop')
|
||||
forEachFeedsCard({
|
||||
added: card => {
|
||||
const scrollIntoView = (element: Element) => {
|
||||
element?.scrollIntoView()
|
||||
window.scrollBy({ top: -75 })
|
||||
}
|
||||
const albums = dqa(card.element, '.bili-album')
|
||||
mutationObserve(albums, { childList: true, attributes: true, subtree: true }, records => {
|
||||
records.forEach(record => {
|
||||
const isAlbumVisible = () => {
|
||||
if (
|
||||
record.target instanceof HTMLElement &&
|
||||
record.target.classList.contains('bili-album__watch') &&
|
||||
record.attributeName === 'style'
|
||||
) {
|
||||
return record.target.style.display !== 'none'
|
||||
}
|
||||
return null
|
||||
}
|
||||
const hasAlbumPreviewNode = (nodeList: NodeList) =>
|
||||
[...nodeList].some(node => {
|
||||
return node instanceof HTMLElement && node.classList.contains('bili-album__watch')
|
||||
})
|
||||
const isImagePreviewExited =
|
||||
hasAlbumPreviewNode(record.removedNodes) || isAlbumVisible() === false
|
||||
if (isImagePreviewExited) {
|
||||
scrollIntoView(card.element)
|
||||
console.log('imagePreviewExited')
|
||||
}
|
||||
const isImagePreviewEntered =
|
||||
hasAlbumPreviewNode(record.addedNodes) || isAlbumVisible() === true
|
||||
if (isImagePreviewEntered) {
|
||||
const controlBar = dq(card.element, '.bili-album__watch__control')
|
||||
scrollIntoView(controlBar)
|
||||
console.log('imagePreviewEntered')
|
||||
}
|
||||
})
|
||||
})
|
||||
attributesSubtree(card.element, records => {
|
||||
records.forEach(record => {
|
||||
if (
|
||||
!(record.target instanceof HTMLImageElement) ||
|
||||
!record.target.matches('.bili-album__watch__content img') ||
|
||||
record.attributeName !== 'src'
|
||||
) {
|
||||
return
|
||||
}
|
||||
const controlBar = dq(card.element, '.bili-album__watch__control')
|
||||
scrollIntoView(controlBar)
|
||||
console.log('imagePreviewSwitched')
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
@ -90,8 +90,8 @@ export default Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
updateColumnsCount() {
|
||||
const maxColumnCount = 6
|
||||
const columnLength = 12
|
||||
const maxColumnCount = 15
|
||||
const columnLength = 18
|
||||
const element = this.$el as HTMLElement
|
||||
const medalColumns = Math.min(Math.ceil(this.medalList.length / columnLength), maxColumnCount)
|
||||
element.style.setProperty('--medal-columns', medalColumns.toString())
|
||||
|
||||
@ -18,7 +18,8 @@
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.popup::before, .popup::after {
|
||||
.popup::before,
|
||||
.popup::after {
|
||||
left: auto;
|
||||
right: calc(1em + 33px);
|
||||
transform: translateX(50%);
|
||||
@ -34,18 +35,22 @@
|
||||
fill: inherit;
|
||||
background: inherit !important;
|
||||
|
||||
&-btn {
|
||||
padding-top: 0 !important;
|
||||
color: rgba(255, 255, 255, 0.9) !important;
|
||||
&:hover {
|
||||
background-color: transparent !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-text {
|
||||
height: auto !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
|
||||
.bag-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: inherit;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,9 +7,7 @@
|
||||
:value="folder"
|
||||
@change="change($event)"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
{{ item.name }}
|
||||
</template>
|
||||
<template #item="{ item }"> {{ item.name }} ({{ item.count }}) </template>
|
||||
</VDropdown>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
||||
@ -32,7 +32,7 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
|
||||
height: var(--navbar-height) !important;
|
||||
}
|
||||
#message-navbar,
|
||||
#biliMainHeader,
|
||||
#biliMainHeader:not(.z-top-container),
|
||||
.z-top-container:not(#biliMainHeader) {
|
||||
max-height: var(--navbar-height) !important;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<SubscriptionsList type="bangumi"></SubscriptionsList>
|
||||
<SubscriptionsList type="bangumi" :filter="filter"></SubscriptionsList>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import SubscriptionsList from './SubscriptionsList.vue'
|
||||
@ -8,5 +8,11 @@ export default Vue.extend({
|
||||
components: {
|
||||
SubscriptionsList,
|
||||
},
|
||||
props: {
|
||||
filter: {
|
||||
type: [Object, null],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<SubscriptionsList type="cinema"></SubscriptionsList>
|
||||
<SubscriptionsList type="cinema" :filter="filter"></SubscriptionsList>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import SubscriptionsList from './SubscriptionsList.vue'
|
||||
@ -8,5 +8,11 @@ export default Vue.extend({
|
||||
components: {
|
||||
SubscriptionsList,
|
||||
},
|
||||
props: {
|
||||
filter: {
|
||||
type: [Object, null],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -1,43 +1,107 @@
|
||||
<template>
|
||||
<div class="navbar-subscriptions">
|
||||
<TabControl ref="tabControl" :tabs="tabs" :more-link="moreLink"></TabControl>
|
||||
<TabControl ref="tabControl" :tabs="tabs" :more-link="moreLink">
|
||||
<template #header-item>
|
||||
<div class="navbar-subscriptions-filter">
|
||||
<VDropdown v-model="selectedFilter" round :items="filterItems" />
|
||||
</div>
|
||||
</template>
|
||||
</TabControl>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { TabControl } from '@/ui'
|
||||
import { TabMappings, TabMapping } from '@/ui/tab-mapping'
|
||||
import { TabControl, VDropdown } from '@/ui'
|
||||
import { TabMapping, TabMappings } from '@/ui/tab-mapping'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { popperMixin } from '../mixins'
|
||||
import { SubscriptionTypes } from './subscriptions'
|
||||
import { SubscriptionStatus, SubscriptionStatusFilter } from './types'
|
||||
|
||||
const filterItems: {
|
||||
name: string
|
||||
value: SubscriptionStatusFilter
|
||||
displayName: string
|
||||
}[] = [
|
||||
{
|
||||
name: 'all',
|
||||
value: {
|
||||
viewAll: true,
|
||||
status: SubscriptionStatus.Viewing,
|
||||
},
|
||||
displayName: '全部',
|
||||
},
|
||||
{
|
||||
name: 'viewing',
|
||||
value: {
|
||||
viewAll: false,
|
||||
status: SubscriptionStatus.Viewing,
|
||||
},
|
||||
displayName: '在看',
|
||||
},
|
||||
{
|
||||
name: 'toView',
|
||||
value: {
|
||||
viewAll: false,
|
||||
status: SubscriptionStatus.ToView,
|
||||
},
|
||||
displayName: '想看',
|
||||
},
|
||||
{
|
||||
name: 'viewed',
|
||||
value: {
|
||||
viewAll: false,
|
||||
status: SubscriptionStatus.Viewed,
|
||||
},
|
||||
displayName: '看过',
|
||||
},
|
||||
]
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
TabControl,
|
||||
VDropdown,
|
||||
},
|
||||
mixins: [popperMixin],
|
||||
data() {
|
||||
const uid = getUID()
|
||||
return {
|
||||
uid,
|
||||
filterItems,
|
||||
selectedFilter: filterItems[0],
|
||||
moreLink: (tab: TabMapping) => `https://space.bilibili.com/${uid}/${tab.name}`,
|
||||
tabs: [
|
||||
filter: {
|
||||
viewAll: true,
|
||||
status: SubscriptionStatus.Viewing,
|
||||
} as SubscriptionStatusFilter,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tabs(): TabMappings {
|
||||
return [
|
||||
{
|
||||
name: SubscriptionTypes.Bangumi,
|
||||
displayName: '追番',
|
||||
activeLink: `https://space.bilibili.com/${uid}/bangumi`,
|
||||
activeLink: `https://space.bilibili.com/${this.uid}/bangumi`,
|
||||
component: () => import('./BangumiSubscriptions.vue').then(m => m.default),
|
||||
propsData: {
|
||||
filter: this.selectedFilter.value,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: SubscriptionTypes.Cinema,
|
||||
displayName: '追剧',
|
||||
activeLink: `https://space.bilibili.com/${uid}/cinema`,
|
||||
activeLink: `https://space.bilibili.com/${this.uid}/cinema`,
|
||||
component: () => import('./CinemaSubscriptions.vue').then(m => m.default),
|
||||
propsData: {
|
||||
filter: this.selectedFilter.value,
|
||||
},
|
||||
},
|
||||
] as TabMappings,
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import 'common';
|
||||
@import '../popup';
|
||||
|
||||
.navbar-subscriptions {
|
||||
@ -54,5 +118,10 @@ export default Vue.extend({
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
&-filter {
|
||||
@include h-stretch();
|
||||
justify-content: flex-end;
|
||||
height: 26px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -46,12 +46,8 @@ import { logError } from '@/core/utils/log'
|
||||
import { DpiImage, VLoading, VEmpty, VIcon, ScrollTrigger } from '@/ui'
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
import { SubscriptionTypes } from './subscriptions'
|
||||
import { SubscriptionItem, SubscriptionStatus, SubscriptionStatusFilter } from './types'
|
||||
|
||||
enum SubscriptionStatus {
|
||||
ToView = 1,
|
||||
Viewing,
|
||||
Viewed,
|
||||
}
|
||||
const getStatusText = (status: SubscriptionStatus) => {
|
||||
switch (status) {
|
||||
case SubscriptionStatus.ToView:
|
||||
@ -63,10 +59,7 @@ const getStatusText = (status: SubscriptionStatus) => {
|
||||
return '看过'
|
||||
}
|
||||
}
|
||||
const subscriptionSorter = (
|
||||
a: { status: SubscriptionStatus },
|
||||
b: { status: SubscriptionStatus },
|
||||
) => {
|
||||
const subscriptionSorter = (a: SubscriptionItem, b: SubscriptionItem) => {
|
||||
let statusA = a.status
|
||||
if (statusA !== SubscriptionStatus.Viewed) {
|
||||
statusA = SubscriptionStatus.Viewed - statusA
|
||||
@ -86,6 +79,10 @@ export default Vue.extend({
|
||||
ScrollTrigger,
|
||||
},
|
||||
props: {
|
||||
filter: {
|
||||
type: [Object, null],
|
||||
default: null,
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: SubscriptionTypes.Bangumi,
|
||||
@ -99,12 +96,21 @@ export default Vue.extend({
|
||||
page: 1,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filter() {
|
||||
this.cards = []
|
||||
this.loading = true
|
||||
this.page = 1
|
||||
this.nextPage()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.nextPage()
|
||||
},
|
||||
methods: {
|
||||
async nextPage() {
|
||||
try {
|
||||
const filter = this.filter as SubscriptionStatusFilter
|
||||
const json = await getJsonWithCredentials(
|
||||
`https://api.bilibili.com/x/space/bangumi/follow/list?type=${
|
||||
this.type !== SubscriptionTypes.Bangumi ? '2' : '1'
|
||||
@ -114,10 +120,10 @@ export default Vue.extend({
|
||||
logError(`加载订阅信息失败: ${json.message}`)
|
||||
return
|
||||
}
|
||||
const cards = lodash
|
||||
const newCards: SubscriptionItem[] = lodash
|
||||
.uniqBy(
|
||||
(this.cards as any[]).concat(
|
||||
(lodash.get(json, 'data.list') as any[]).map(item => ({
|
||||
(lodash.get(json, 'data.list') as any[]).map(
|
||||
(item): SubscriptionItem => ({
|
||||
title: item.title,
|
||||
coverUrl: item.square_cover.replace('http:', 'https:'),
|
||||
latest: item.new_ep.index_show,
|
||||
@ -127,14 +133,20 @@ export default Vue.extend({
|
||||
statusText: getStatusText(item.follow_status),
|
||||
playUrl: `https://www.bilibili.com/bangumi/play/ss${item.season_id}`,
|
||||
mediaUrl: `https://www.bilibili.com/bangumi/media/md${item.media_id}`,
|
||||
})),
|
||||
}),
|
||||
),
|
||||
card => card.id,
|
||||
)
|
||||
.filter(card => {
|
||||
if (filter.viewAll) {
|
||||
return true
|
||||
}
|
||||
return card.status === filter.status
|
||||
})
|
||||
.sort(subscriptionSorter)
|
||||
this.page++
|
||||
this.cards = cards
|
||||
this.hasMorePage = lodash.get(json, 'data.total', 0) > this.cards.length
|
||||
this.cards = this.cards.concat(newCards)
|
||||
this.hasMorePage = newCards.length > 0
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
export enum SubscriptionStatus {
|
||||
ToView = 1,
|
||||
Viewing,
|
||||
Viewed,
|
||||
}
|
||||
export interface SubscriptionStatusFilter {
|
||||
viewAll: boolean
|
||||
status: SubscriptionStatus
|
||||
}
|
||||
export interface SubscriptionItem {
|
||||
title: string
|
||||
coverUrl: string
|
||||
latest: number
|
||||
progress: string
|
||||
id: string
|
||||
status: SubscriptionStatus
|
||||
statusText: string
|
||||
playUrl: string
|
||||
mediaUrl: string
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="watchlater-list">
|
||||
<div class="header">
|
||||
<div class="watchlater-list-summary">共 {{ filteredCards.length }} 个</div>
|
||||
<div class="search">
|
||||
<TextBox v-model="search" linear placeholder="搜索"></TextBox>
|
||||
</div>
|
||||
@ -203,13 +204,17 @@ export default Vue.extend({
|
||||
cursor: pointer;
|
||||
}
|
||||
.header {
|
||||
@include h-stretch();
|
||||
@include h-center();
|
||||
justify-content: space-between;
|
||||
align-self: stretch;
|
||||
margin: 16px 12px;
|
||||
.watchlater-list-summary {
|
||||
margin-right: 6px;
|
||||
}
|
||||
.search {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
align-self: stretch;
|
||||
margin-right: 8px;
|
||||
.be-textbox {
|
||||
height: 100%;
|
||||
|
||||
@ -48,15 +48,18 @@
|
||||
@include color('e');
|
||||
}
|
||||
&__stat__item {
|
||||
&__count {
|
||||
&__count,
|
||||
.item-num {
|
||||
@include color('e');
|
||||
}
|
||||
&:hover {
|
||||
.bili-dyn-my-info__stat__item__count {
|
||||
.bili-dyn-my-info__stat__item__count,
|
||||
.item-num {
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
&__label {
|
||||
&__label,
|
||||
.item-desc {
|
||||
@include color('a');
|
||||
}
|
||||
}
|
||||
@ -117,6 +120,14 @@
|
||||
@include to-white();
|
||||
}
|
||||
}
|
||||
&__shadow-left,
|
||||
&__shadow-left .shadow {
|
||||
background-image: linear-gradient(270deg, hsla(0, 0%, 100%, 0), #444) !important;
|
||||
}
|
||||
&__shadow-right,
|
||||
&__shadow-right .shadow {
|
||||
background-image: linear-gradient(90deg, hsla(0, 0%, 100%, 0), #444) !important;
|
||||
}
|
||||
&__item {
|
||||
&__face {
|
||||
@include border-color();
|
||||
@ -128,6 +139,10 @@
|
||||
@include to-theme('blue');
|
||||
}
|
||||
}
|
||||
span {
|
||||
@include theme-background-color();
|
||||
@include border-color('4');
|
||||
}
|
||||
}
|
||||
&__name {
|
||||
@include color('e');
|
||||
@ -182,6 +197,9 @@
|
||||
}
|
||||
}
|
||||
.bili-dyn-more {
|
||||
&__container:hover {
|
||||
@include background-color('3');
|
||||
}
|
||||
&__btn {
|
||||
&:hover {
|
||||
@include to-theme('blue');
|
||||
@ -236,9 +254,9 @@
|
||||
.bili-dyn-card-common,
|
||||
.bili-dyn-card-live,
|
||||
.bili-dyn-card-video {
|
||||
@include border-color();
|
||||
@include border-color('4');
|
||||
&__body {
|
||||
@include background-color('3');
|
||||
@include background-color('38');
|
||||
}
|
||||
&__title {
|
||||
@include color('e');
|
||||
@ -310,7 +328,7 @@
|
||||
.bili-dyn-content {
|
||||
&__orig {
|
||||
&.reference {
|
||||
@include background-color('2');
|
||||
@include background-color('30');
|
||||
}
|
||||
}
|
||||
.dyn-none {
|
||||
@ -333,65 +351,8 @@
|
||||
&__following {
|
||||
@include theme-border-color();
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
.bili-dyn-forward {
|
||||
&__item {
|
||||
@include border-color('6');
|
||||
}
|
||||
&-item {
|
||||
&__uname:not([style*='color:']) {
|
||||
@include color('e');
|
||||
}
|
||||
&__time {
|
||||
@include color('a');
|
||||
}
|
||||
&__action {
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
&__more {
|
||||
@include color('a');
|
||||
@include border-color();
|
||||
}
|
||||
&-publishing {
|
||||
&__action {
|
||||
&__count {
|
||||
@include color('a');
|
||||
}
|
||||
&__btn {
|
||||
@include theme-background-color();
|
||||
@include foreground-color();
|
||||
}
|
||||
}
|
||||
&__emoji {
|
||||
@include border-color();
|
||||
@include no-shadow();
|
||||
@include color('a');
|
||||
@include background-color('2');
|
||||
i {
|
||||
@include to-gray();
|
||||
}
|
||||
&:hover {
|
||||
@include color('e');
|
||||
i {
|
||||
@include to-white();
|
||||
}
|
||||
}
|
||||
}
|
||||
&__editor {
|
||||
@include border-color();
|
||||
@include background-color('2');
|
||||
&:focus-within {
|
||||
@include theme-border-color();
|
||||
}
|
||||
.bili-rich-textarea__inner {
|
||||
@include color('e');
|
||||
@include background-color();
|
||||
&::before {
|
||||
@include color('a');
|
||||
}
|
||||
}
|
||||
&::before {
|
||||
@include to-theme('blue');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -513,6 +474,66 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.bili-dyn-forward {
|
||||
&__item {
|
||||
@include border-color('6');
|
||||
}
|
||||
&-item {
|
||||
&__uname:not([style*='color:']) {
|
||||
@include color('e');
|
||||
}
|
||||
&__time {
|
||||
@include color('a');
|
||||
}
|
||||
&__action {
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
&__more {
|
||||
@include color('a');
|
||||
@include border-color();
|
||||
}
|
||||
&-publishing {
|
||||
&__action {
|
||||
&__count {
|
||||
@include color('a');
|
||||
}
|
||||
&__btn {
|
||||
@include theme-background-color();
|
||||
@include foreground-color();
|
||||
}
|
||||
}
|
||||
&__emoji {
|
||||
@include border-color();
|
||||
@include no-shadow();
|
||||
@include color('a');
|
||||
@include background-color('2');
|
||||
i {
|
||||
@include to-gray();
|
||||
}
|
||||
&:hover {
|
||||
@include color('e');
|
||||
i {
|
||||
@include to-white();
|
||||
}
|
||||
}
|
||||
}
|
||||
&__editor {
|
||||
@include border-color();
|
||||
@include background-color('2');
|
||||
&:focus-within {
|
||||
@include theme-border-color();
|
||||
}
|
||||
.bili-rich-textarea__inner {
|
||||
@include color('e');
|
||||
@include background-color();
|
||||
&::before {
|
||||
@include color('a');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bili-dyn-report {
|
||||
@include background-color('3');
|
||||
&__title {
|
||||
@ -587,6 +608,11 @@
|
||||
&__exposed {
|
||||
@include color('a');
|
||||
}
|
||||
&-container__item {
|
||||
&:hover {
|
||||
@include background-color('5');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bili-dyn-list-loading {
|
||||
@ -687,6 +713,7 @@
|
||||
}
|
||||
&__footer {
|
||||
@include background-color();
|
||||
@include border-color('4');
|
||||
}
|
||||
&__pkg {
|
||||
&:hover,
|
||||
@ -913,4 +940,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
&__preview__picture {
|
||||
@include background-color();
|
||||
}
|
||||
}
|
||||
|
||||
@ -453,3 +453,121 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
#app .bgc {
|
||||
@include background-color();
|
||||
}
|
||||
.bili-comment-container {
|
||||
.view-all-reply {
|
||||
@include color('e');
|
||||
&:hover {
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
.forward-to-dynamic {
|
||||
@include color('a');
|
||||
}
|
||||
}
|
||||
.bili-dyn-sidebar {
|
||||
&__btn {
|
||||
@include background-color('3');
|
||||
@include color('a');
|
||||
&:hover {
|
||||
@include background-color('4');
|
||||
}
|
||||
span::before {
|
||||
@include to-gray();
|
||||
}
|
||||
}
|
||||
}
|
||||
.opus-detail {
|
||||
@include background-color('4');
|
||||
@include no-shadow();
|
||||
.bili-opus-view {
|
||||
@include background-color('4');
|
||||
}
|
||||
.opus-module-author {
|
||||
&__pub__text {
|
||||
@include color('a');
|
||||
}
|
||||
}
|
||||
.opus-module-content {
|
||||
.opus-text-rich-hl {
|
||||
@include theme-color();
|
||||
}
|
||||
}
|
||||
.opus-tabs {
|
||||
.bili-tabs {
|
||||
&__header {
|
||||
@include background-color();
|
||||
@include border-color();
|
||||
}
|
||||
}
|
||||
.bili-tabs__content {
|
||||
.comment-wrap {
|
||||
@include background-color();
|
||||
}
|
||||
}
|
||||
}
|
||||
.side-toolbar {
|
||||
&__box,
|
||||
&__btn {
|
||||
@include background-color('3');
|
||||
&.backtop span::before {
|
||||
@include to-white();
|
||||
}
|
||||
}
|
||||
&__action {
|
||||
&,
|
||||
& svg {
|
||||
@include color('e');
|
||||
}
|
||||
&:hover,
|
||||
&.is-active {
|
||||
&,
|
||||
& svg {
|
||||
@include theme-color();
|
||||
path {
|
||||
@include theme-fill();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bili-dyn-share {
|
||||
&-publishing {
|
||||
@include background-color('3');
|
||||
@include border-color('4');
|
||||
@include no-shadow();
|
||||
&__title {
|
||||
@include color('e');
|
||||
}
|
||||
&__input {
|
||||
.bili-rich-textarea__inner {
|
||||
@include background-color();
|
||||
&.empty::before {
|
||||
@include color('a');
|
||||
}
|
||||
}
|
||||
}
|
||||
&__reference {
|
||||
@include background-color('2');
|
||||
&__author__name {
|
||||
@include color('e');
|
||||
}
|
||||
}
|
||||
&__hint {
|
||||
@include color('a');
|
||||
}
|
||||
&__tools__item {
|
||||
&,
|
||||
&:hover {
|
||||
@include background-color();
|
||||
}
|
||||
}
|
||||
&__action {
|
||||
@include theme-background-color();
|
||||
@include foreground-color();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
.search-panel {
|
||||
> .trending {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
隐藏搜索栏和搜索页面中的 `bilibili 热搜`. 请注意这只是视觉上的隐藏, 如果不输入任何关键词就点 Enter 或搜索按钮, 仍然会跳转至推荐的热搜词.
|
||||
27
registry/lib/components/style/hide/trending-search/index.ts
Normal file
27
registry/lib/components/style/hide/trending-search/index.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { allMutations } from '@/core/observer'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'hideTrendingSearch',
|
||||
displayName: '隐藏热搜',
|
||||
tags: [componentsTags.style],
|
||||
instantStyles: [
|
||||
{
|
||||
name: 'hideTrendingSearch',
|
||||
style: () => import('./hide-trending-search.scss'),
|
||||
},
|
||||
],
|
||||
entry: async () => {
|
||||
allMutations(records => {
|
||||
records.forEach(record => {
|
||||
if (
|
||||
record.target instanceof HTMLInputElement &&
|
||||
record.target.classList.contains('nav-search-input') &&
|
||||
record.target.placeholder !== '搜索'
|
||||
) {
|
||||
record.target.placeholder = '搜索'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
17
registry/lib/components/style/hide/user-card/index.ts
Normal file
17
registry/lib/components/style/hide/user-card/index.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { toggleStyle } from '@/components/styled-component'
|
||||
|
||||
const name = 'hideUserCard'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
displayName: '隐藏用户信息卡片',
|
||||
description: {
|
||||
'zh-CN': '隐藏鼠标指向用户名或用户头像时弹出的浮动用户信息卡片',
|
||||
},
|
||||
author: {
|
||||
name: 'WakelessSloth56',
|
||||
link: 'https://github.com/WakelessSloth56',
|
||||
},
|
||||
tags: [componentsTags.style],
|
||||
...toggleStyle(name, () => import('./user-card.scss')),
|
||||
})
|
||||
@ -0,0 +1,5 @@
|
||||
.user-card,
|
||||
.user-card-m-exp,
|
||||
.bili-user-profile {
|
||||
display: none !important;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
.video-toolbar-v1 {
|
||||
.share-wrap {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.video-toolbar-container {
|
||||
.video-share-wrap {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.player-left-components {
|
||||
[class*="toolbar_share_info"] {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
1
registry/lib/components/style/hide/video/share/index.md
Normal file
1
registry/lib/components/style/hide/video/share/index.md
Normal file
@ -0,0 +1 @@
|
||||
隐藏视频和番剧播放器下方的分享按钮.
|
||||
14
registry/lib/components/style/hide/video/share/index.ts
Normal file
14
registry/lib/components/style/hide/video/share/index.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'hideVideoShare',
|
||||
displayName: '隐藏视频分享',
|
||||
tags: [componentsTags.style, componentsTags.video],
|
||||
instantStyles: [
|
||||
{
|
||||
name: 'hideVideoShare',
|
||||
style: () => import('./hide-video-share.scss'),
|
||||
},
|
||||
],
|
||||
entry: none,
|
||||
})
|
||||
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div class="fresh-home-extra-options">
|
||||
<div class="fresh-home-extra-options-title">布局配置</div>
|
||||
<VLoading v-if="!loaded" />
|
||||
<div v-show="loaded" ref="sortList" class="fresh-home-extra-options-sort-list">
|
||||
<div
|
||||
v-for="item of sortItems"
|
||||
:key="item.layoutItem.name"
|
||||
class="fresh-home-extra-options-sort-item-container"
|
||||
>
|
||||
<div
|
||||
:data-name="item.layoutItem.name"
|
||||
:style="{ 'flex-grow': item.layoutItem.grow ? '1' : '0' }"
|
||||
class="fresh-home-extra-options-sort-item"
|
||||
>
|
||||
<div class="fresh-home-extra-options-sort-item-name">
|
||||
<VIcon v-if="item.layoutItem.grow" icon="mdi-arrow-expand-horizontal" :size="16" />
|
||||
<VIcon v-else icon="mdi-arrow-collapse-horizontal" :size="16" />
|
||||
{{ item.layoutItem.displayName }}
|
||||
</div>
|
||||
<div class="fresh-home-extra-options-sort-item-config">
|
||||
<VButton
|
||||
icon
|
||||
round
|
||||
@click="item.layoutSettings.linebreak = !item.layoutSettings.linebreak"
|
||||
>
|
||||
<VIcon v-if="item.layoutSettings.linebreak" icon="mdi-wrap" :size="16" />
|
||||
<VIcon v-else icon="mdi-wrap-disabled" :size="16" />
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="item.layoutSettings.linebreak"
|
||||
class="fresh-home-extra-options-sort-item-linebreak"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import type { SortableEvent } from 'sortablejs'
|
||||
import { SortableJSLibrary } from '@/core/runtime-library'
|
||||
import { ascendingSort } from '@/core/utils/sort'
|
||||
import { VLoading, VIcon, VButton } from '@/ui'
|
||||
import { FreshLayoutItem, FreshLayoutItemSettings } from './layouts/fresh-layout-item'
|
||||
import { layouts } from './layouts/layouts'
|
||||
import { freshHomeOptions } from './options'
|
||||
|
||||
interface SortItem {
|
||||
layoutItem: FreshLayoutItem
|
||||
layoutSettings: FreshLayoutItemSettings
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
components: { VLoading, VIcon, VButton },
|
||||
data() {
|
||||
return {
|
||||
loaded: false,
|
||||
layouts,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
sortItems() {
|
||||
return (this.layouts as FreshLayoutItem[])
|
||||
.map((layoutItem, index): SortItem => {
|
||||
const layoutSettings: FreshLayoutItemSettings = {
|
||||
linebreak: false,
|
||||
order: index + 1,
|
||||
...freshHomeOptions.layoutOptions[layoutItem.name],
|
||||
}
|
||||
return {
|
||||
layoutItem,
|
||||
layoutSettings,
|
||||
}
|
||||
})
|
||||
.filter(it => it !== null)
|
||||
.sort(ascendingSort(it => it.layoutSettings.order))
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
const list: HTMLElement = this.$refs.sortList
|
||||
const Sortable = await SortableJSLibrary
|
||||
console.log({ list })
|
||||
Sortable.create(list, {
|
||||
delay: 100,
|
||||
forceFallback: true,
|
||||
onEnd: (e: SortableEvent) => {
|
||||
console.log(e)
|
||||
},
|
||||
})
|
||||
this.loaded = true
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import 'common';
|
||||
|
||||
.fresh-home-extra-options {
|
||||
@include v-stretch(10px);
|
||||
padding: 4px 0;
|
||||
&-sort-list {
|
||||
@include h-stretch();
|
||||
column-gap: 8px;
|
||||
row-gap: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
&-sort-item-container {
|
||||
display: contents;
|
||||
}
|
||||
&-sort-item {
|
||||
@include v-center(6px);
|
||||
@include border-card();
|
||||
padding: 8px;
|
||||
transition: border-color 0.2s ease-out;
|
||||
body.dark &:hover,
|
||||
&:hover {
|
||||
border-color: var(--theme-color);
|
||||
cursor: move;
|
||||
}
|
||||
&-name {
|
||||
@include h-center(4px);
|
||||
}
|
||||
&-linebreak {
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -12,7 +12,7 @@
|
||||
</fragment>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { freshHomeOptions } from './types'
|
||||
import { freshHomeOptions } from './options'
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
|
||||
@ -96,7 +96,7 @@ export default Vue.extend({
|
||||
display: flex;
|
||||
flex: 1 0 0;
|
||||
width: 0;
|
||||
@include scroll-mask-x(36px);
|
||||
@include scroll-mask-x(36px, var(--home-base-color));
|
||||
|
||||
&-content {
|
||||
@include h-center();
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { contentLoaded } from '@/core/life-cycle'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { getNumberValidator, mountVueComponent } from '@/core/utils'
|
||||
import { mountVueComponent } from '@/core/utils'
|
||||
import { homeUrls } from '../urls'
|
||||
import { freshHomeOptionsMetadata } from './types'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'freshHome',
|
||||
@ -23,33 +24,8 @@ export const component = defineComponentMetadata({
|
||||
document.body.appendChild(freshHome.$el)
|
||||
})
|
||||
},
|
||||
options: {
|
||||
layoutOptions: {
|
||||
displayName: '版块设置',
|
||||
defaultValue: {
|
||||
trending: {
|
||||
linebreak: true,
|
||||
},
|
||||
areas: {
|
||||
linebreak: true,
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
personalized: {
|
||||
displayName: '个性化推荐',
|
||||
defaultValue: false,
|
||||
},
|
||||
horizontalWheelScroll: {
|
||||
displayName: '启用横向滚动',
|
||||
defaultValue: false,
|
||||
},
|
||||
maxWidth: {
|
||||
displayName: '最大宽度 (px)',
|
||||
defaultValue: 1440,
|
||||
validator: getNumberValidator(1000, 3000),
|
||||
},
|
||||
},
|
||||
options: freshHomeOptionsMetadata,
|
||||
// extraOptions: () => import('./ExtraOptions.vue'),
|
||||
unload: () => document.body.classList.add('home-redesign-off'),
|
||||
reload: () => document.body.classList.remove('home-redesign-off'),
|
||||
instantStyles: [
|
||||
|
||||
@ -39,7 +39,7 @@ import { ArrayContent } from '@/core/common-types'
|
||||
import { Reorder } from '@/core/reorder'
|
||||
import { ascendingSort } from '@/core/utils/sort'
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
import { freshHomeOptions } from '../../types'
|
||||
import { freshHomeOptions } from '../../options'
|
||||
import { supportedCategories } from './filter'
|
||||
import { getContent } from './content/content'
|
||||
|
||||
|
||||
@ -7,23 +7,31 @@
|
||||
<BangumiTimeline :api="timelineApi" />
|
||||
</div>
|
||||
<div class="fresh-home-categories-bangumi-rank-list">
|
||||
<a
|
||||
class="fresh-home-categories-bangumi-rank-list-header"
|
||||
:href="rankingsLink"
|
||||
target="_blank"
|
||||
>
|
||||
<SubHeader> 排行榜 </SubHeader>
|
||||
</a>
|
||||
<RankList bangumi-mode :parse-json="parseJson" :api="rankingsApi" />
|
||||
<div class="fresh-home-categories-bangumi-rank-list-header">
|
||||
<a :href="rankingsLink" target="_blank">
|
||||
<SubHeader> 排行榜 </SubHeader>
|
||||
</a>
|
||||
<VButton v-if="isCompactRankList" icon title="显示较少项目" @click="toggleRankListMode">
|
||||
<VIcon icon="mdi-poll" :size="16" />
|
||||
</VButton>
|
||||
<VButton v-else icon title="显示较多项目" @click="toggleRankListMode">
|
||||
<VIcon icon="mdi-format-list-text" :size="16" />
|
||||
</VButton>
|
||||
</div>
|
||||
<CompactRankList v-if="isCompactRankList" :parse-json="parseJson" :api="rankingsApi" />
|
||||
<RankList v-else bangumi-mode :parse-json="parseJson" :api="rankingsApi" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
import { applyContentFilter } from '@/components/feeds/api'
|
||||
import SubHeader from '../../../SubHeader.vue'
|
||||
import RankList from './RankList.vue'
|
||||
import CompactRankList from './CompactRankList.vue'
|
||||
import BangumiTimeline from './BangumiTimeline.vue'
|
||||
import { RankListCard } from './rank-list'
|
||||
import { compactRankListMixin } from '../../../../mixin'
|
||||
|
||||
const bangumiDataMap = {
|
||||
anime: {
|
||||
@ -41,7 +49,11 @@ export default Vue.extend({
|
||||
SubHeader,
|
||||
BangumiTimeline,
|
||||
RankList,
|
||||
CompactRankList,
|
||||
VButton,
|
||||
VIcon,
|
||||
},
|
||||
mixins: [compactRankListMixin()],
|
||||
props: {
|
||||
region: {
|
||||
type: Object,
|
||||
@ -116,10 +128,15 @@ export default Vue.extend({
|
||||
}
|
||||
&-rank-list {
|
||||
@include v-stretch(var(--fresh-home-categories-header-gap));
|
||||
// &-header {
|
||||
// // Timeline 的 header 中, 图标为 20px, 上下 padding 共 8px, 这里的 line-height 需要保持一致来对齐
|
||||
// line-height: calc(20px + 8px);
|
||||
// }
|
||||
&-header {
|
||||
// Timeline 的 header 中, 图标为 20px, 上下 padding 共 8px, 这里的 line-height 需要保持一致来对齐
|
||||
// line-height: calc(20px + 8px);
|
||||
@include h-center();
|
||||
justify-content: space-between;
|
||||
.be-icon {
|
||||
margin: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -400,7 +400,7 @@ export default Vue.extend({
|
||||
}
|
||||
&-seasons-container {
|
||||
@include h-stretch();
|
||||
@include scroll-mask-x(18px);
|
||||
@include scroll-mask-x(18px, var(--home-base-color));
|
||||
width: 0;
|
||||
flex: 1 0 0;
|
||||
margin: 0 2px;
|
||||
|
||||
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div
|
||||
class="fresh-home-compact-rank-list scroll-top scroll-bottom"
|
||||
:class="{ loading, loaded, 'not-empty': items.length > 0 }"
|
||||
>
|
||||
<div v-if="!loaded" class="fresh-home-compact-rank-list-loading-container">
|
||||
<VLoading v-if="loading" />
|
||||
<div
|
||||
v-if="(error || items.length === 0) && !loading"
|
||||
class="fresh-home-compact-rank-list-empty"
|
||||
>
|
||||
<VEmpty />
|
||||
<VButton class="fresh-home-compact-rank-list-refresh-button" round @click="reload">
|
||||
<VIcon icon="mdi-refresh" />
|
||||
刷新
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="loaded" ref="content" class="fresh-home-compact-rank-list-content">
|
||||
<a
|
||||
v-for="(video, index) of items"
|
||||
:key="video.id"
|
||||
ref="cards"
|
||||
class="compact-rank-list-card"
|
||||
:href="video.videoHref"
|
||||
target="_blank"
|
||||
>
|
||||
<div class="compact-rank-list-card-cover">
|
||||
<div class="compact-rank-list-card-rank" :class="{ 'top-three': index < 3 }">
|
||||
{{ index + 1 }}
|
||||
</div>
|
||||
<DpiImage :src="video.coverUrl" :size="{ width: 128, height: 80 }" />
|
||||
</div>
|
||||
<div class="compact-rank-list-card-info">
|
||||
<div class="compact-rank-list-card-title" :title="video.title">{{ video.title }}</div>
|
||||
<UpInfo :up-face-url="video.upFaceUrl" :href="video.upHref" :up-name="video.upName">
|
||||
<template #fallback-icon>
|
||||
<VIcon v-bind="upInfoProps" />
|
||||
</template>
|
||||
</UpInfo>
|
||||
<div class="compact-rank-list-card-stats">
|
||||
<VIcon icon="mdi-fire" :size="16" />
|
||||
{{ video.points | formatCount }}
|
||||
<VIcon icon="play" :size="16" />
|
||||
{{ video.playCount | formatCount }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import UpInfo from '@/components/feeds/UpInfo.vue'
|
||||
import { formatCount } from '@/core/utils/formatters'
|
||||
import { VIcon, VLoading, VEmpty, VButton, DpiImage } from '@/ui'
|
||||
import { cssVariableMixin, requestMixin } from '../../../../mixin'
|
||||
import { cleanUpScrollMask, setupScrollMask } from '../../../scroll-mask'
|
||||
import { compactRankListCssVars } from './rank-list'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
DpiImage,
|
||||
UpInfo,
|
||||
VIcon,
|
||||
VLoading,
|
||||
VEmpty,
|
||||
VButton,
|
||||
},
|
||||
filters: {
|
||||
formatCount,
|
||||
},
|
||||
mixins: [requestMixin(), cssVariableMixin(compactRankListCssVars)],
|
||||
props: {
|
||||
parseJson: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
bangumiMode: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
upInfoProps() {
|
||||
return {
|
||||
size: 18,
|
||||
icon: this.bangumiMode ? 'mdi-television-classic' : 'up-outline',
|
||||
style: {
|
||||
transform: this.bangumiMode ? 'translateY(-1px)' : 'none',
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
loaded() {
|
||||
if (this.loaded) {
|
||||
this.setupIntersection()
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
cleanUpScrollMask(this.$el)
|
||||
},
|
||||
methods: {
|
||||
async setupIntersection() {
|
||||
await this.$nextTick()
|
||||
console.log(this.$refs.cards)
|
||||
setupScrollMask({
|
||||
container: this.$el,
|
||||
items: this.$refs.cards,
|
||||
})
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import 'common';
|
||||
@import 'effects';
|
||||
@import './rank-list';
|
||||
|
||||
.fresh-home-compact-rank-list {
|
||||
@include rank-list-common();
|
||||
@include v-stretch();
|
||||
@include scroll-mask-y(8px, var(--home-base-color));
|
||||
width: var(--panel-width);
|
||||
height: var(--panel-height);
|
||||
min-height: var(--panel-height);
|
||||
padding: var(--padding);
|
||||
margin: calc(0px - var(--padding));
|
||||
position: relative;
|
||||
|
||||
&-content {
|
||||
height: 0;
|
||||
flex: 1 0 0;
|
||||
@include v-stretch(12px);
|
||||
@include no-scrollbar();
|
||||
}
|
||||
&.not-empty &-content {
|
||||
scroll-snap-type: y mandatory;
|
||||
}
|
||||
.compact-rank-list-card {
|
||||
scroll-snap-align: start;
|
||||
cursor: pointer;
|
||||
@include h-center(8px);
|
||||
&-cover {
|
||||
@include card(12px);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-self: center;
|
||||
box-shadow: none;
|
||||
overflow: hidden;
|
||||
transform-origin: bottom;
|
||||
position: relative;
|
||||
img {
|
||||
transition: 0.2s ease-out;
|
||||
}
|
||||
&:hover img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
&-rank {
|
||||
@include h-center();
|
||||
justify-content: center;
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
left: 4px;
|
||||
font-size: 12px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background-color: #333;
|
||||
color: #eee;
|
||||
font-weight: bold;
|
||||
&.top-three {
|
||||
background-color: var(--theme-color);
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
}
|
||||
&-info {
|
||||
@include v-stretch(6px);
|
||||
flex: 1 0 0;
|
||||
width: 0;
|
||||
}
|
||||
&-title {
|
||||
line-height: 1.5;
|
||||
transition: color 0.2s ease-out;
|
||||
@include semi-bold();
|
||||
@include single-line();
|
||||
&:hover {
|
||||
color: var(--theme-color);
|
||||
}
|
||||
}
|
||||
&-stats {
|
||||
@include h-center(12px);
|
||||
font-size: 12px;
|
||||
opacity: 0.5;
|
||||
.be-icon {
|
||||
margin-right: -8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -11,19 +11,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="fresh-home-categories-default-rank-list">
|
||||
<a :href="rankingsLink" target="_blank">
|
||||
<SubHeader> 排行榜 </SubHeader>
|
||||
</a>
|
||||
<RankList :parse-json="parseJson" :api="rankingsApi" />
|
||||
<div class="fresh-home-categories-default-rank-list-header">
|
||||
<a :href="rankingsLink" target="_blank">
|
||||
<SubHeader> 排行榜 </SubHeader>
|
||||
</a>
|
||||
<VButton v-if="isCompactRankList" icon title="显示较少项目" @click="toggleRankListMode">
|
||||
<VIcon icon="mdi-poll" :size="16" />
|
||||
</VButton>
|
||||
<VButton v-else icon title="显示较多项目" @click="toggleRankListMode">
|
||||
<VIcon icon="mdi-format-list-text" :size="16" />
|
||||
</VButton>
|
||||
</div>
|
||||
<CompactRankList v-if="isCompactRankList" :parse-json="parseJson" :api="rankingsApi" />
|
||||
<RankList v-else :parse-json="parseJson" :api="rankingsApi" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
import { applyContentFilter } from '@/components/feeds/api'
|
||||
import { RankListCard } from './rank-list'
|
||||
import CompactRankList from './CompactRankList.vue'
|
||||
import RankList from './RankList.vue'
|
||||
import VideoSlides from './VideoSlides.vue'
|
||||
import SubHeader from '../../../SubHeader.vue'
|
||||
import { compactRankListMixin } from '../../../../mixin'
|
||||
|
||||
/*
|
||||
TODO: 有几个区表面上是普通视频, 但内容走的还是番剧那套, 所以 RankList 也要换 API
|
||||
@ -34,10 +46,14 @@ TODO: 有几个区表面上是普通视频, 但内容走的还是番剧那套,
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
CompactRankList,
|
||||
RankList,
|
||||
VideoSlides,
|
||||
SubHeader,
|
||||
VButton,
|
||||
VIcon,
|
||||
},
|
||||
mixins: [compactRankListMixin()],
|
||||
props: {
|
||||
region: {
|
||||
type: Object,
|
||||
@ -92,6 +108,18 @@ export default Vue.extend({
|
||||
}
|
||||
&-rank-list {
|
||||
@include v-stretch(var(--fresh-home-categories-header-gap));
|
||||
&-header {
|
||||
@include h-center();
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
.be-button {
|
||||
@include absolute-v-center();
|
||||
right: 0;
|
||||
}
|
||||
.be-icon {
|
||||
margin: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -163,12 +163,13 @@ export default Vue.extend({
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import 'common';
|
||||
@import './rank-list';
|
||||
|
||||
.fresh-home-rank-list {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
width: 400px;
|
||||
overflow: hidden;
|
||||
width: var(--panel-width);
|
||||
min-height: var(--panel-height);
|
||||
height: var(--panel-height);
|
||||
padding: var(--padding);
|
||||
@ -295,7 +296,7 @@ export default Vue.extend({
|
||||
padding: 0 12px;
|
||||
}
|
||||
.be-up-info {
|
||||
margin: 4px 8px;
|
||||
margin: 4px 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -328,7 +329,7 @@ export default Vue.extend({
|
||||
padding: 0 12px;
|
||||
}
|
||||
.be-up-info {
|
||||
margin: 4px 8px;
|
||||
margin: 4px 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -374,34 +375,12 @@ export default Vue.extend({
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
}
|
||||
& &-loading-container {
|
||||
@include v-center();
|
||||
justify-content: center;
|
||||
padding: var(--padding);
|
||||
border-radius: var(--home-card-radius);
|
||||
border: 2px dashed #8884;
|
||||
height: 100%;
|
||||
}
|
||||
& &-empty {
|
||||
@include v-center(12px);
|
||||
justify-content: center;
|
||||
.be-button {
|
||||
padding: 4px 10px 4px 6px !important;
|
||||
&:hover .be-icon {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
.be-icon {
|
||||
margin-right: 6px;
|
||||
transition: 0.5s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
&.loaded {
|
||||
@include no-scrollbar();
|
||||
.animation {
|
||||
animation-play-state: running;
|
||||
}
|
||||
}
|
||||
@include rank-list-common();
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
@mixin rank-list-common {
|
||||
& &-loading-container {
|
||||
@include v-center();
|
||||
justify-content: center;
|
||||
padding: var(--padding);
|
||||
border-radius: var(--home-card-radius);
|
||||
border: 2px dashed #8884;
|
||||
height: 100%;
|
||||
}
|
||||
& &-empty {
|
||||
@include v-center(12px);
|
||||
justify-content: center;
|
||||
.be-button {
|
||||
padding: 4px 10px 4px 6px !important;
|
||||
&:hover .be-icon {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
.be-icon {
|
||||
margin-right: 6px;
|
||||
transition: 0.5s ease-out;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,8 @@ export interface RankListCard {
|
||||
dynamic?: string
|
||||
}
|
||||
export const rankListCssVars = {
|
||||
panelHeight: 608,
|
||||
panelWidth: 400,
|
||||
panelHeight: 604,
|
||||
padding: 12,
|
||||
rankItemHeight: 110,
|
||||
rankItemMargin: 24,
|
||||
@ -23,3 +24,8 @@ export const rankListCssVars = {
|
||||
thirdCoverHeight: 90,
|
||||
thirdCoverWidth: 139,
|
||||
}
|
||||
export const compactRankListCssVars = {
|
||||
panelWidth: 376,
|
||||
panelHeight: 580,
|
||||
padding: 0,
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ export interface FreshLayoutItem extends WithName {
|
||||
grow?: boolean
|
||||
}
|
||||
export interface FreshLayoutItemSettings {
|
||||
name: string
|
||||
linebreak: boolean
|
||||
order: number
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<script lang="ts">
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
import VideoList from '../../VideoList.vue'
|
||||
import { freshHomeOptions } from '../../types'
|
||||
import { freshHomeOptions } from '../../options'
|
||||
import { getTrendingVideos } from '../../../trending'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
import { OptionsOfMetadata } from '@/components/define'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { freshHomeOptionsMetadata } from './types'
|
||||
|
||||
export const freshHomeOptions =
|
||||
getComponentSettings<OptionsOfMetadata<typeof freshHomeOptionsMetadata>>('freshHome').options
|
||||
@ -1,9 +1,55 @@
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { FreshLayoutItemSettings } from './layouts/fresh-layout-item'
|
||||
import { defineOptionsMetadata } from '@/components/define'
|
||||
import { getNumberValidator } from '@/core/utils'
|
||||
import type { FreshLayoutItemSettings } from './layouts/fresh-layout-item'
|
||||
|
||||
export const freshHomeOptions = getComponentSettings('freshHome').options as {
|
||||
layoutOptions: Record<string, FreshLayoutItemSettings>
|
||||
personalized: boolean
|
||||
horizontalWheelScroll: boolean
|
||||
[key: string]: any
|
||||
export enum RankListMode {
|
||||
Default = 'default',
|
||||
Compact = 'compact',
|
||||
}
|
||||
|
||||
export const freshHomeOptionsMetadata = defineOptionsMetadata({
|
||||
layoutOptions: {
|
||||
displayName: '版块设置',
|
||||
defaultValue: {
|
||||
blackboard: {
|
||||
linebreak: false,
|
||||
order: 1,
|
||||
},
|
||||
trending: {
|
||||
linebreak: true,
|
||||
order: 2,
|
||||
},
|
||||
feeds: {
|
||||
linebreak: false,
|
||||
order: 3,
|
||||
},
|
||||
areas: {
|
||||
linebreak: true,
|
||||
order: 4,
|
||||
},
|
||||
categories: {
|
||||
linebreak: false,
|
||||
order: 5,
|
||||
},
|
||||
} satisfies Record<string, FreshLayoutItemSettings>,
|
||||
hidden: true,
|
||||
},
|
||||
personalized: {
|
||||
displayName: '个性化推荐',
|
||||
defaultValue: false,
|
||||
},
|
||||
horizontalWheelScroll: {
|
||||
displayName: '启用横向滚动',
|
||||
defaultValue: false,
|
||||
},
|
||||
maxWidth: {
|
||||
displayName: '最大宽度 (px)',
|
||||
defaultValue: 1440,
|
||||
validator: getNumberValidator(1000, 3000),
|
||||
},
|
||||
rankListMode: {
|
||||
displayName: '',
|
||||
defaultValue: RankListMode.Default,
|
||||
hidden: true,
|
||||
},
|
||||
})
|
||||
|
||||
@ -1,13 +1,5 @@
|
||||
.international-home > :not(.international-header),
|
||||
.international-header .b-wrap,
|
||||
.international-footer,
|
||||
#app > .bili-wrapper,
|
||||
#app > .elevator-module,
|
||||
#app > .bili-header-m.stardust-common > .bili-wrapper,
|
||||
.bili-header-m .head-banner .head-content .head-logo,
|
||||
#i_cecream .bili-header__channel,
|
||||
#i_cecream > .bili-feed4 > :not(.bili-header),
|
||||
.palette-button-wrap {
|
||||
// 将元素移到视图外来实现隐藏, 避免触发内部的 lazy load 内容
|
||||
@mixin layout-shift {
|
||||
position: fixed;
|
||||
visibility: hidden;
|
||||
top: 200vh;
|
||||
@ -17,3 +9,26 @@
|
||||
margin: 0 !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.bili-header-m .head-banner .head-content .head-logo,
|
||||
.international-home > :not(.international-header),
|
||||
.international-header .b-wrap,
|
||||
.international-footer,
|
||||
.palette-button-wrap {
|
||||
@include layout-shift();
|
||||
}
|
||||
#app {
|
||||
> .bili-wrapper,
|
||||
> .elevator-module,
|
||||
> .bili-header-m.stardust-common > .bili-wrapper {
|
||||
@include layout-shift();
|
||||
}
|
||||
}
|
||||
#i_cecream {
|
||||
> main,
|
||||
.palette-button-outer,
|
||||
.bili-header__channel,
|
||||
> .bili-feed4 > :not(.bili-header),
|
||||
.bili-footer {
|
||||
@include layout-shift();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { getJson } from '@/core/ajax'
|
||||
import { freshHomeOptions } from './fresh/options'
|
||||
import { RankListMode } from './fresh/types'
|
||||
|
||||
/**
|
||||
* 封装一些 API 请求的通用行为, 使用者要定义 parseJson 方法将返回的 JSON 转换为数据数组, 会自动存到 this.items 里
|
||||
@ -70,3 +72,29 @@ export const cssVariableMixin = (variables: Record<string, string | number>) =>
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
/** 使用 CompactRankList, 提供一些与设置关联的 data */
|
||||
export const compactRankListMixin = () => {
|
||||
return Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
rankListMode: freshHomeOptions.rankListMode,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isCompactRankList() {
|
||||
return this.rankListMode === RankListMode.Compact
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleRankListMode() {
|
||||
if (this.rankListMode === RankListMode.Compact) {
|
||||
this.rankListMode = RankListMode.Default
|
||||
} else if (this.rankListMode === RankListMode.Default) {
|
||||
this.rankListMode = RankListMode.Compact
|
||||
}
|
||||
freshHomeOptions.rankListMode = this.rankListMode
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
36
registry/lib/components/style/player-on-top-new/index.ts
Normal file
36
registry/lib/components/style/player-on-top-new/index.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { playerReady } from '@/core/utils'
|
||||
|
||||
function moveElementAfter(element: Element, after: Element) {
|
||||
const parent = element.parentElement
|
||||
if (!parent) {
|
||||
return
|
||||
}
|
||||
parent.removeChild(element)
|
||||
parent.insertBefore(element, after.nextSibling)
|
||||
}
|
||||
|
||||
const playerOnTop = async () => {
|
||||
await playerReady()
|
||||
const title = document.querySelector('#viewbox_report')
|
||||
const toolbar = document.querySelector('#arc_toolbar_report')
|
||||
moveElementAfter(title, toolbar)
|
||||
|
||||
const author = document.querySelector('#v_upinfo').parentElement
|
||||
const danmuku = document.querySelector('#danmukuBox')
|
||||
moveElementAfter(author, danmuku)
|
||||
}
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'playerOnTopNew',
|
||||
author: {
|
||||
name: 'RieN7',
|
||||
link: 'https://github.com/rien7',
|
||||
},
|
||||
tags: [componentsTags.style, componentsTags.video],
|
||||
displayName: '播放器置顶(新)',
|
||||
description:
|
||||
'原来的播放器置顶插件,现在已经不可用了,这是一个新的版本,可以在视频页面中将播放器放在页面最上方.',
|
||||
entry: playerOnTop,
|
||||
reload: playerOnTop,
|
||||
})
|
||||
@ -1,4 +1,6 @@
|
||||
@import 'common';
|
||||
$prefix: 'simplifyLiveroom-switch';
|
||||
|
||||
.#{$prefix} {
|
||||
&-vip .vip-icon,
|
||||
&-fansMedal .fans-medal-item-ctnr,
|
||||
@ -33,12 +35,12 @@ $prefix: 'simplifyLiveroom-switch';
|
||||
.control-panel-ctnr .dialog-ctnr {
|
||||
z-index: 800 !important;
|
||||
}
|
||||
.player-ctnr .room-info-ctnr {
|
||||
display: inline-flex !important;
|
||||
flex: 1 0 auto;
|
||||
align-items: center !important;
|
||||
margin-left: 12px !important;
|
||||
}
|
||||
// .player-ctnr .room-info-ctnr {
|
||||
// display: inline-flex !important;
|
||||
// flex: 1 0 auto;
|
||||
// align-items: center !important;
|
||||
// margin-left: 12px !important;
|
||||
// }
|
||||
.head-info-section {
|
||||
height: 52px !important;
|
||||
box-sizing: content-box !important;
|
||||
@ -52,14 +54,6 @@ $prefix: 'simplifyLiveroom-switch';
|
||||
.face-pendants {
|
||||
display: none !important;
|
||||
}
|
||||
// .blive-avatar-icons {
|
||||
// right: -2px !important;
|
||||
// .blive-avatar-icon {
|
||||
// width: 12px !important;
|
||||
// height: 12px !important;
|
||||
// border-width: 1px !important;
|
||||
// }
|
||||
// }
|
||||
.blive-avatar-pendant {
|
||||
width: 48px !important;
|
||||
height: 48px !important;
|
||||
@ -81,49 +75,18 @@ $prefix: 'simplifyLiveroom-switch';
|
||||
}
|
||||
.rows-ctnr .upper-row,
|
||||
.room-info-upper-row {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
flex: 1 0 auto !important;
|
||||
flex-direction: row-reverse !important;
|
||||
position: static !important;
|
||||
|
||||
.left-ctnr,
|
||||
.normal-mode {
|
||||
position: absolute !important;
|
||||
left: 50% !important;
|
||||
transform: translateX(-50%) !important;
|
||||
}
|
||||
.live-area,
|
||||
.area-text {
|
||||
display: inline-flex !important;
|
||||
}
|
||||
.right-ctnr,
|
||||
.upper-right-ctnr {
|
||||
position: static !important;
|
||||
transform: none !important;
|
||||
}
|
||||
.live-title,
|
||||
.room-title {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
|
||||
.text {
|
||||
line-height: normal !important;
|
||||
.right-ctnr {
|
||||
.action-text:not(.watched-text) {
|
||||
display: none !important;
|
||||
}
|
||||
@media screen and (max-width: 1750px) {
|
||||
& .title-length-limit {
|
||||
max-width: 250px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.info-section {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.rows-ctnr .lower-row,
|
||||
.room-info-down-row {
|
||||
margin: 0 !important;
|
||||
order: -1;
|
||||
width: auto !important;
|
||||
@include absolute-center();
|
||||
|
||||
.right-ctnr,
|
||||
.left-ctnr > :nth-child(n + 3) {
|
||||
display: none !important;
|
||||
@ -253,6 +216,11 @@ $prefix: 'simplifyLiveroom-switch';
|
||||
height: 48px !important;
|
||||
}
|
||||
}
|
||||
&.player-full-win {
|
||||
#web-player__bottom-bar__container {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.#{$prefix}-guard {
|
||||
.guard-danmaku::before {
|
||||
|
||||
@ -44,6 +44,8 @@
|
||||
}
|
||||
&.touch-video-control-show .bpx-player-pbp {
|
||||
opacity: 1 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
bottom: calc(100% - 1px) !important;
|
||||
.bpx-player-pbp-pin {
|
||||
opacity: 1 !important;
|
||||
|
||||
@ -175,3 +175,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 适配控制栏着色
|
||||
.bpx-player-control-bottom.bpx-player-control-bottom::before {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
1
registry/lib/components/utils/auto-like/index.md
Normal file
1
registry/lib/components/utils/auto-like/index.md
Normal file
@ -0,0 +1 @@
|
||||
进入视频 / 查看动态时, 自动点赞.
|
||||
53
registry/lib/components/utils/auto-like/index.ts
Normal file
53
registry/lib/components/utils/auto-like/index.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { forEachFeedsCard } from '@/components/feeds/api'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { matchUrlPattern, playerReady } from '@/core/utils'
|
||||
import { feedsUrls, videoAndBangumiUrls } from '@/core/utils/urls'
|
||||
|
||||
const feedsLikeQueue = [] as HTMLElement[]
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'autoLike',
|
||||
displayName: '自动点赞',
|
||||
tags: [componentsTags.utils, componentsTags.feeds, componentsTags.video],
|
||||
urlInclude: [...videoAndBangumiUrls, ...feedsUrls],
|
||||
options: {
|
||||
video: {
|
||||
defaultValue: true,
|
||||
displayName: '对视频点赞',
|
||||
},
|
||||
feed: {
|
||||
defaultValue: true,
|
||||
displayName: '对动态点赞',
|
||||
},
|
||||
},
|
||||
entry: async ({ settings: { options } }) => {
|
||||
if (options.video && videoAndBangumiUrls.some(url => matchUrlPattern(url))) {
|
||||
await playerReady()
|
||||
const likeButton = (await select(
|
||||
'.video-toolbar .like, .tool-bar .like-info, .video-toolbar-v1 .like',
|
||||
)) as HTMLSpanElement
|
||||
if (!likeButton || likeButton.classList.contains('on')) {
|
||||
return
|
||||
}
|
||||
likeButton.click()
|
||||
}
|
||||
if (options.feed && feedsUrls.some(url => matchUrlPattern(url))) {
|
||||
window.setInterval(() => {
|
||||
if (feedsLikeQueue.length === 0) {
|
||||
return
|
||||
}
|
||||
const button = feedsLikeQueue.shift()
|
||||
button?.click()
|
||||
}, 1000)
|
||||
forEachFeedsCard({
|
||||
added: card => {
|
||||
const likeButton = dq(card.element, '.bili-dyn-action.like') as HTMLElement
|
||||
if (!likeButton || likeButton.classList.contains('active')) {
|
||||
return
|
||||
}
|
||||
feedsLikeQueue.push(likeButton)
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -19,7 +19,7 @@ const importSeries = async (sid, uid, csrf) => {
|
||||
|
||||
// 创建收藏夹,获取新收藏夹id
|
||||
let favId = 0
|
||||
while (true) {
|
||||
for (;;) {
|
||||
const response = await fetch('https://api.bilibili.com/x/v3/fav/folder/add', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
@ -43,7 +43,7 @@ const importSeries = async (sid, uid, csrf) => {
|
||||
for (let i = 0; i < seriesVideos.length; i++) {
|
||||
// 做个延迟,防止太快而遭服务器拒绝
|
||||
await delay(500)
|
||||
while (true) {
|
||||
for (;;) {
|
||||
const response = await fetch('https://api.bilibili.com/x/v3/fav/resource/deal', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
@ -72,7 +72,7 @@ const importSeries = async (sid, uid, csrf) => {
|
||||
}
|
||||
|
||||
const importCollection = async (sid, csrf) => {
|
||||
while (true) {
|
||||
for (;;) {
|
||||
const response = await fetch('https://api.bilibili.com/x/v3/fav/season/fav', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
{{ row.displayName }}
|
||||
</div>
|
||||
<div
|
||||
class="row-default-binding"
|
||||
class="row-default-binding row-binding"
|
||||
:class="{
|
||||
overwritten: isOverwrittern(presets[selectedPreset], customKeyBindings),
|
||||
'not-set': presetBase[row.name] === undefined,
|
||||
@ -13,7 +13,7 @@
|
||||
{{ showReadonlyKey(presetBase) }}
|
||||
</div>
|
||||
<div
|
||||
class="row-preset-binding"
|
||||
class="row-preset-binding row-binding"
|
||||
:class="{
|
||||
overwritten: isOverwrittern(customKeyBindings),
|
||||
'not-set': presets[selectedPreset][row.name] === undefined,
|
||||
@ -21,7 +21,7 @@
|
||||
>
|
||||
{{ showReadonlyKey(presets[selectedPreset]) }}
|
||||
</div>
|
||||
<div class="row-custom-binding">
|
||||
<div class="row-custom-binding row-binding">
|
||||
<div v-if="editable" class="custom-binding-edit">
|
||||
<TextBox
|
||||
ref="customBindingTextBox"
|
||||
@ -129,6 +129,12 @@ export default Vue.extend({
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
.row-binding {
|
||||
&,
|
||||
& input {
|
||||
font-family: monospace, sans-serif;
|
||||
}
|
||||
}
|
||||
.row-custom-binding {
|
||||
.be-button {
|
||||
padding: 4px;
|
||||
|
||||
@ -74,6 +74,13 @@ const entry: ComponentEntry = async ({ settings, metadata }) => {
|
||||
},
|
||||
true,
|
||||
)
|
||||
addComponentListener(
|
||||
`${metadata.name}.preserveReplyNotice`,
|
||||
(value: boolean) => {
|
||||
document.body.classList.toggle('preserve-reply-notice', value)
|
||||
},
|
||||
true,
|
||||
)
|
||||
addComponentListener(
|
||||
`${metadata.name}.showPlaceholder`,
|
||||
(value: boolean) => {
|
||||
@ -99,6 +106,7 @@ export const component = defineComponentMetadata({
|
||||
|
||||
- \`占位文本\`: 删除首页推广模块的广告后显示"🚫已屏蔽广告"来替代空白区域.
|
||||
- \`保留活动横幅\`: 保留视频页面的活动横幅.
|
||||
- \`保留小喇叭\`: 保留视频页面的活动横幅下方评论区上方的黄色小喇叭通知以及动态的黄色小喇叭.
|
||||
`.trim(),
|
||||
},
|
||||
options: {
|
||||
@ -114,5 +122,9 @@ export const component = defineComponentMetadata({
|
||||
displayName: '保留动态商品推荐',
|
||||
defaultValue: false,
|
||||
},
|
||||
preserveReplyNotice: {
|
||||
displayName: '保留小喇叭通知',
|
||||
defaultValue: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
.mascot,
|
||||
.rank-container .cm-module,
|
||||
body:not(.preserve-event-banner) .activity-m,
|
||||
body:not(.preserve-event-banner) .activity-m-v1,
|
||||
body:not(.preserve-reply-notice) .reply-notice,
|
||||
body.remove-game-match-module .bili-wrapper > .home-match,
|
||||
body.remove-game-match-module #reportFirst3,
|
||||
.home-content .ad-panel,
|
||||
|
||||
1
registry/lib/components/utils/url-params-clean/index.md
Normal file
1
registry/lib/components/utils/url-params-clean/index.md
Normal file
@ -0,0 +1 @@
|
||||
自动删除网址中的多余跟踪参数. 请注意这会导致浏览器历史记录出现重复的标题 (分别是转换前后的网址), 并可能导致后退要多退几次.
|
||||
@ -49,6 +49,13 @@ const entry = async () => {
|
||||
'vd_source',
|
||||
'is_story_h5',
|
||||
'buvid',
|
||||
'goFrom',
|
||||
'jumpLinkType',
|
||||
'hasBack',
|
||||
'noTitleBar',
|
||||
'msource',
|
||||
'live_from',
|
||||
'plat_id',
|
||||
]
|
||||
const [blockParams] = registerAndGetData('urlParamsClean.params', builtInBlockParams)
|
||||
const builtInSiteSpecifiedParams = [
|
||||
@ -72,6 +79,10 @@ const entry = async () => {
|
||||
match: /\/\/www\.bilibili\.com\/video\//,
|
||||
param: 'up_id',
|
||||
},
|
||||
{
|
||||
match: /\/\/mall\.bilibili\.com\//,
|
||||
param: 'noReffer',
|
||||
},
|
||||
]
|
||||
const [siteSpecifiedParams] = registerAndGetData(
|
||||
'urlParamsClean.siteSpecifiedParams',
|
||||
@ -80,10 +91,13 @@ const entry = async () => {
|
||||
const builtInTailingSlash: { match: string | RegExp }[] = []
|
||||
const [tailingSlash] = registerAndGetData('urlParamsClean.tailingSlash', builtInTailingSlash)
|
||||
|
||||
const clean = () => {
|
||||
const urlParams = window.location.search.substring(1).split('&')
|
||||
const getCleanUrl = (originalUrl: string) => {
|
||||
const url = new URL(originalUrl, location.origin)
|
||||
const urlParams = [...new URLSearchParams(url.search).entries()].map(
|
||||
([key, value]) => `${key}=${value},`,
|
||||
)
|
||||
if (urlParams.some(param => noClean.some(it => param.includes(it)))) {
|
||||
return
|
||||
return originalUrl
|
||||
}
|
||||
const filteredParams = urlParams.filter(p => {
|
||||
if (blockParams.some(b => p.startsWith(`${b}=`))) {
|
||||
@ -99,19 +113,47 @@ const entry = async () => {
|
||||
return true
|
||||
})
|
||||
const filteredParamsString = filteredParams.join('&')
|
||||
let url = document.URL.replace(window.location.search, '')
|
||||
tailingSlash.forEach(({ match }) => {
|
||||
if (matchPattern(url, match) && url.endsWith('/')) {
|
||||
url = url.slice(0, url.length - 1)
|
||||
const pathName = url.pathname
|
||||
if (matchPattern(pathName, match) && pathName.endsWith('/')) {
|
||||
url.pathname = pathName.slice(0, pathName.length - 1)
|
||||
}
|
||||
})
|
||||
const query = filteredParamsString ? `?${filteredParamsString}` : ''
|
||||
const newUrl = url + query
|
||||
url.search = query
|
||||
return url.toString()
|
||||
}
|
||||
|
||||
const createHistoryHook = (
|
||||
original: (data: unknown, unused: string, url: string, ...restArgs: unknown[]) => void,
|
||||
) => {
|
||||
return function historyHook(
|
||||
data: unknown,
|
||||
unused: string,
|
||||
url: string,
|
||||
...restArgs: unknown[]
|
||||
) {
|
||||
const newUrl = getCleanUrl(url)
|
||||
if (newUrl !== url) {
|
||||
console.log('History API 拦截', url, newUrl)
|
||||
return original.call(this, data, unused, newUrl, ...restArgs)
|
||||
}
|
||||
return original.call(this, data, unused, url, ...restArgs)
|
||||
}
|
||||
}
|
||||
const originalPushState = unsafeWindow.history.pushState
|
||||
unsafeWindow.history.pushState = createHistoryHook(originalPushState)
|
||||
const originalReplaceState = unsafeWindow.history.replaceState
|
||||
unsafeWindow.history.replaceState = createHistoryHook(originalReplaceState)
|
||||
|
||||
const clean = () => {
|
||||
const newUrl = getCleanUrl(document.URL)
|
||||
if (newUrl !== document.URL) {
|
||||
console.log(document.URL, newUrl)
|
||||
console.log('直接清理', document.URL, newUrl)
|
||||
window.history.replaceState(history.state, '', newUrl)
|
||||
}
|
||||
}
|
||||
|
||||
const { fullyLoaded } = await import('@/core/life-cycle')
|
||||
const { urlChange } = await import('@/core/observer')
|
||||
fullyLoaded(() => {
|
||||
@ -122,10 +164,6 @@ export const component = defineComponentMetadata({
|
||||
name: 'urlParamsClean',
|
||||
displayName,
|
||||
entry,
|
||||
description: {
|
||||
'zh-CN':
|
||||
'自动删除网址中的多余跟踪参数. 请注意这会导致浏览器历史记录出现重复的标题 (分别是转换前后的网址), 并可能导致后退要多退几次.',
|
||||
},
|
||||
tags: [componentsTags.utils],
|
||||
urlExclude: [/game\.bilibili\.com\/fgo/, /live\.bilibili\.com\/p\/html\/live-app-hotrank\//],
|
||||
})
|
||||
|
||||
1
registry/lib/components/video/danmaku/unescape/index.md
Normal file
1
registry/lib/components/video/danmaku/unescape/index.md
Normal file
@ -0,0 +1 @@
|
||||
将弹幕中的 `\n` 替换为真实的换行, 注意这可能导致原先不重叠的弹幕发生重叠.
|
||||
19
registry/lib/components/video/danmaku/unescape/index.ts
Normal file
19
registry/lib/components/video/danmaku/unescape/index.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { forEachVideoDanmaku } from '@/components/video/video-danmaku'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'unescapeDanmaku',
|
||||
displayName: '弹幕转义',
|
||||
tags: [componentsTags.video],
|
||||
entry: () => {
|
||||
const newLineRegex = /\\n/g
|
||||
forEachVideoDanmaku({
|
||||
added: danmaku => {
|
||||
if (newLineRegex.test(danmaku.text)) {
|
||||
const newText = danmaku.text.replace(newLineRegex, '\n')
|
||||
danmaku.element.textContent = newText
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
@ -107,4 +107,7 @@ export default Vue.extend({
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.video-tool-more-dropdown .video-watchlater.dropdown-item {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
height: calc(100% - 17px);
|
||||
width: 100%;
|
||||
width: calc(100% - 24px);
|
||||
background-color: rgba(0, 0, 0, var(--video-control-opacity));
|
||||
z-index: -1;
|
||||
@include on-fullscreen {
|
||||
|
||||
@ -1 +1 @@
|
||||
在网页全屏 / 全屏模式下, 禁止鼠标滚轮控制播放器的音量.
|
||||
在网页全屏 / 全屏模式下, 禁止鼠标滚轮控制播放器的音量. 请注意不能和 `反转滚轮调音量` 一同使用.
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { preventEvent } from '@/core/utils'
|
||||
import { allVideoUrls } from '@/core/utils/urls'
|
||||
|
||||
let cancel: () => void
|
||||
const prevent = () => {
|
||||
cancel?.()
|
||||
cancel = preventEvent(unsafeWindow, 'mousewheel', () => {
|
||||
const isFullscreen = [
|
||||
'player-mode-webfullscreen',
|
||||
'player-fullscreen-fix',
|
||||
'player-full-win',
|
||||
].some(token => document.body.classList.contains(token))
|
||||
export const disableScrollVolume = () => {
|
||||
return preventEvent(unsafeWindow, 'mousewheel', () => {
|
||||
const isFullscreen = ['player-mode-full', 'player-fullscreen-fix', 'player-full-win'].some(
|
||||
token => document.body.classList.contains(token),
|
||||
)
|
||||
return isFullscreen
|
||||
})
|
||||
}
|
||||
@ -17,9 +15,16 @@ export const component = defineComponentMetadata({
|
||||
name: 'disableScrollVolume',
|
||||
displayName: '禁止滚轮调音量',
|
||||
tags: [componentsTags.video],
|
||||
entry: prevent,
|
||||
reload: prevent,
|
||||
entry: () => {
|
||||
cancel?.()
|
||||
cancel = disableScrollVolume()
|
||||
},
|
||||
reload: () => {
|
||||
cancel?.()
|
||||
cancel = disableScrollVolume()
|
||||
},
|
||||
unload: () => {
|
||||
cancel?.()
|
||||
},
|
||||
urlInclude: allVideoUrls,
|
||||
})
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user