重构: 将油猴脚本调整为通用版本

主要改动:
1. 移除微信公众号相关配置和检测规则
2. 将 @match 改为通配符 *://*/* 支持所有网站
3. 添加注释说明如何添加自定义网站检测规则
4. 保留通义听悟作为示例
5. 强调通用性,用户可自行扩展

脚本现在是真正的通用数据同步工具,不局限于特定网站。
This commit is contained in:
2026-08-14 10:20:39 +08:00
parent a3c23970d7
commit e985a1a143
2 changed files with 23 additions and 17 deletions
+13 -10
View File
@@ -58,7 +58,9 @@
let CONFIG = loadConfig();
// ==================== 项目检测规则 ====================
// 用户可以根据需要添加自己的检测规则
const PROJECT_RULES = [
// 示例:通义听悟
{
name: 'tingwu',
match: (url) => url.includes('tingwu.aliyun.com'),
@@ -77,16 +79,17 @@
},
loginUrl: 'https://tingwu.aliyun.com/'
},
{
name: 'wechat',
match: (url) => url.includes('mp.weixin.qq.com'),
getAccount: () => {
const accountElement = document.querySelector('.account_info_text');
return accountElement ? accountElement.textContent.trim() : 'admin';
},
loginUrl: 'https://mp.weixin.qq.com/'
},
// 添加更多项目...
// 可以在这里添加更多网站的检测规则
// 示例格式:
// {
// name: '网站名称',
// match: (url) => url.includes('example.com'),
// getAccount: () => {
// // 返回账号标识
// return 'user@example.com';
// },
// loginUrl: 'https://example.com/login'
// }
];
// ==================== 核心功能 ====================