Skip to content

Commit 82d694b

Browse files
VanceHudRadekyspecShiroAzusa64QiuLiang-99
authored
V 1.2 (#25)
* 引入了Altcha进行人机验证V2 (#16) * 添加Altcha * altcha update * Fix bug for altcha --------- Co-authored-by: VanceHud <241902059+VanceHud@users.noreply.github.com> * 添加自定义API服务器功能 * 把自定义API折叠到高级选项内 * 修复油猴脚本高级选项展开后无法显示完全的BUG * 修复了油猴脚本的popup无法正常关闭的BUG * 又修复了油猴脚本的popup无法正常关闭的BUG * 修复大小写 * add eo dev script * migrate to ioredis * optimize server perf * 更新了README的内容,新增了完整的英文版README * add redis proto var * 合并chromium和firefox扩展 (#19) add platform.js * fix: debug and test complete in chromium * remove independent firefox extension * Fix bug #18 * Revert "Fix bug #18"'s firefox This reverts commit 03f8b33. * 更新了教程 * merge await in server * Revert "Merge pull request #20 from bili-qml-team/bugfix-18" This reverts commit 906edf2, reversing changes made to 37f9573. * 延后注入时间防止重载 * 修复了ReferenceError: resolve is not defined * 修复了弹幕功能 顺便添加了一堆console.log * 延长等待时间和延迟 * 同步chrome版本的修改 * apply dev server * remove dup active * 去除active * 再次延长延迟 * 修复排行榜Alitcha * 修复了判断投票的逻辑 * feat: 允许以插入的方式显示视频card * 明确了弹幕发送的三种方案 * del old * 给插件版添加新版排行榜页面 * import some function from evolve * 给油猴版添加新版排行榜页面 * 更新popup界面的样式 * fix a bug * another one * 删除export * popup兼容黑暗模式 * 修复了覆盖不完全的问题 * 同步两个地方的黑暗模式配置 * fix: 按钮长时间等待问题 按钮直接注入vue崩溃问题 * fix:清理代码 解决视频页面移动到新视频按钮状态不更新问题 * utils分文件 * fix: 更好的按钮插入逻辑 * add server cron cache * update cache at startup * update cache header indicator * ignore server package-lock * try add local and eo runtime * eo cannot have local runs * add external refresh * sync button logic for tampermonkey version * extend wait time * try fix eo refresh * Create API_DOCUMENTATION.md * try to fix eo variables * use eo kv * add "何一位" to chrome version * rollback to see cache * sync "何一位" to tampermonkey version * add scroll to settings * feat:添加cache管理器 * fix save button * fix a bug * newfeature: allow user drag the popup window *tampermonkey version * fixed the flickering issue after dragging and dropping * use cf workers kv as cache * unified English name * add altcha complexity * add env doc * fix cache & add env doc * change refresh endpoint method * 默认抽象模式 * update server dep & query check * fix bug * fix doc typo * add eo dev build action --------- Co-authored-by: VanceHud <241902059+VanceHud@users.noreply.github.com> Co-authored-by: Radekyspec <w41k3r15347@gmail.com> Co-authored-by: ShiroAzusa <azusa@shiroazusa.net> Co-authored-by: QiuLiang-99 <1297829693@qq.com>
1 parent 5c4aedf commit 82d694b

39 files changed

+4470
-3811
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 依赖
22
node_modules/
33
src/server/node_modules/
4+
src/server/package-lock.json
45

56
# 环境变量
67
.env

README.md

Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<h1 align="center">B站问号榜 (Bilibili Question-Mark Leaderboard)</h1>
66

77
<p align="center">
8-
<a href="README.md">中文</a> | <a href="#english-version">English</a>
8+
<a href="#-中文介绍">中文介绍</a> | <a href="README_EN.md">English Version</a>
99
</p>
1010

1111
<p align="center">
@@ -14,83 +14,89 @@
1414

1515
---
1616

17-
## 功能概述
17+
## 📖 中文介绍
1818

19-
- **问号点亮**:在B站视频工具栏增加专属“问号”按钮,如果你觉得这个视频值得你发一个“?”,那么就点亮它。
20-
- **弹幕联动**:点亮问号时,自动在当前视频发送一条内容为“?”的弹幕。
21-
- **实时榜单**:点击插件图标,即可查看今日、本周及本月最“抽象”的视频排行。
19+
### ✨ 核心功能
2220

23-
---
24-
25-
## 快速开始
21+
- **❓ 问号点亮**:在 B 站视频工具栏增加专属“问号”按钮。如果你觉得这个视频很"抽象"(值得发"?"),就点亮它!
22+
- **💬 弹幕联动**
23+
- 点亮问号时,自动在当前视频发送一条内容为“?”的弹幕。
24+
- 弹幕发送前支持二次确认,防止误触。
25+
- **🏆 实时榜单**
26+
- 点击插件图标打开面板,查看 **实时****今日****本周****本月** 最“抽象”的视频排行。
27+
- 支持查看完整的独立榜单页面,方便分享。
28+
- **⚙️ 个性化设置**
29+
- **弹幕开关**:自由决定点击问号时是否自动发送弹幕。
30+
- **API 自定义**:支持修改后端 API 地址(高级选项,普通用户不建议修改)
2631

27-
### 方法 1:使用chrome/edge插件市场安装 (最简单)
28-
* [Chrome 插件市场](https://chromewebstore.google.com/detail/b%E7%AB%99%E9%97%AE%E5%8F%B7%E6%A6%9C/kpfomdjnloglfedoamjaflnhojkcjndh?hl=zh-c)
29-
* [Edge 插件市场](https://microsoftedge.microsoft.com/addons/detail/b%E7%AB%99%E9%97%AE%E5%8F%B7%E6%A6%9C/fnlcdhaoobciclcjlnlopbcncmhjkdog)
32+
### 🚀 安装指南
3033

31-
如果不会从插件市场安装,可以查看操作步骤:https://www.bilibili.com/video/BV1zJiGBREPB/
34+
本项目支持 **Chrome / Edge** (扩展程序)、**Firefox** (扩展程序) 和 **油猴脚本 (Tampermonkey)** 三种方式。
3235

36+
#### 1. Chrome / Edge 浏览器
37+
**推荐方式:应用商店安装**
38+
- [Chrome 应用商店](https://chromewebstore.google.com/detail/b%E7%AB%99%E9%97%AE%E5%8F%B7%E6%A6%9C/kpfomdjnloglfedoamjaflnhojkcjndh?hl=zh-c)
39+
- [Edge 应用商店](https://microsoftedge.microsoft.com/addons/detail/b%E7%AB%99%E9%97%AE%E5%8F%B7%E6%A6%9C/fnlcdhaoobciclcjlnlopbcncmhjkdog)
3340

34-
### 方法 2:加载已解压的扩展程序
35-
操作步骤见链接 https://www.bilibili.com/opus/1154715533972602918
36-
37-
---
41+
**开发者模式安装 (最新版)**
42+
1. 下载本项目源码并解压。
43+
2. 打开 Chrome/Edge 扩展程序页面 (`chrome://extensions/``edge://extensions/`)。
44+
3. 开启右上角的 **开发者模式**
45+
4. 点击 **加载已解压的扩展程序**,选择本项目中的 `src/bili-qml-extension` 目录。
3846

39-
## TODO
47+
#### 2. Firefox 浏览器
48+
Firefox暂未上线扩展商店,暂时请使用开发者模式安装
49+
方法如下:
50+
1. 下载本项目源码并解压。
51+
2. 在 Firefox 地址栏输入 `about:debugging` 并回车。
52+
3. 点击左侧的 **此 Firefox**
53+
4. 点击 **临时载入附加组件...**
54+
5. 选择本项目 `src/bili-qml-extension` 目录下的 `manifest.json` 文件。
4055

41-
- [x] debug-1: 修改下滑时图标未合理隐藏的问题
42-
- [x] debug-2: 修改同时唤起转发小窗的问题。感谢B站用户 Logmeinu 指出问题
56+
#### 3. 油猴脚本 (Tampermonkey)
57+
适用于所有支持油猴脚本的浏览器 (Chrome, Edge, Firefox, Safari 等)。
58+
1. 确保浏览器已安装 Tampermonkey 扩展。
59+
2. 点击链接安装:[正式版](https://github.com/bili-qml-team/bili-qml/raw/refs/heads/main/src/bili-qml-tampermonkey/bili-qml.user.js)[测试版](https://github.com/bili-qml-team/bili-qml/raw/refs/heads/dev/src/bili-qml-tampermonkey/bili-qml.user.js)
4360

44-
- [x] support-1: 上架Chrome应用商店
45-
- [x] support-2: 支持 Firefox
46-
- [ ] support-3: 支持Bilibili桌面端
47-
- [x] support-4: 支持油猴脚本,Mac用户可以通过油猴脚本使用插件
48-
- [x] support-5: 上架edge应用商店
49-
50-
- [ ] new feature-1: 频繁vote时增加人机验证,感谢B站用户 巧克力棒好好吃啊qwq 的建议
51-
- [x] new feature-2: 将榜单制作为一个独立的页面,方便用户查看和分享
52-
- [x] new feature-3: 由用户决定是否发送?弹幕
53-
54-
- [ ] need review: 代码冗余过多, 需要优化代码结构
61+
**请注意:油猴脚本的排行榜需要右键点击问号按钮开启。**
5562

5663
---
5764

58-
<a name="english-version"></a>
59-
60-
## 🌟 English Version
61-
62-
### Description
63-
A browser extension that adds a "Question Mark" button to Bilibili video toolbars. It tracks "abstract" scores and syncs with live Danmaku.
64-
65-
### Features
66-
- **Interactive Button**: Light up the "?" to vote for a video.
67-
- **Auto Danmaku**: Automatically sends a "?" Danmaku when you vote.
68-
- **Leaderboard**: Check the most "abstract" videos of the day/week.
69-
- **Data Sync**: Bound to your Bilibili UID for permanent record tracking.
70-
71-
### How to Install
72-
1. Download and unzip this repository.
73-
2. Go to `chrome://extensions/` in your browser.
74-
3. Enable **Developer mode** (top right).
75-
4. Click **Load unpacked** and select the `src/extension` folder.
65+
### 📅 开发计划 (TODO)
66+
67+
- [x] **已修复 (Fixed)**
68+
- 下滑时图标未合理隐藏的问题
69+
- 同时唤起转发小窗的问题 (Thanks to bilibili@Logmeinu)
70+
- [x] **已支持 (Supported)**
71+
- 上架 Chrome 应用商店
72+
- 上架 Edge 应用商店
73+
- 支持 Firefox 浏览器
74+
- 支持 油猴脚本 (Tampermonkey)
75+
- [x] **新特性 (Features)**
76+
- **人机验证 (Altcha)**: 防止滥用 (Thanks to bilibili@巧克力棒好好吃啊qwq)
77+
- **独立榜单页面**
78+
- **设置面板**: 自定义弹幕发送偏好、API 地址
79+
- [ ] **待办 (Planned)**
80+
- 支持 Bilibili 桌面客户端
81+
- 代码结构优化与重构
7682

7783
---
78-
7984
## 🛠 技术栈
8085

8186
- **Frontend**: HTML, CSS (Bilibili Style), JavaScript (Chrome Extension API)
8287
- **Backend**: Node.js (Express)
8388

84-
## 🤝 贡献与反馈
89+
---
90+
91+
### 🤝 贡献与反馈
8592

8693
感谢以下大佬对本项目做出的贡献,每一位都是热心而高技术力的contributor,他们的贡献使得本项目变得更加完善和强大🎉
8794

88-
| 贡献者 | 贡献说明 |
95+
| 贡献者 | 贡献内容 |
8996
| :---: | :--- |
90-
| <a href="https://github.com/Radekyspec"><img src="https://github.com/Radekyspec.png?size=80" width="80px;" style="border-radius: 50%;"/><br /><sub><b>Radekyspec</b></sub></a> | 贡献v1.2数据库迁移脚本,eo保护 |
91-
| <a href="https://github.com/VanceHud"><img src="https://github.com/VanceHud.png?size=80" width="80px;" style="border-radius: 50%;"/><br /><sub><b>VanceHud</b></sub></a> | 贡献firefox版本、油猴版本、用户自定义是否发送问号功能、人机验证 |
92-
| <a href="https://github.com/ShiroAzusa64"><img src="https://github.com/ShiroAzusa64.png?size=80" width="80px;" style="border-radius: 50%;"/><br /><sub><b>ShiroAzusa64</b></sub></a> | 贡献v1.2版本后端逻辑 |
93-
97+
| <a href="https://github.com/Radekyspec"><img src="https://github.com/Radekyspec.png?size=50" width="50px;" style="border-radius: 50%;"/><br /><sub><b>Radekyspec</b></sub></a> | 数据库迁移脚本、EO保护逻辑 |
98+
| <a href="https://github.com/VanceHud"><img src="https://github.com/VanceHud.png?size=50" width="50px;" style="border-radius: 50%;"/><br /><sub><b>VanceHud</b></sub></a> | Firefox版本、油猴版本、设置面板功能、Altcha验证集成 |
99+
| <a href="https://github.com/ShiroAzusa64"><img src="https://github.com/ShiroAzusa64.png?size=50" width="50px;" style="border-radius: 50%;"/><br /><sub><b>ShiroAzusa64</b></sub></a> | v1.2版本后端核心逻辑 |
94100

95101
参与贡献方式: 欢迎提交 Issues 或 Pull Request!
96102

@@ -107,4 +113,4 @@ A browser extension that adds a "Question Mark" button to Bilibili video toolbar
107113
1. **信息收集**:本插件仅提取 B 站公开的 `DedeUserID` (UID) 作为点亮问号的唯一识别符。我们**不收集****不读取****不传输**您的 B 站账号密码、SESSDATA 等任何敏感登录凭证。
108114
2. **数据用途**:收集的 UID 仅用于统计视频的问号数值、同步您的点亮状态以及生成排行榜,不会用于任何商业用途。
109115
3. **权限声明**:插件申请的 `cookies` 权限仅用于读取登录状态,申请的域名访问权限仅限于 `bilibili.com` 和插件后端 API。
110-
4. **第三方共享**:我们承诺不会将任何用户数据共享给第三方。
116+
4. **第三方共享**:我们承诺不会将任何用户数据共享给第三方。

README_EN.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<p align="center">
2+
<img src="src/bili-qml-extension/icons/button-icon.png" width="100" height="100" alt="Bilibili Q-Mark List Logo">
3+
</p>
4+
5+
<h1 align="center">Bilibili Question-Mark Leaderboard</h1>
6+
7+
<p align="center">
8+
<a href="README.md">中文介绍</a> | <a href="README_EN.md">English Version</a>
9+
</p>
10+
11+
<p align="center">
12+
<strong>Share "abstract" videos, automatically sync Danmaku, and build the Bilibili "abstract" video leaderboard.</strong>
13+
</p>
14+
15+
---
16+
17+
## 📖 Introduction
18+
19+
### ✨ Key Features
20+
21+
- **❓ Question Mark Button**: Adds a dedicated "?" button to the Bilibili video toolbar. If you find a video "abstract" (meme-worthy, confusing, or funny in a specific way), light it up!
22+
- **💬 Danmaku Sync**:
23+
- When you light up the "?", a "?" Danmaku is automatically sent to the current video.
24+
- Supports a confirmation dialog before sending to prevent accidental clicks.
25+
- **🏆 Live Leaderboard**:
26+
- Click the extension icon to view the **Real-time**, **Daily**, **Weekly**, and **Monthly** most "abstract" video rankings.
27+
- Supports viewing a full independent leaderboard page for easy sharing.
28+
- **⚙️ Personalization**:
29+
- **Danmaku Toggle**: Choose whether to automatically send a Danmaku when clicking the button.
30+
- **Custom API**: Supports modifying the backend API address (Advanced option, not recommended for normal users).
31+
32+
### 🚀 Installation Guide
33+
34+
This project supports **Chrome / Edge** (Extension), **Firefox** (Extension), and **Tampermonkey Userscript**.
35+
36+
#### 1. Chrome / Edge Browser
37+
**Recommended: Install via Web Store**
38+
- [Chrome Web Store](https://chromewebstore.google.com/detail/b%E7%AB%99%E9%97%AE%E5%8F%B7%E6%A6%9C/kpfomdjnloglfedoamjaflnhojkcjndh?hl=zh-c)
39+
- [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/b%E7%AB%99%E9%97%AE%E5%8F%B7%E6%A6%9C/fnlcdhaoobciclcjlnlopbcncmhjkdog)
40+
41+
**Developer Mode Installation (Latest Version)**
42+
1. Download and unzip the source code of this project.
43+
2. Open the extensions page in Chrome/Edge (`chrome://extensions/` or `edge://extensions/`).
44+
3. Enable **Developer mode** in the top right corner.
45+
4. Click **Load unpacked** and select the `src/bili-qml-extension` directory from this project.
46+
47+
#### 2. Firefox Browser
48+
The Firefox extension is not yet available on the add-ons store. Please use Developer Mode to install for now.
49+
Method:
50+
1. Download and unzip the source code of this project.
51+
2. Enter `about:debugging` in the Firefox address bar and press Enter.
52+
3. Click **This Firefox** on the left.
53+
4. Click **Load Temporary Add-on...**.
54+
5. Select the `manifest.json` file in the `src/bili-qml-extension` directory.
55+
56+
#### 3. Userscript (Tampermonkey)
57+
Suitable for all browsers that support Tampermonkey (Chrome, Edge, Firefox, Safari, etc.).
58+
1. Ensure you have the Tampermonkey extension installed.
59+
2. Click the link to install: [Stable Version](https://github.com/bili-qml-team/bili-qml/raw/refs/heads/main/src/bili-qml-tampermonkey/bili-qml.user.js) or [Dev Version](https://github.com/bili-qml-team/bili-qml/raw/refs/heads/dev/src/bili-qml-tampermonkey/bili-qml.user.js)
60+
61+
**Note: For the Tampermonkey script, you need to right-click the question mark button to open the leaderboard.**
62+
63+
---
64+
65+
### 📅 Roadmap (TODO)
66+
67+
- [x] **Fixed**
68+
- Issue where the icon was not properly hidden when scrolling down
69+
- Issue with simultaneously waking up the forwarding window (Thanks to bilibili@Logmeinu)
70+
- [x] **Supported**
71+
- Published on Chrome Web Store
72+
- Published on Edge Add-ons
73+
- Firefox Browser Support
74+
- Tampermonkey Userscript Support
75+
- [x] **New Features**
76+
- **Bot Protection (Altcha)**: Abuse prevention (Thanks to bilibili@巧克力棒好好吃啊qwq)
77+
- **Independent Leaderboard Page**
78+
- **Settings Panel**: Customize Danmaku preferences, API address
79+
- [ ] **Planned**
80+
- Support Bilibili Desktop Client
81+
- Code structure optimization and refactoring
82+
83+
---
84+
## 🛠 Tech Stack
85+
86+
- **Frontend**: HTML, CSS (Bilibili Style), JavaScript (Chrome Extension API)
87+
- **Backend**: Node.js (Express)
88+
89+
---
90+
91+
### 🤝 Contribution & Feedback
92+
93+
Thanks to the following contributors for their work on this project! 🎉
94+
95+
| Contributor | Contribution |
96+
| :---: | :--- |
97+
| <a href="https://github.com/Radekyspec"><img src="https://github.com/Radekyspec.png?size=50" width="50px;" style="border-radius: 50%;"/><br /><sub><b>Radekyspec</b></sub></a> | Database migration scripts, EO protection logic |
98+
| <a href="https://github.com/VanceHud"><img src="https://github.com/VanceHud.png?size=50" width="50px;" style="border-radius: 50%;"/><br /><sub><b>VanceHud</b></sub></a> | Firefox version, Tampermonkey version, Settings panel, Altcha integration |
99+
| <a href="https://github.com/ShiroAzusa64"><img src="https://github.com/ShiroAzusa64.png?size=50" width="50px;" style="border-radius: 50%;"/><br /><sub><b>ShiroAzusa64</b></sub></a> | Backend core logic for v1.2 |
100+
101+
**How to Contribute:** Welcome to submit Issues or Pull Requests!
102+
103+
I am not a CS major; writing code is just a hobby. My technical skills and time are limited. Welcome all tech experts to build together!
104+
105+
If you like this project, please give it a ⭐ **Star** to encourage me! OwO~
106+
107+
---
108+
109+
## 🔒 Privacy Policy
110+
111+
This extension respects user privacy and has passed strict security self-checks before being listed on the Chrome Web Store:
112+
113+
1. **Information Collection**: This extension only extracts the public `DedeUserID` (UID) from Bilibili as a unique identifier for voting. We **do not collect**, **read**, or **transmit** your Bilibili account password, SESSDATA, or any sensitive login credentials.
114+
2. **Data Usage**: The collected UID is only used to count votes, sync your voting status, and generate the leaderboard. It will not be used for any commercial purposes.
115+
3. **Permissions**: The `cookies` permission requested by the extension is only used to read the login status. The domain access permission is limited to `bilibili.com` and the extension's backend API.
116+
4. **Third-Party Sharing**: We monitor and promise not to share any user data with third parties.

0 commit comments

Comments
 (0)