// ==UserScript== // @name GitHub Fast // @namespace http://tampermonkey.net/ // @version 2.3 // @description GitHub 中国大陆优化:智能反代、自动汉化、加速下载、优化体验 - 性能优化版本 // @author You // @match *://github.com/* // @match *://www.github.com/* // @match *://raw.githubusercontent.com/* // @match *://gist.github.com/* // @match *://gh.072103.xyz/* // @match *://raw.gh.072103.xyz/* // @match *://gist.gh.072103.xyz/* // @match *://github.githubassets.com/* // @match *://codeload.github.com/* // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_setValue // @grant GM_getValue // @grant GM_registerMenuCommand // @grant GM_setClipboard // @grant GM_notification // @run-at document-start // ==/UserScript== (function() { 'use strict'; // 性能优化:DOM元素缓存和工具函数 const domCache = new Map(); const getElement = (selector) => { if (!domCache.has(selector)) { domCache.set(selector, document.querySelector(selector)); } return domCache.get(selector); }; const getElements = (selector) => { const cacheKey = `${selector}:all`; if (!domCache.has(cacheKey)) { domCache.set(cacheKey, document.querySelectorAll(selector)); } return domCache.get(cacheKey); }; const clearDomCache = () => domCache.clear(); // 内存优化和清理 const memoryManager = { intervals: new Set(), timeouts: new Set(), listeners: new Map(), // 安全的 setInterval setInterval: (callback, delay) => { const id = setInterval(callback, delay); memoryManager.intervals.add(id); return id; }, // 安全的 setTimeout setTimeout: (callback, delay) => { const id = setTimeout(callback, delay); memoryManager.timeouts.add(id); return id; }, // 安全的事件监听器 addEventListener: (element, event, callback, options = {}) => { element.addEventListener(event, callback, options); if (!memoryManager.listeners.has(element)) { memoryManager.listeners.set(element, []); } memoryManager.listeners.get(element).push({ event, callback }); }, // 清理所有资源 cleanup: () => { // 清理定时器 memoryManager.intervals.forEach(id => clearInterval(id)); memoryManager.timeouts.forEach(id => clearTimeout(id)); memoryManager.intervals.clear(); memoryManager.timeouts.clear(); // 清理事件监听器 memoryManager.listeners.forEach((listeners, element) => { listeners.forEach(({event, callback}) => { element.removeEventListener(event, callback); }); }); memoryManager.listeners.clear(); // 清理 DOM 缓存 clearDomCache(); } }; // 页面卸载时清理资源 window.addEventListener('beforeunload', memoryManager.cleanup); // 定期清理缓存 memoryManager.setInterval(() => { // 清理过期的 DOM 缓存 if (domCache.size > 100) { domCache.clear(); } // 强制垃圾回收(如果可用) if (window.gc) { window.gc(); } }, 60000); // 每分钟清理一次 // 防抖和节流工具函数 const debounce = (func, wait) => { let timeout; return function executedFunction(...args) { const later = () => { clearTimeout(timeout); func(...args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; }; const throttle = (func, limit) => { let inThrottle; return function(...args) { if (!inThrottle) { func.apply(this, args); inThrottle = true; setTimeout(() => inThrottle = false, limit); } }; }; const config = { excludePaths: [ '/login', '/signup', '/session', '/password_reset', '/join', '/pricing', '/features/copilot', '/github-copilot', '/copilot', '/settings/copilot', '/billing/copilot', '/oauth', '/auth' ], downloadMirrors: [ 'https://ghproxy.com/', 'https://mirror.ghproxy.com/', 'https://gh.api.99988866.xyz/', 'https://download.fastgit.org/', 'https://gh.gh2233.ml/' ], imageMirrors: { 'avatars.githubusercontent.com': 'avatars.gh.072103.xyz', 'user-images.githubusercontent.com': 'user-images.gh.072103.xyz', 'raw.githubusercontent.com': 'raw.gh.072103.xyz', 'repository-images.githubusercontent.com': 'repository-images.gh.072103.xyz', 'camo.githubusercontent.com': 'camo.gh.072103.xyz' }, enabledFeatures: GM_getValue('githubFastFeatures', { autoTranslate: true, downloadAcceleration: true, imageAcceleration: true, codeHighlight: true, quickCopy: true, fileTree: true, sizeDisplay: true, timeLocalization: true, layoutOptimization: true, darkModeEnhancement: true }) }; const currentPath = window.location.pathname; const currentUrl = window.location.href; function shouldRedirect() { for (let path of config.excludePaths) { if (currentPath.startsWith(path)) { return false; } } if (window.location.hostname.includes('072103.xyz')) { return false; } return true; } if (shouldRedirect()) { let newUrl = currentUrl .replace('github.com', 'gh.072103.xyz') .replace('raw.githubusercontent.com', 'raw.gh.072103.xyz') .replace('gist.github.com', 'gist.gh.072103.xyz'); if (newUrl !== currentUrl) { window.location.replace(newUrl); return; } } const translations = new Map([ ['Dashboard', '仪表盘'], ['Pull requests', '拉取请求'], ['Issues', '议题'], ['Marketplace', '应用市场'], ['Explore', '探索'], ['Sponsors', '赞助'], ['Settings', '设置'], ['Sign out', '退出登录'], ['Sign in', '登录'], ['Sign up', '注册'], ['Your profile', '个人资料'], ['Your repositories', '你的仓库'], ['Your projects', '你的项目'], ['Your stars', '你的星标'], ['Your gists', '你的代码片段'], ['Your organizations', '你的组织'], ['Your enterprises', '你的企业'], ['Upgrade', '升级'], ['Feature preview', '功能预览'], ['Help', '帮助'], ['Code', '代码'], ['Actions', '操作'], ['Projects', '项目'], ['Wiki', '维基'], ['Security', '安全'], ['Insights', '统计'], ['Discussions', '讨论'], ['Fork', '复刻'], ['Forked from', '复刻自'], ['Star', '星标'], ['Unstar', '取消星标'], ['Watch', '关注'], ['Unwatch', '取消关注'], ['Watching', '关注中'], ['Not watching', '未关注'], ['Ignoring', '已忽略'], ['Edit', '编辑'], ['Delete', '删除'], ['Archive', '归档'], ['Create new file', '新建文件'], ['Upload files', '上传文件'], ['Find file', '查找文件'], ['Clone', '克隆'], ['Download ZIP', '下载 ZIP'], ['Open with GitHub Desktop', '使用 GitHub Desktop 打开'], ['Open in Visual Studio', '在 Visual Studio 中打开'], ['Open with Visual Studio Code', '使用 VS Code 打开'], ['Copy path', '复制路径'], ['Copy permalink', '复制永久链接'], ['Commits', '提交'], ['Commit', '提交'], ['Branches', '分支'], ['Tags', '标签'], ['Contributors', '贡献者'], ['Compare', '比较'], ['Loading...', '加载中...'], ['Copy', '复制'], ['Copied!', '已复制!'], ['Browse files', '浏览文件'], ['New repository', '新建仓库'], ['Repository', '仓库'], ['Organization', '组织'], ['Public', '公开'], ['Private', '私有'], ['Description', '描述'], ['Website', '网站'], ['Topics', '主题'], ['License', '许可证'], ['Releases', '发布'], ['Packages', '包'], ['Languages', '语言'], ['README', '自述文件'], ['Activity', '活动'], ['now', '刚刚'], ['just now', '刚刚'], ['minutes ago', '分钟前'], ['minute ago', '分钟前'], ['hours ago', '小时前'], ['hour ago', '小时前'], ['days ago', '天前'], ['day ago', '天前'], ['months ago', '个月前'], ['month ago', '个月前'], ['years ago', '年前'], ['year ago', '年前'], ['yesterday', '昨天'], ['last week', '上周'], ['last month', '上个月'], ['last year', '去年'], ['on', '在'], ['Create', '创建'], ['Save', '保存'], ['Saving...', '保存中...'], ['Submit', '提交'], ['Cancel', '取消'], ['Close', '关闭'], ['Confirm', '确认'], ['Enable', '启用'], ['Disable', '禁用'], ['Update', '更新'], ['Remove', '移除'], ['Loading', '加载中'], ['Error', '错误'], ['Retry', '重试'], ['Search', '搜索'], ['Type to search', '输入以搜索'], ['Filter...', '筛选...'], ['All', '全部'], ['None', '无'], ['Done', '完成'], ['Apply', '应用'], ['Clear', '清除'], ['Homepage', '主页'], ['About', '关于'], ['Contact', '联系'], ['Help', '帮助'], ['Support', '支持'], ['Documentation', '文档'], ['Community', '社区'], ['Blog', '博客'], ['Status', '状态'], ['Terms', '条款'], ['Privacy', '隐私'], ['API', 'API'], ['Training', '培训'], ['Pricing', '价格'], ['Download', '下载'], ['Upload', '上传'], ['File', '文件'], ['Folder', '文件夹'], ['Image', '图片'], ['Video', '视频'], ['Audio', '音频'], ['Document', '文档'], ['Size', '大小'], ['Type', '类型'], ['Name', '名称'], ['Date', '日期'], ['Author', '作者'], ['Comment', '评论'], ['Review', '审查'], ['Approve', '批准'], ['Reject', '拒绝'], ['Merge', '合并'], ['Rebase', '变基'], ['Squash', '压缩'], ['Open', '开启'], ['Closed', '已关闭'], ['Merged', '已合并'], ['Draft', '草稿'], ['Ready', '准备就绪'], ['Pending', '待处理'], ['Success', '成功'], ['Failure', '失败'], ['Running', '运行中'], ['Cancelled', '已取消'], ['Skipped', '已跳过'], ['Pass', '通过'], ['Fail', '失败'], ['Build', '构建'], ['Test', '测试'], ['Deploy', '部署'], ['Release', '发布'], ['Version', '版本'], ['Latest', '最新'], ['Stable', '稳定'], ['Beta', '测试版'], ['Alpha', '内测版'], ['Preview', '预览'], ['Popular', '热门'], ['Trending', '趋势'], ['Featured', '精选'], ['New', '新'], ['Updated', '已更新'], ['Archived', '已归档'], ['Deprecated', '已弃用'], ['Experimental', '实验性'], ['Stable', '稳定'], ['Security', '安全'], ['Bug', '错误'], ['Enhancement', '增强'], ['Feature', '功能'], ['Fix', '修复'], ['Improvement', '改进'], ['Performance', '性能'], ['Refactor', '重构'], ['Style', '样式'], ['Chore', '杂务'], ['Documentation', '文档'], ['Example', '示例'], ['Tutorial', '教程'], ['Guide', '指南'], ['Reference', '参考'], ['API', 'API'], ['SDK', 'SDK'], ['Library', '库'], ['Framework', '框架'], ['Tool', '工具'], ['Plugin', '插件'], ['Extension', '扩展'], ['Theme', '主题'], ['Template', '模板'], ['Boilerplate', '样板'], ['Starter', '启动器'], ['Demo', '演示'], ['Sample', '示例'], ['Prototype', '原型'], ['Proof of concept', '概念验证'], ['Work in progress', '进行中'], ['Under development', '开发中'], ['Maintenance', '维护'], ['Inactive', '不活跃'], ['Abandoned', '已放弃'], ['Moved', '已移动'], ['Duplicate', '重复'], ['Invalid', '无效'], ['Resolved', '已解决'], ['Unresolved', '未解决'], ['Verified', '已验证'], ['Unverified', '未验证'], ['Confirmed', '已确认'], ['Unconfirmed', '未确认'], ['Assigned', '已分配'], ['Unassigned', '未分配'], ['Locked', '已锁定'], ['Unlocked', '已解锁'], ['Pinned', '已固定'], ['Unpinned', '已取消固定'], ['Starred', '已加星标'], ['Unstarred', '已取消星标'], ['Forked', '已复刻'], ['Watched', '已关注'], ['Unwatched', '已取消关注'], ['Subscribed', '已订阅'], ['Unsubscribed', '已取消订阅'], ['Blocked', '已屏蔽'], ['Unblocked', '已取消屏蔽'], ['Muted', '已静音'], ['Unmuted', '已取消静音'], ['Hidden', '已隐藏'], ['Visible', '可见'], ['Deleted', '已删除'], ['Restored', '已恢复'], ['Backed up', '已备份'], ['Synced', '已同步'], ['Offline', '离线'], ['Online', '在线'], ['Connected', '已连接'], ['Disconnected', '已断开'], ['Active', '活跃'], ['Inactive', '不活跃'], ['Enabled', '已启用'], ['Disabled', '已禁用'], ['On', '开启'], ['Off', '关闭'], ['Yes', '是'], ['No', '否'], ['True', '真'], ['False', '假'], ['Valid', '有效'], ['Invalid', '无效'], ['Required', '必需'], ['Optional', '可选'], ['Default', '默认'], ['Custom', '自定义'], ['Auto', '自动'], ['Manual', '手动'], ['Automatic', '自动'], ['Basic', '基本'], ['Advanced', '高级'], ['Expert', '专家'], ['Beginner', '初学者'], ['Intermediate', '中级'], ['Professional', '专业'], ['Personal', '个人'], ['Business', '商业'], ['Enterprise', '企业'], ['Free', '免费'], ['Paid', '付费'], ['Premium', '高级'], ['Pro', '专业版'], ['Team', '团队版'], ['Student', '学生版'], ['Developer', '开发者版'], ['Trial', '试用版'], ['Limited', '限制版'], ['Unlimited', '无限制'], ['Standard', '标准'], ['Extended', '扩展'], ['Full', '完整'], ['Partial', '部分'], ['Complete', '完成'], ['Incomplete', '未完成'], ['Total', '总计'], ['Subtotal', '小计'], ['Count', '计数'], ['Number', '数字'], ['Percentage', '百分比'], ['Ratio', '比率'], ['Rate', '速率'], ['Speed', '速度'], ['Duration', '持续时间'], ['Frequency', '频率'], ['Interval', '间隔'], ['Delay', '延迟'], ['Timeout', '超时'], ['Retry', '重试'], ['Attempt', '尝试'], ['Limit', '限制'], ['Maximum', '最大'], ['Minimum', '最小'], ['Average', '平均'], ['Median', '中位数'], ['Mode', '众数'], ['Range', '范围'], ['Standard deviation', '标准差'], ['Variance', '方差'], ['Correlation', '相关性'], ['Regression', '回归'], ['Prediction', '预测'], ['Forecast', '预报'], ['Trend', '趋势'], ['Pattern', '模式'], ['Anomaly', '异常'], ['Outlier', '异常值'], ['Noise', '噪声'], ['Signal', '信号'], ['Data', '数据'], ['Information', '信息'], ['Knowledge', '知识'], ['Wisdom', '智慧'], ['Insight', '洞察'], ['Analysis', '分析'], ['Report', '报告'], ['Dashboard', '仪表盘'], ['Chart', '图表'], ['Graph', '图形'], ['Plot', '绘图'], ['Diagram', '图表'], ['Visualization', '可视化'], ['Display', '显示'], ['View', '查看'], ['Show', '显示'], ['Hide', '隐藏'], ['Toggle', '切换'], ['Switch', '切换'], ['Select', '选择'], ['Choose', '选择'], ['Pick', '选择'], ['Option', '选项'], ['Setting', '设置'], ['Configuration', '配置'], ['Preference', '偏好'], ['Property', '属性'], ['Parameter', '参数'], ['Value', '值'], ['Variable', '变量'], ['Constant', '常量'], ['Function', '函数'], ['Method', '方法'], ['Procedure', '程序'], ['Process', '过程'], ['Algorithm', '算法'], ['Logic', '逻辑'], ['Condition', '条件'], ['Rule', '规则'], ['Policy', '政策'], ['Guideline', '指南'], ['Standard', '标准'], ['Specification', '规范'], ['Protocol', '协议'], ['Format', '格式'], ['Structure', '结构'], ['Schema', '架构'], ['Model', '模型'], ['Pattern', '模式'], ['Template', '模板'], ['Blueprint', '蓝图'], ['Design', '设计'], ['Architecture', '架构'], ['Implementation', '实现'], ['Development', '开发'], ['Programming', '编程'], ['Coding', '编码'], ['Script', '脚本'], ['Code', '代码'], ['Source', '源码'], ['Binary', '二进制'], ['Executable', '可执行文件'], ['Compile', '编译'], ['Build', '构建'], ['Deploy', '部署'], ['Install', '安装'], ['Setup', '设置'], ['Configure', '配置'], ['Initialize', '初始化'], ['Start', '开始'], ['Stop', '停止'], ['Pause', '暂停'], ['Resume', '恢复'], ['Restart', '重启'], ['Reset', '重置'], ['Refresh', '刷新'], ['Reload', '重新加载'], ['Sync', '同步'], ['Backup', '备份'], ['Restore', '恢复'], ['Import', '导入'], ['Export', '导出'], ['Transfer', '传输'], ['Copy', '复制'], ['Move', '移动'], ['Rename', '重命名'], ['Delete', '删除'], ['Remove', '移除'], ['Add', '添加'], ['Insert', '插入'], ['Append', '追加'], ['Prepend', '前置'], ['Replace', '替换'], ['Update', '更新'], ['Modify', '修改'], ['Edit', '编辑'], ['Change', '更改'], ['Adjust', '调整'], ['Customize', '自定义'], ['Personalize', '个性化'], ['Optimize', '优化'], ['Improve', '改进'], ['Enhance', '增强'], ['Upgrade', '升级'], ['Downgrade', '降级'], ['Migrate', '迁移'], ['Convert', '转换'], ['Transform', '转换'], ['Translate', '翻译'], ['Interpret', '解释'], ['Parse', '解析'], ['Validate', '验证'], ['Verify', '验证'], ['Check', '检查'], ['Test', '测试'], ['Debug', '调试'], ['Trace', '跟踪'], ['Monitor', '监控'], ['Log', '日志'], ['Record', '记录'], ['Track', '跟踪'], ['Measure', '测量'], ['Count', '计数'], ['Calculate', '计算'], ['Compute', '计算'], ['Process', '处理'], ['Execute', '执行'], ['Run', '运行'], ['Launch', '启动'], ['Open', '打开'], ['Close', '关闭'], ['Exit', '退出'], ['Quit', '退出'], ['Terminate', '终止'], ['Kill', '杀死'], ['Abort', '中止'], ['Cancel', '取消'], ['Skip', '跳过'], ['Ignore', '忽略'], ['Bypass', '绕过'], ['Override', '覆盖'], ['Force', '强制'], ['Allow', '允许'], ['Deny', '拒绝'], ['Grant', '授予'], ['Revoke', '撤销'], ['Authorize', '授权'], ['Authenticate', '认证'], ['Login', '登录'], ['Logout', '登出'], ['Signin', '登录'], ['Signout', '登出'], ['Signup', '注册'], ['Register', '注册'], ['Subscribe', '订阅'], ['Unsubscribe', '取消订阅'], ['Follow', '关注'], ['Unfollow', '取消关注'], ['Block', '屏蔽'], ['Unblock', '取消屏蔽'], ['Mute', '静音'], ['Unmute', '取消静音'], ['Like', '点赞'], ['Unlike', '取消点赞'], ['Favorite', '收藏'], ['Unfavorite', '取消收藏'], ['Bookmark', '书签'], ['Unbookmark', '取消书签'], ['Share', '分享'], ['Publish', '发布'], ['Unpublish', '取消发布'], ['Submit', '提交'], ['Send', '发送'], ['Receive', '接收'], ['Get', '获取'], ['Fetch', '获取'], ['Retrieve', '检索'], ['Search', '搜索'], ['Find', '查找'], ['Locate', '定位'], ['Discover', '发现'], ['Explore', '探索'], ['Browse', '浏览'], ['Navigate', '导航'], ['Go', '前往'], ['Visit', '访问'], ['Enter', '进入'], ['Leave', '离开'], ['Return', '返回'], ['Back', '返回'], ['Forward', '前进'], ['Next', '下一个'], ['Previous', '上一个'], ['First', '第一个'], ['Last', '最后一个'], ['Begin', '开始'], ['End', '结束'], ['Finish', '完成'], ['Complete', '完成'], ['Continue', '继续'], ['Proceed', '继续'], ['Advance', '前进'], ['Progress', '进度'], ['Step', '步骤'], ['Stage', '阶段'], ['Phase', '阶段'], ['Level', '级别'], ['Degree', '程度'], ['Grade', '等级'], ['Rank', '排名'], ['Position', '位置'], ['Location', '位置'], ['Place', '地点'], ['Address', '地址'], ['URL', '网址'], ['Link', '链接'], ['Connection', '连接'], ['Network', '网络'], ['Internet', '互联网'], ['Web', '网络'], ['Website', '网站'], ['Page', '页面'], ['Site', '网站'], ['Portal', '门户'], ['Platform', '平台'], ['Service', '服务'], ['Application', '应用'], ['App', '应用'], ['Program', '程序'], ['Software', '软件'], ['System', '系统'], ['Tool', '工具'], ['Utility', '实用程序'], ['Widget', '小工具'], ['Component', '组件'], ['Module', '模块'], ['Plugin', '插件'], ['Extension', '扩展'], ['Addon', '附加组件'], ['Package', '包'], ['Library', '库'], ['Framework', '框架'], ['Engine', '引擎'], ['Driver', '驱动程序'], ['Interface', '接口'], ['API', 'API'], ['SDK', 'SDK'], ['Database', '数据库'], ['Storage', '存储'], ['Memory', '内存'], ['Cache', '缓存'], ['Buffer', '缓冲区'], ['Queue', '队列'], ['Stack', '堆栈'], ['List', '列表'], ['Array', '数组'], ['Set', '集合'], ['Map', '映射'], ['Hash', '哈希'], ['Tree', '树'], ['Graph', '图'], ['Node', '节点'], ['Edge', '边'], ['Path', '路径'], ['Route', '路由'], ['Channel', '通道'], ['Stream', '流'], ['Thread', '线程'], ['Process', '进程'], ['Task', '任务'], ['Job', '作业'], ['Operation', '操作'], ['Action', '操作'], ['Activity', '活动'], ['Event', '事件'], ['Trigger', '触发器'], ['Handler', '处理器'], ['Callback', '回调'], ['Hook', '钩子'], ['Listener', '监听器'], ['Observer', '观察者'], ['Subscriber', '订阅者'], ['Publisher', '发布者'], ['Producer', '生产者'], ['Consumer', '消费者'], ['Client', '客户端'], ['Server', '服务器'], ['Host', '主机'], ['Guest', '客户'], ['User', '用户'], ['Admin', '管理员'], ['Administrator', '管理员'], ['Owner', '所有者'], ['Member', '成员'], ['Guest', '访客'], ['Visitor', '访问者'], ['Viewer', '查看者'], ['Editor', '编辑者'], ['Author', '作者'], ['Creator', '创建者'], ['Contributor', '贡献者'], ['Collaborator', '协作者'], ['Maintainer', '维护者'], ['Developer', '开发者'], ['Programmer', '程序员'], ['Engineer', '工程师'], ['Architect', '架构师'], ['Designer', '设计师'], ['Analyst', '分析师'], ['Tester', '测试员'], ['Reviewer', '审查员'], ['Moderator', '版主'], ['Supervisor', '监督者'], ['Manager', '经理'], ['Director', '主管'], ['Executive', '执行官'], ['Leader', '领导'], ['Team', '团队'], ['Group', '组'], ['Department', '部门'], ['Division', '部门'], ['Unit', '单位'], ['Organization', '组织'], ['Company', '公司'], ['Corporation', '公司'], ['Business', '企业'], ['Enterprise', '企业'], ['Institution', '机构'], ['Agency', '代理机构'], ['Office', '办公室'], ['Branch', '分支'], ['Headquarters', '总部'], ['Subsidiary', '子公司'], ['Partner', '合作伙伴'], ['Vendor', '供应商'], ['Supplier', '供应商'], ['Customer', '客户'], ['Client', '客户'], ['Stakeholder', '利益相关者'], ['Sponsor', '赞助商'], ['Investor', '投资者'], ['Donor', '捐赠者'], ['Supporter', '支持者'], ['Advocate', '倡导者'], ['Champion', '冠军'], ['Expert', '专家'], ['Specialist', '专家'], ['Professional', '专业人士'], ['Consultant', '顾问'], ['Advisor', '顾问'], ['Mentor', '导师'], ['Coach', '教练'], ['Trainer', '培训师'], ['Instructor', '讲师'], ['Teacher', '教师'], ['Professor', '教授'], ['Student', '学生'], ['Learner', '学习者'], ['Participant', '参与者'], ['Attendee', '与会者'], ['Audience', '观众'], ['Reader', '读者'], ['Writer', '作者'], ['Speaker', '演讲者'], ['Presenter', '演示者'], ['Host', '主持人'], ['Moderator', '主持人'], ['Interviewer', '面试官'], ['Interviewee', '面试者'], ['Candidate', '候选人'], ['Applicant', '申请人'], ['Recruit', '招聘'], ['Employee', '员工'], ['Worker', '工人'], ['Staff', '员工'], ['Personnel', '人员'], ['Workforce', '劳动力'], ['Volunteer', '志愿者'], ['Intern', '实习生'], ['Contractor', '承包商'], ['Freelancer', '自由职业者'], ['Consultant', '顾问'], ['Specialist', '专家'], ['Technician', '技术员'], ['Operator', '操作员'], ['Assistant', '助手'], ['Secretary', '秘书'], ['Clerk', '职员'], ['Representative', '代表'], ['Agent', '代理人'], ['Broker', '经纪人'], ['Dealer', '经销商'], ['Retailer', '零售商'], ['Wholesaler', '批发商'], ['Distributor', '分销商'], ['Reseller', '经销商'], ['Merchant', '商人'], ['Trader', '交易员'], ['Buyer', '买方'], ['Seller', '卖方'], ['Purchaser', '采购员'], ['Vendor', '供应商'], ['Provider', '提供者'], ['Supplier', '供应商'], ['Manufacturer', '制造商'], ['Producer', '生产商'], ['Creator', '创造者'], ['Maker', '制造者'], ['Builder', '建造者'], ['Constructor', '建造者'], ['Installer', '安装者'], ['Assembler', '装配工'], ['Mechanic', '机械师'], ['Technician', '技术员'], ['Repairman', '修理工'], ['Maintenance', '维护'], ['Support', '支持'], ['Service', '服务'], ['Assistance', '协助'], ['Guidance', '指导'], ['Instruction', '指导'], ['Direction', '方向'], ['Supervision', '监督'], ['Management', '管理'], ['Administration', '管理'], ['Leadership', '领导'], ['Governance', '治理'], ['Control', '控制'], ['Oversight', '监督'], ['Monitoring', '监控'], ['Tracking', '跟踪'], ['Surveillance', '监视'], ['Inspection', '检查'], ['Audit', '审计'], ['Review', '审查'], ['Evaluation', '评估'], ['Assessment', '评估'], ['Analysis', '分析'], ['Research', '研究'], ['Investigation', '调查'], ['Study', '研究'], ['Survey', '调查'], ['Poll', '投票'], ['Vote', '投票'], ['Election', '选举'], ['Selection', '选择'], ['Choice', '选择'], ['Decision', '决定'], ['Judgment', '判断'], ['Opinion', '意见'], ['Viewpoint', '观点'], ['Perspective', '观点'], ['Standpoint', '立场'], ['Position', '立场'], ['Stance', '立场'], ['Attitude', '态度'], ['Approach', '方法'], ['Method', '方法'], ['Technique', '技术'], ['Strategy', '策略'], ['Tactic', '策略'], ['Plan', '计划'], ['Scheme', '方案'], ['Program', '程序'], ['Project', '项目'], ['Initiative', '倡议'], ['Campaign', '活动'], ['Drive', '驱动'], ['Effort', '努力'], ['Attempt', '尝试'], ['Try', '尝试'], ['Experiment', '实验'], ['Trial', '试验'], ['Pilot', '试点'], ['Prototype', '原型'], ['Model', '模型'], ['Sample', '样本'], ['Example', '例子'], ['Instance', '实例'], ['Case', '案例'], ['Scenario', '情况'], ['Situation', '情况'], ['Circumstance', '情况'], ['Condition', '条件'], ['State', '状态'], ['Status', '状态'], ['Mode', '模式'], ['Phase', '阶段'], ['Stage', '阶段'], ['Step', '步骤'], ['Procedure', '程序'], ['Process', '过程'], ['Workflow', '工作流'], ['Pipeline', '管道'], ['Chain', '链'], ['Sequence', '序列'], ['Series', '系列'], ['Set', '集合'], ['Collection', '集合'], ['Group', '组'], ['Batch', '批次'], ['Bundle', '捆绑'], ['Package', '包'], ['Kit', '工具包'], ['Suite', '套件'], ['Stack', '堆栈'], ['Cluster', '集群'], ['Array', '数组'], ['Matrix', '矩阵'], ['Grid', '网格'], ['Table', '表格'], ['Chart', '图表'], ['Graph', '图形'], ['Diagram', '图表'], ['Map', '地图'], ['Layout', '布局'], ['Design', '设计'], ['Pattern', '模式'], ['Style', '样式'], ['Theme', '主题'], ['Template', '模板'], ['Format', '格式'], ['Structure', '结构'], ['Framework', '框架'], ['Architecture', '架构'], ['Blueprint', '蓝图'], ['Specification', '规范'], ['Standard', '标准'], ['Protocol', '协议'], ['Convention', '约定'], ['Guideline', '指南'], ['Rule', '规则'], ['Policy', '政策'], ['Regulation', '法规'], ['Law', '法律'], ['Legislation', '立法'], ['Act', '法案'], ['Bill', '法案'], ['Statute', '法规'], ['Code', '代码'], ['Charter', '章程'], ['Constitution', '宪法'], ['Agreement', '协议'], ['Contract', '合同'], ['Deal', '交易'], ['Transaction', '交易'], ['Exchange', '交换'], ['Trade', '贸易'], ['Commerce', '商业'], ['Business', '业务'], ['Industry', '行业'], ['Sector', '部门'], ['Market', '市场'], ['Economy', '经济'], ['Finance', '金融'], ['Banking', '银行业'], ['Investment', '投资'], ['Fund', '基金'], ['Capital', '资本'], ['Asset', '资产'], ['Property', '财产'], ['Wealth', '财富'], ['Money', '金钱'], ['Currency', '货币'], ['Cash', '现金'], ['Credit', '信用'], ['Debt', '债务'], ['Loan', '贷款'], ['Interest', '利息'], ['Rate', '利率'], ['Price', '价格'], ['Cost', '成本'], ['Expense', '费用'], ['Budget', '预算'], ['Revenue', '收入'], ['Income', '收入'], ['Profit', '利润'], ['Loss', '损失'], ['Gain', '收益'], ['Return', '回报'], ['Yield', '收益'], ['Dividend', '股息'], ['Bonus', '奖金'], ['Reward', '奖励'], ['Prize', '奖品'], ['Award', '奖励'], ['Recognition', '认可'], ['Achievement', '成就'], ['Success', '成功'], ['Accomplishment', '成就'], ['Victory', '胜利'], ['Win', '获胜'], ['Triumph', '胜利'], ['Conquest', '征服'], ['Defeat', '失败'], ['Loss', '失败'], ['Failure', '失败'], ['Setback', '挫折'], ['Obstacle', '障碍'], ['Challenge', '挑战'], ['Problem', '问题'], ['Issue', '问题'], ['Difficulty', '困难'], ['Trouble', '麻烦'], ['Crisis', '危机'], ['Emergency', '紧急情况'], ['Urgent', '紧急'], ['Critical', '关键'], ['Important', '重要'], ['Significant', '重要'], ['Major', '主要'], ['Minor', '次要'], ['Primary', '主要'], ['Secondary', '次要'], ['Main', '主要'], ['Central', '中心'], ['Core', '核心'], ['Essential', '必要'], ['Fundamental', '基本'], ['Basic', '基本'], ['Elementary', '基本'], ['Simple', '简单'], ['Complex', '复杂'], ['Complicated', '复杂'], ['Difficult', '困难'], ['Hard', '困难'], ['Easy', '容易'], ['Simple', '简单'], ['Clear', '清楚'], ['Obvious', '明显'], ['Evident', '明显'], ['Apparent', '明显'], ['Visible', '可见'], ['Hidden', '隐藏'], ['Secret', '秘密'], ['Confidential', '机密'], ['Private', '私人'], ['Personal', '个人'], ['Individual', '个人'], ['Unique', '独特'], ['Special', '特殊'], ['Rare', '稀有'], ['Common', '常见'], ['Typical', '典型'], ['Normal', '正常'], ['Regular', '常规'], ['Ordinary', '普通'], ['Standard', '标准'], ['Average', '平均'], ['Usual', '通常'], ['General', '一般'], ['Specific', '具体'], ['Particular', '特定'], ['Exact', '确切'], ['Precise', '精确'], ['Accurate', '准确'], ['Correct', '正确'], ['Right', '正确'], ['Wrong', '错误'], ['Incorrect', '不正确'], ['False', '错误'], ['True', '正确'], ['Real', '真实'], ['Actual', '实际'], ['Genuine', '真正'], ['Authentic', '真实'], ['Original', '原始'], ['First', '第一'], ['Initial', '初始'], ['Beginning', '开始'], ['Start', '开始'], ['Origin', '起源'], ['Source', '来源'], ['Root', '根'], ['Base', '基础'], ['Foundation', '基础'], ['Ground', '基础'], ['Bottom', '底部'], ['Top', '顶部'], ['Peak', '顶峰'], ['Summit', '顶点'], ['Height', '高度'], ['Depth', '深度'], ['Width', '宽度'], ['Length', '长度'], ['Size', '大小'], ['Scale', '规模'], ['Scope', '范围'], ['Extent', '程度'], ['Degree', '程度'], ['Level', '水平'], ['Grade', '等级'], ['Quality', '质量'], ['Quantity', '数量'], ['Amount', '数量'], ['Volume', '体积'], ['Capacity', '容量'], ['Limit', '限制'], ['Boundary', '边界'], ['Border', '边界'], ['Edge', '边缘'], ['Margin', '边缘'], ['Side', '边'], ['Corner', '角'], ['Angle', '角度'], ['Direction', '方向'], ['Way', '方式'], ['Path', '路径'], ['Route', '路线'], ['Road', '道路'], ['Street', '街道'], ['Avenue', '大道'], ['Lane', '小巷'], ['Highway', '高速公路'], ['Bridge', '桥'], ['Tunnel', '隧道'], ['Gate', '门'], ['Door', '门'], ['Window', '窗户'], ['Wall', '墙'], ['Floor', '地板'], ['Ceiling', '天花板'], ['Roof', '屋顶'], ['Building', '建筑'], ['House', '房子'], ['Home', '家'], ['Office', '办公室'], ['Room', '房间'], ['Space', '空间'], ['Area', '区域'], ['Zone', '区域'], ['Region', '地区'], ['Territory', '领土'], ['District', '区'], ['Neighborhood', '社区'], ['Community', '社区'], ['Society', '社会'], ['Culture', '文化'], ['Tradition', '传统'], ['Custom', '习俗'], ['Habit', '习惯'], ['Practice', '实践'], ['Behavior', '行为'], ['Conduct', '行为'], ['Action', '行动'], ['Activity', '活动'], ['Movement', '运动'], ['Motion', '运动'], ['Change', '变化'], ['Shift', '转变'], ['Transition', '过渡'], ['Transformation', '转换'], ['Evolution', '进化'], ['Development', '发展'], ['Growth', '增长'], ['Progress', '进步'], ['Improvement', '改进'], ['Advancement', '进步'], ['Innovation', '创新'], ['Invention', '发明'], ['Discovery', '发现'], ['Creation', '创造'], ['Generation', '生成'], ['Production', '生产'], ['Manufacturing', '制造'], ['Construction', '建设'], ['Assembly', '装配'], ['Installation', '安装'], ['Setup', '设置'], ['Configuration', '配置'], ['Adjustment', '调整'], ['Modification', '修改'], ['Alteration', '更改'], ['Revision', '修订'], ['Update', '更新'], ['Upgrade', '升级'], ['Enhancement', '增强'], ['Improvement', '改进'], ['Optimization', '优化'], ['Refinement', '完善'], ['Polishing', '打磨'], ['Finishing', '完成'], ['Completion', '完成'], ['Achievement', '成就'], ['Accomplishment', '成就'], ['Attainment', '达到'], ['Fulfillment', '实现'], ['Realization', '实现'], ['Implementation', '实现'], ['Execution', '执行'], ['Performance', '性能'], ['Operation', '操作'], ['Function', '功能'], ['Feature', '特性'], ['Capability', '能力'], ['Skill', '技能'], ['Talent', '才能'], ['Ability', '能力'], ['Capacity', '容量'], ['Potential', '潜力'], ['Power', '力量'], ['Strength', '力量'], ['Force', '力'], ['Energy', '能量'], ['Effort', '努力'], ['Work', '工作'], ['Labor', '劳动'], ['Task', '任务'], ['Job', '工作'], ['Assignment', '分配'], ['Mission', '任务'], ['Purpose', '目的'], ['Goal', '目标'], ['Objective', '目标'], ['Target', '目标'], ['Aim', '目标'], ['Intention', '意图'], ['Plan', '计划'], ['Strategy', '策略'], ['Approach', '方法'], ['Method', '方法'], ['Technique', '技术'], ['Procedure', '程序'], ['Process', '过程'], ['System', '系统'], ['Mechanism', '机制'], ['Structure', '结构'], ['Organization', '组织'], ['Arrangement', '安排'], ['Order', '顺序'], ['Sequence', '序列'], ['Series', '系列'], ['Pattern', '模式'], ['Rhythm', '节奏'], ['Cycle', '周期'], ['Loop', '循环'], ['Repetition', '重复'], ['Frequency', '频率'], ['Rate', '速率'], ['Speed', '速度'], ['Pace', '步伐'], ['Tempo', '节拍'], ['Time', '时间'], ['Duration', '持续时间'], ['Period', '时期'], ['Interval', '间隔'], ['Gap', '间隙'], ['Break', '休息'], ['Pause', '暂停'], ['Stop', '停止'], ['End', '结束'], ['Finish', '完成'], ['Conclusion', '结论'], ['Result', '结果'], ['Outcome', '结果'], ['Consequence', '后果'], ['Effect', '效果'], ['Impact', '影响'], ['Influence', '影响'], ['Affect', '影响'], ['Change', '改变'], ['Alteration', '更改'], ['Modification', '修改'], ['Adjustment', '调整'], ['Correction', '纠正'], ['Fix', '修复'], ['Repair', '修复'], ['Maintenance', '维护'], ['Service', '服务'], ['Support', '支持'], ['Help', '帮助'], ['Assistance', '帮助'], ['Aid', '援助'], ['Relief', '救济'], ['Rescue', '救援'], ['Protection', '保护'], ['Safety', '安全'], ['Security', '安全'], ['Defense', '防御'], ['Guard', '守卫'], ['Shield', '盾牌'], ['Barrier', '障碍'], ['Obstacle', '障碍'], ['Block', '阻挡'], ['Prevention', '预防'], ['Control', '控制'], ['Management', '管理'], ['Supervision', '监督'], ['Oversight', '监督'], ['Monitoring', '监控'], ['Observation', '观察'], ['Inspection', '检查'], ['Examination', '检查'], ['Investigation', '调查'], ['Research', '研究'], ['Study', '研究'], ['Analysis', '分析'], ['Evaluation', '评估'], ['Assessment', '评估'], ['Review', '审查'], ['Audit', '审计'], ['Test', '测试'], ['Trial', '试验'], ['Experiment', '实验'], ['Sample', '样本'], ['Specimen', '标本'], ['Example', '例子'], ['Instance', '实例'], ['Case', '案例'], ['Model', '模型'], ['Template', '模板'], ['Pattern', '模式'], ['Standard', '标准'], ['Norm', '规范'], ['Rule', '规则'], ['Law', '法律'], ['Regulation', '法规'], ['Policy', '政策'], ['Principle', '原则'], ['Guideline', '指南'], ['Instruction', '指令'], ['Command', '命令'], ['Order', '命令'], ['Request', '请求'], ['Demand', '需求'], ['Requirement', '要求'], ['Need', '需要'], ['Want', '想要'], ['Desire', '渴望'], ['Wish', '希望'], ['Hope', '希望'], ['Expectation', '期望'], ['Anticipation', '预期'], ['Prediction', '预测'], ['Forecast', '预报'], ['Estimate', '估计'], ['Guess', '猜测'], ['Assumption', '假设'], ['Hypothesis', '假设'], ['Theory', '理论'], ['Concept', '概念'], ['Idea', '想法'], ['Thought', '想法'], ['Notion', '概念'], ['Understanding', '理解'], ['Comprehension', '理解'], ['Knowledge', '知识'], ['Information', '信息'], ['Data', '数据'], ['Facts', '事实'], ['Evidence', '证据'], ['Proof', '证明'], ['Confirmation', '确认'], ['Verification', '验证'], ['Validation', '验证'], ['Approval', '批准'], ['Authorization', '授权'], ['Permission', '许可'], ['License', '许可证'], ['Certificate', '证书'], ['Credential', '凭证'], ['Qualification', '资格'], ['Certification', '认证'], ['Accreditation', '认可'], ['Recognition', '认可'], ['Acknowledgment', '确认'], ['Acceptance', '接受'], ['Agreement', '同意'], ['Consent', '同意'], ['Approval', '批准'], ['Support', '支持'], ['Endorsement', '认可'], ['Recommendation', '推荐'], ['Suggestion', '建议'], ['Advice', '建议'], ['Guidance', '指导'], ['Direction', '方向'], ['Leadership', '领导'], ['Management', '管理'], ['Administration', '管理'], ['Governance', '治理'], ['Authority', '权威'], ['Power', '权力'], ['Control', '控制'], ['Influence', '影响'], ['Impact', '影响'], ['Effect', '效果'], ['Result', '结果'], ['Outcome', '结果'], ['Consequence', '后果'], ['Implication', '含义'], ['Meaning', '意义'], ['Significance', '意义'], ['Importance', '重要性'], ['Value', '价值'], ['Worth', '价值'], ['Benefit', '好处'], ['Advantage', '优势'], ['Profit', '利润'], ['Gain', '收益'], ['Return', '回报'], ['Reward', '奖励'], ['Prize', '奖品'], ['Award', '奖励'], ['Honor', '荣誉'], ['Recognition', '认可'], ['Appreciation', '赞赏'], ['Gratitude', '感谢'], ['Thanks', '谢谢'], ['Welcome', '欢迎'], ['Greeting', '问候'], ['Hello', '你好'], ['Hi', '嗨'], ['Goodbye', '再见'], ['Farewell', '告别'], ['See you', '再见'], ['Bye', '再见'], ['Take care', '保重'], ['Good luck', '祝你好运'], ['Congratulations', '恭喜'], ['Well done', '做得好'], ['Excellent', '优秀'], ['Great', '很好'], ['Good', '好'], ['Fine', '好'], ['Okay', '好的'], ['Alright', '好的'], ['Sure', '当然'], ['Certainly', '当然'], ['Absolutely', '绝对'], ['Definitely', '肯定'], ['Probably', '可能'], ['Maybe', '也许'], ['Perhaps', '也许'], ['Possibly', '可能'], ['Likely', '可能'], ['Unlikely', '不太可能'], ['Impossible', '不可能'], ['Possible', '可能'], ['Feasible', '可行'], ['Viable', '可行'], ['Practical', '实用'], ['Realistic', '现实'], ['Reasonable', '合理'], ['Logical', '逻辑'], ['Sensible', '明智'], ['Wise', '明智'], ['Smart', '聪明'], ['Intelligent', '聪明'], ['Clever', '聪明'], ['Brilliant', '聪明'], ['Genius', '天才'], ['Talented', '有才华'], ['Skilled', '有技能'], ['Experienced', '有经验'], ['Expert', '专家'], ['Professional', '专业'], ['Competent', '能干'], ['Capable', '有能力'], ['Able', '能够'], ['Qualified', '合格'], ['Suitable', '合适'], ['Appropriate', '合适'], ['Proper', '正确'], ['Correct', '正确'], ['Right', '正确'], ['Accurate', '准确'], ['Precise', '精确'], ['Exact', '确切'], ['Perfect', '完美'], ['Ideal', '理想'], ['Excellent', '优秀'], ['Outstanding', '杰出'], ['Exceptional', '杰出'], ['Remarkable', '非凡'], ['Amazing', '惊人'], ['Incredible', '不可思议'], ['Fantastic', '极好'], ['Wonderful', '精彩'], ['Marvelous', '精彩'], ['Superb', '极好'], ['Splendid', '极好'], ['Magnificent', '宏伟'], ['Impressive', '令人印象深刻'], ['Spectacular', '壮观'], ['Stunning', '惊人'], ['Beautiful', '美丽'], ['Attractive', '吸引人'], ['Appealing', '吸引人'], ['Charming', '迷人'], ['Lovely', '可爱'], ['Nice', '不错'], ['Pleasant', '愉快'], ['Enjoyable', '令人愉快'], ['Fun', '有趣'], ['Entertaining', '有趣'], ['Interesting', '有趣'], ['Exciting', '令人兴奋'], ['Thrilling', '令人兴奋'], ['Fascinating', '迷人'], ['Intriguing', '引人入胜'], ['Captivating', '迷人'], ['Engaging', '吸引人'], ['Compelling', '令人信服'], ['Persuasive', '有说服力'], ['Convincing', '令人信服'], ['Believable', '可信'], ['Credible', '可信'], ['Reliable', '可靠'], ['Trustworthy', '值得信赖'], ['Dependable', '可靠'], ['Stable', '稳定'], ['Solid', '坚实'], ['Strong', '强'], ['Powerful', '强大'], ['Mighty', '强大'], ['Robust', '强壮'], ['Sturdy', '坚固'], ['Durable', '耐用'], ['Lasting', '持久'], ['Permanent', '永久'], ['Temporary', '临时'], ['Brief', '简短'], ['Short', '短'], ['Quick', '快'], ['Fast', '快'], ['Rapid', '快速'], ['Swift', '迅速'], ['Speedy', '快速'], ['Immediate', '立即'], ['Instant', '即时'], ['Sudden', '突然'], ['Abrupt', '突然'], ['Unexpected', '意外'], ['Surprising', '令人惊讶'], ['Shocking', '令人震惊'], ['Astonishing', '令人惊讶'], ['Startling', '令人震惊'], ['Alarming', '令人担忧'], ['Concerning', '令人担忧'], ['Worrying', '令人担忧'], ['Troubling', '令人烦恼'], ['Disturbing', '令人不安'], ['Upsetting', '令人不安'], ['Annoying', '令人烦恼'], ['Irritating', '令人烦恼'], ['Frustrating', '令人沮丧'], ['Disappointing', '令人失望'], ['Sad', '悲伤'], ['Unhappy', '不开心'], ['Depressed', '沮丧'], ['Miserable', '痛苦'], ['Awful', '糟糕'], ['Terrible', '糟糕'], ['Horrible', '可怕'], ['Dreadful', '可怕'], ['Frightening', '可怕'], ['Scary', '可怕'], ['Dangerous', '危险'], ['Risky', '有风险'], ['Hazardous', '危险'], ['Unsafe', '不安全'], ['Insecure', '不安全'], ['Vulnerable', '脆弱'], ['Weak', '弱'], ['Fragile', '脆弱'], ['Delicate', '精致'], ['Sensitive', '敏感'], ['Careful', '小心'], ['Cautious', '谨慎'], ['Prudent', '谨慎'], ['Wise', '明智'], ['Thoughtful', '深思熟虑'], ['Considerate', '体贴'], ['Kind', '善良'], ['Gentle', '温和'], ['Mild', '温和'], ['Soft', '软'], ['Smooth', '平滑'], ['Rough', '粗糙'], ['Hard', '硬'], ['Tough', '坚韧'], ['Difficult', '困难'], ['Challenging', '挑战性'], ['Complex', '复杂'], ['Complicated', '复杂'], ['Confusing', '令人困惑'], ['Unclear', '不清楚'], ['Ambiguous', '模糊'], ['Vague', '模糊'], ['Uncertain', '不确定'], ['Doubtful', '怀疑'], ['Questionable', '可疑'], ['Suspicious', '可疑'], ['Strange', '奇怪'], ['Odd', '奇怪'], ['Unusual', '不寻常'], ['Weird', '奇怪'], ['Bizarre', '奇异'], ['Peculiar', '奇特'], ['Curious', '好奇'], ['Mysterious', '神秘'], ['Unknown', '未知'], ['Unfamiliar', '不熟悉'], ['Foreign', '外国'], ['Alien', '外来'], ['Different', '不同'], ['Distinct', '不同'], ['Separate', '分开'], ['Individual', '个人'], ['Single', '单一'], ['Alone', '独自'], ['Lonely', '孤独'], ['Isolated', '孤立'], ['Remote', '遥远'], ['Distant', '遥远'], ['Far', '远'], ['Close', '近'], ['Near', '附近'], ['Nearby', '附近'], ['Adjacent', '相邻'], ['Next', '下一个'], ['Following', '跟随'], ['Subsequent', '随后'], ['Later', '后来'], ['After', '之后'], ['Before', '之前'], ['Earlier', '更早'], ['Previous', '以前'], ['Prior', '之前'], ['Former', '以前'], ['Past', '过去'], ['Present', '现在'], ['Current', '当前'], ['Existing', '现有'], ['Available', '可用'], ['Accessible', '可访问'], ['Reachable', '可达到'], ['Obtainable', '可获得'], ['Achievable', '可达到'], ['Attainable', '可达到'], ['Possible', '可能'], ['Feasible', '可行'], ['Practical', '实用'], ['Useful', '有用'], ['Helpful', '有帮助'], ['Beneficial', '有益'], ['Valuable', '有价值'], ['Important', '重要'], ['Essential', '必要'], ['Necessary', '必要'], ['Required', '必需'], ['Mandatory', '强制'], ['Compulsory', '强制'], ['Obligatory', '义务'], ['Optional', '可选'], ['Voluntary', '自愿'], ['Free', '免费'], ['Paid', '付费'], ['Expensive', '昂贵'], ['Costly', '昂贵'], ['Cheap', '便宜'], ['Affordable', '负担得起'], ['Reasonable', '合理'], ['Fair', '公平'], ['Just', '公正'], ['Equal', '平等'], ['Balanced', '平衡'], ['Neutral', '中性'], ['Objective', '客观'], ['Subjective', '主观'], ['Personal', '个人'], ['Private', '私人'], ['Confidential', '机密'], ['Secret', '秘密'], ['Hidden', '隐藏'], ['Invisible', '看不见'], ['Transparent', '透明'], ['Clear', '清楚'], ['Obvious', '明显'], ['Evident', '明显'], ['Apparent', '明显'], ['Visible', '可见'], ['Noticeable', '明显'], ['Prominent', '突出'], ['Outstanding', '杰出'], ['Remarkable', '非凡'], ['Notable', '值得注意'], ['Significant', '重要'], ['Major', '主要'], ['Minor', '次要'], ['Trivial', '微不足道'], ['Insignificant', '无关紧要'], ['Unimportant', '不重要'], ['Irrelevant', '无关'], ['Relevant', '相关'], ['Related', '相关'], ['Connected', '连接'], ['Linked', '链接'], ['Associated', '相关'], ['Attached', '附加'], ['Joined', '连接'], ['Combined', '结合'], ['Merged', '合并'], ['United', '联合'], ['Together', '一起'], ['Apart', '分开'], ['Separate', '分开'], ['Divided', '分开'], ['Split', '分裂'], ['Broken', '破碎'], ['Damaged', '损坏'], ['Destroyed', '摧毁'], ['Ruined', '毁坏'], ['Wrecked', '毁坏'], ['Spoiled', '损坏'], ['Corrupted', '损坏'], ['Infected', '感染'], ['Contaminated', '污染'], ['Polluted', '污染'], ['Dirty', '脏'], ['Clean', '干净'], ['Pure', '纯'], ['Fresh', '新鲜'], ['New', '新'], ['Recent', '最近'], ['Latest', '最新'], ['Modern', '现代'], ['Contemporary', '当代'], ['Current', '当前'], ['Present', '现在'], ['Today', '今天'], ['Tomorrow', '明天'], ['Yesterday', '昨天'], ['Future', '未来'], ['Past', '过去'], ['History', '历史'], ['Tradition', '传统'], ['Heritage', '遗产'], ['Legacy', '遗产'], ['Inheritance', '继承'], ['Generation', '一代'], ['Age', '年龄'], ['Era', '时代'], ['Period', '时期'], ['Time', '时间'], ['Moment', '时刻'], ['Instant', '瞬间'], ['Second', '秒'], ['Minute', '分钟'], ['Hour', '小时'], ['Day', '天'], ['Week', '周'], ['Month', '月'], ['Year', '年'], ['Decade', '十年'], ['Century', '世纪'], ['Millennium', '千年'], ['Always', '总是'], ['Never', '从不'], ['Sometimes', '有时'], ['Often', '经常'], ['Rarely', '很少'], ['Seldom', '很少'], ['Frequently', '经常'], ['Regularly', '定期'], ['Occasionally', '偶尔'], ['Usually', '通常'], ['Normally', '正常'], ['Typically', '典型'], ['Generally', '一般'], ['Commonly', '通常'], ['Mostly', '主要'], ['Mainly', '主要'], ['Primarily', '主要'], ['Essentially', '基本上'], ['Basically', '基本上'], ['Fundamentally', '从根本上'], ['Ultimately', '最终'], ['Eventually', '最终'], ['Finally', '最后'], ['Lastly', '最后'], ['Firstly', '首先'], ['Initially', '最初'], ['Originally', '最初'], ['Previously', '以前'], ['Formerly', '以前'], ['Recently', '最近'], ['Lately', '最近'], ['Currently', '目前'], ['Presently', '目前'], ['Now', '现在'], ['Today', '今天'], ['Tonight', '今晚'], ['Tomorrow', '明天'], ['Yesterday', '昨天'], ['Soon', '很快'], ['Later', '后来'], ['Earlier', '更早'], ['Before', '之前'], ['After', '之后'], ['During', '期间'], ['While', '当'], ['Meanwhile', '与此同时'], ['Simultaneously', '同时'], ['Concurrently', '同时'], ['Simultaneously', '同时'], ['Together', '一起'], ['Separately', '分别'], ['Individually', '个别'], ['Collectively', '集体'], ['Jointly', '共同'], ['Mutually', '互相'], ['Reciprocally', '相互'], ['Alternately', '交替'], ['Alternatively', '或者'], ['Instead', '代替'], ['Rather', '相当'], ['Quite', '相当'], ['Very', '非常'], ['Extremely', '极其'], ['Highly', '高度'], ['Greatly', '大大'], ['Significantly', '显著'], ['Considerably', '相当'], ['Substantially', '实质上'], ['Remarkably', '非常'], ['Notably', '值得注意'], ['Particularly', '特别'], ['Especially', '特别'], ['Specifically', '具体'], ['Precisely', '精确'], ['Exactly', '确切'], ['Approximately', '大约'], ['Roughly', '大约'], ['About', '关于'], ['Around', '周围'], ['Nearly', '几乎'], ['Almost', '几乎'], ['Practically', '实际上'], ['Virtually', '几乎'], ['Essentially', '基本上'], ['Basically', '基本上'], ['Fundamentally', '从根本上'], ['Primarily', '主要'], ['Mainly', '主要'], ['Mostly', '主要'], ['Largely', '主要'], ['Generally', '一般'], ['Usually', '通常'], ['Normally', '正常'], ['Typically', '典型'], ['Commonly', '通常'], ['Frequently', '经常'], ['Often', '经常'], ['Regularly', '定期'], ['Consistently', '一致'], ['Constantly', '不断'], ['Continually', '持续'], ['Continuously', '连续'], ['Persistently', '持续'], ['Steadily', '稳定'], ['Gradually', '逐渐'], ['Slowly', '慢慢'], ['Quickly', '快速'], ['Rapidly', '快速'], ['Swiftly', '迅速'], ['Immediately', '立即'], ['Instantly', '立即'], ['Suddenly', '突然'], ['Abruptly', '突然'], ['Unexpectedly', '意外'], ['Surprisingly', '令人惊讶'], ['Fortunately', '幸运地'], ['Unfortunately', '不幸地'], ['Sadly', '悲伤地'], ['Happily', '快乐地'], ['Hopefully', '希望'], ['Possibly', '可能'], ['Probably', '可能'], ['Certainly', '肯定'], ['Definitely', '肯定'], ['Absolutely', '绝对'], ['Completely', '完全'], ['Entirely', '完全'], ['Totally', '完全'], ['Fully', '完全'], ['Partially', '部分'], ['Partly', '部分'], ['Somewhat', '有点'], ['Slightly', '略微'], ['Barely', '几乎不'], ['Hardly', '几乎不'], ['Scarcely', '几乎不'], ['Merely', '仅仅'], ['Simply', '简单'], ['Just', '只是'], ['Only', '只有'], ['Solely', '仅仅'], ['Exclusively', '专门'], ['Purely', '纯粹'], ['Strictly', '严格'], ['Exactly', '确切'], ['Precisely', '精确'], ['Accurately', '准确'], ['Correctly', '正确'], ['Properly', '正确'], ['Appropriately', '适当'], ['Suitably', '适当'], ['Adequately', '充分'], ['Sufficiently', '充分'], ['Enough', '足够'], ['Too', '太'], ['Excessively', '过度'], ['Extremely', '极其'], ['Incredibly', '不可思议'], ['Remarkably', '非常'], ['Exceptionally', '特别'], ['Unusually', '不寻常'], ['Particularly', '特别'], ['Especially', '特别'], ['Specifically', '具体'], ['Notably', '值得注意'], ['Significantly', '显著'], ['Considerably', '相当'], ['Substantially', '实质上'], ['Greatly', '大大'], ['Highly', '高度'], ['Deeply', '深深'], ['Widely', '广泛'], ['Broadly', '广泛'], ['Extensively', '广泛'], ['Thoroughly', '彻底'], ['Carefully', '小心'], ['Closely', '密切'], ['Carefully', '小心'], ['Cautiously', '谨慎'], ['Gently', '温和'], ['Softly', '轻轻'], ['Quietly', '安静'], ['Silently', '默默'], ['Loudly', '大声'], ['Clearly', '清楚'], ['Distinctly', '明显'], ['Obviously', '明显'], ['Evidently', '明显'], ['Apparently', '显然'], ['Seemingly', '似乎'], ['Presumably', '大概'], ['Allegedly', '据称'], ['Reportedly', '据报道'], ['Supposedly', '据说'], ['Theoretically', '理论上'], ['Practically', '实际上'], ['Realistically', '现实地'], ['Logically', '逻辑上'], ['Naturally', '自然地'], ['Obviously', '明显'], ['Clearly', '清楚'], ['Undoubtedly', '毫无疑问'], ['Certainly', '肯定'], ['Definitely', '肯定'], ['Absolutely', '绝对'], ['Positively', '积极地'], ['Negatively', '消极地'], ['Favorably', '有利地'], ['Unfavorably', '不利地'], ['Positively', '积极地'], ['Optimistically', '乐观地'], ['Pessimistically', '悲观地'], ['Hopefully', '希望'], ['Confidently', '自信地'], ['Doubtfully', '怀疑地'], ['Uncertainly', '不确定地'], ['Hesitantly', '犹豫地'], ['Reluctantly', '不情愿地'], ['Willingly', '愿意地'], ['Eagerly', '急切地'], ['Enthusiastically', '热情地'], ['Passionately', '热情地'], ['Excitedly', '兴奋地'], ['Nervously', '紧张地'], ['Anxiously', '焦虑地'], ['Worriedly', '担忧地'], ['Fearfully', '恐惧地'], ['Bravely', '勇敢地'], ['Courageously', '勇敢地'], ['Boldly', '大胆地'], ['Confidently', '自信地'], ['Proudly', '自豪地'], ['Humbly', '谦逊地'], ['Modestly', '谦虚地'], ['Arrogantly', '傲慢地'], ['Rudely', '粗鲁地'], ['Politely', '礼貌地'], ['Kindly', '友善地'], ['Gently', '温和地'], ['Harshly', '严厉地'], ['Strictly', '严格地'], ['Severely', '严重地'], ['Seriously', '严重地'], ['Importantly', '重要地'], ['Significantly', '显著地'], ['Considerably', '相当地'], ['Substantially', '实质上'], ['Greatly', '大大地'], ['Highly', '高度地'], ['Extremely', '极其地'], ['Incredibly', '不可思议地'], ['Amazingly', '令人惊讶地'], ['Surprisingly', '令人惊讶地'], ['Unexpectedly', '意外地'], ['Suddenly', '突然地'], ['Immediately', '立即地'], ['Instantly', '立即地'], ['Quickly', '快速地'], ['Rapidly', '快速地'], ['Slowly', '慢慢地'], ['Gradually', '逐渐地'], ['Steadily', '稳定地'], ['Constantly', '不断地'], ['Continuously', '连续地'], ['Regularly', '定期地'], ['Frequently', '经常地'], ['Often', '经常地'], ['Sometimes', '有时地'], ['Occasionally', '偶尔地'], ['Rarely', '很少地'], ['Seldom', '很少地'], ['Never', '从不地'], ['Always', '总是地'], ['Usually', '通常地'], ['Normally', '正常地'], ['Typically', '典型地'], ['Generally', '一般地'], ['Commonly', '通常地'], ['Widely', '广泛地'], ['Broadly', '广泛地'], ['Extensively', '广泛地'], ['Thoroughly', '彻底地'], ['Completely', '完全地'], ['Entirely', '完全地'], ['Totally', '完全地'], ['Fully', '完全地'], ['Partially', '部分地'], ['Partly', '部分地'], ['Somewhat', '有点地'], ['Slightly', '略微地'], ['Barely', '几乎不地'], ['Hardly', '几乎不地'], ['Scarcely', '几乎不地'], ['Merely', '仅仅地'], ['Simply', '简单地'], ['Just', '只是地'], ['Only', '只有地'], ['Solely', '仅仅地'], ['Exclusively', '专门地'], ['Purely', '纯粹地'], ['Strictly', '严格地'], ['Exactly', '确切地'], ['Precisely', '精确地'], ['Accurately', '准确地'], ['Correctly', '正确地'], ['Properly', '正确地'], ['Appropriately', '适当地'], ['Suitably', '适当地'], ['Adequately', '充分地'], ['Sufficiently', '充分地'], ['Enough', '足够地'], ['Too', '太地'], ['Excessively', '过度地'], ['Overly', '过度地'], ['Unduly', '过度地'], ['Unnecessarily', '不必要地'], ['Needlessly', '不必要地'], ['Uselessly', '无用地'], ['Helplessly', '无助地'], ['Hopelessly', '绝望地'], ['Desperately', '绝望地'], ['Urgently', '紧急地'], ['Critically', '关键地'], ['Seriously', '严重地'], ['Dangerously', '危险地'], ['Safely', '安全地'], ['Securely', '安全地'], ['Comfortably', '舒适地'], ['Conveniently', '方便地'], ['Easily', '容易地'], ['Difficulty', '困难地'], ['Hardly', '困难地'], ['Effortlessly', '毫不费力地'], ['Smoothly', '顺利地'], ['Roughly', '粗略地'], ['Gently', '温和地'], ['Softly', '轻轻地'], ['Quietly', '安静地'], ['Silently', '默默地'], ['Loudly', '大声地'], ['Clearly', '清楚地'], ['Distinctly', '明显地'], ['Obviously', '明显地'], ['Evidently', '明显地'], ['Apparently', '显然地'], ['Seemingly', '似乎地'], ['Presumably', '大概地'], ['Allegedly', '据称地'], ['Reportedly', '据报道地'], ['Supposedly', '据说地'], ['Theoretically', '理论上地'], ['Practically', '实际上地'], ['Realistically', '现实地'], ['Logically', '逻辑上地'], ['Naturally', '自然地'], ['Artificially', '人工地'], ['Manually', '手动地'], ['Automatically', '自动地'], ['Mechanically', '机械地'], ['Electronically', '电子地'], ['Digitally', '数字地'], ['Virtually', '虚拟地'], ['Physically', '物理地'], ['Mentally', '精神地'], ['Emotionally', '情绪地'], ['Spiritually', '精神地'], ['Socially', '社会地'], ['Culturally', '文化地'], ['Politically', '政治地'], ['Economically', '经济地'], ['Financially', '财务地'], ['Commercially', '商业地'], ['Industrially', '工业地'], ['Technologically', '技术地'], ['Scientifically', '科学地'], ['Medically', '医学地'], ['Legally', '法律地'], ['Officially', '正式地'], ['Formally', '正式地'], ['Informally', '非正式地'], ['Casually', '随便地'], ['Professionally', '专业地'], ['Personally', '个人地'], ['Individually', '个别地'], ['Collectively', '集体地'], ['Jointly', '共同地'], ['Separately', '分别地'], ['Together', '一起地'], ['Apart', '分开地'], ['Alone', '独自地'], ['Independently', '独立地'], ['Dependently', '依赖地'], ['Relatively', '相对地'], ['Absolutely', '绝对地'], ['Comparatively', '比较地'], ['Similarly', '类似地'], ['Differently', '不同地'], ['Equally', '平等地'], ['Unequally', '不平等地'], ['Fairly', '公平地'], ['Unfairly', '不公平地'], ['Justly', '公正地'], ['Unjustly', '不公正地'], ['Honestly', '诚实地'], ['Dishonestly', '不诚实地'], ['Truthfully', '真实地'], ['Falsely', '错误地'], ['Genuinely', '真诚地'], ['Sincerely', '真诚地'], ['Seriously', '严重地'], ['Jokingly', '开玩笑地'], ['Playfully', '嬉戏地'], ['Humorously', '幽默地'], ['Ironically', '讽刺地'], ['Sarcastically', '讽刺地'], ['Literally', '字面上地'], ['Figuratively', '比喻地'], ['Metaphorically', '比喻地'], ['Symbolically', '象征地'], ['Directly', '直接地'], ['Indirectly', '间接地'], ['Immediately', '立即地'], ['Eventually', '最终地'], ['Ultimately', '最终地'], ['Finally', '最后地'], ['Lastly', '最后地'], ['Firstly', '首先地'], ['Initially', '最初地'], ['Originally', '最初地'], ['Previously', '以前地'], ['Formerly', '以前地'], ['Recently', '最近地'], ['Lately', '最近地'], ['Currently', '目前地'], ['Presently', '目前地'], ['Now', '现在地'], ['Then', '然后地'], ['Next', '接下来地'], ['Afterwards', '之后地'], ['Subsequently', '随后地'], ['Later', '后来地'], ['Earlier', '更早地'], ['Before', '之前地'], ['After', '之后地'], ['During', '期间地'], ['While', '当地'], ['Meanwhile', '与此同时地'], ['Simultaneously', '同时地'], ['Concurrently', '同时地'], ['Alternately', '交替地'], ['Alternatively', '或者地'], ['Instead', '代替地'], ['Rather', '相当地'], ['Quite', '相当地'], ['Very', '非常地'], ['Extremely', '极其地'], ['Highly', '高度地'], ['Greatly', '大大地'], ['Significantly', '显著地'], ['Considerably', '相当地'], ['Substantially', '实质上地'], ['Remarkably', '非常地'], ['Notably', '值得注意地'], ['Particularly', '特别地'], ['Especially', '特别地'], ['Specifically', '具体地'], ['Precisely', '精确地'], ['Exactly', '确切地'], ['Approximately', '大约地'], ['Roughly', '大约地'], ['About', '关于地'], ['Around', '周围地'], ['Nearly', '几乎地'], ['Almost', '几乎地'], ['Practically', '实际上地'], ['Virtually', '几乎地'], ['Essentially', '基本上地'], ['Basically', '基本上地'], ['Fundamentally', '从根本上地'], ['Primarily', '主要地'], ['Mainly', '主要地'], ['Mostly', '主要地'], ['Largely', '主要地'], ['Generally', '一般地'], ['Usually', '通常地'], ['Normally', '正常地'], ['Typically', '典型地'], ['Commonly', '通常地'], ['Frequently', '经常地'], ['Often', '经常地'], ['Regularly', '定期地'], ['Consistently', '一致地'], ['Constantly', '不断地'], ['Continually', '持续地'], ['Continuously', '连续地'], ['Persistently', '持续地'], ['Steadily', '稳定地'], ['Gradually', '逐渐地'], ['Slowly', '慢慢地'], ['Quickly', '快速地'], ['Rapidly', '快速地'], ['Swiftly', '迅速地'], ['Immediately', '立即地'], ['Instantly', '立即地'], ['Suddenly', '突然地'], ['Abruptly', '突然地'], ['Unexpectedly', '意外地'], ['Surprisingly', '令人惊讶地'], ['Fortunately', '幸运地'], ['Unfortunately', '不幸地'], ['Sadly', '悲伤地'], ['Happily', '快乐地'], ['Hopefully', '希望地'], ['Possibly', '可能地'], ['Probably', '可能地'], ['Certainly', '肯定地'], ['Definitely', '肯定地'], ['Absolutely', '绝对地'], ['Completely', '完全地'], ['Entirely', '完全地'], ['Totally', '完全地'], ['Fully', '完全地'], ['Partially', '部分地'], ['Partly', '部分地'], ['Somewhat', '有点地'], ['Slightly', '略微地'], ['Barely', '几乎不地'], ['Hardly', '几乎不地'], ['Scarcely', '几乎不地'], ['Merely', '仅仅地'], ['Simply', '简单地'], ['Just', '只是地'], ['Only', '只有地'], ['Solely', '仅仅地'], ['Exclusively', '专门地'], ['Purely', '纯粹地'], ['Strictly', '严格地'], ['Exactly', '确切地'], ['Precisely', '精确地'], ['Accurately', '准确地'], ['Correctly', '正确地'], ['Properly', '正确地'], ['Appropriately', '适当地'], ['Suitably', '适当地'], ['Adequately', '充分地'], ['Sufficiently', '充分地'], ['Enough', '足够地'], ['Too', '太地'], ['Excessively', '过度地'] ]); if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initializeFeatures); } else { initializeFeatures(); } // 异步加载模块 const loadModule = async (moduleName) => { return new Promise((resolve) => { // 模拟异步加载 setTimeout(() => { resolve(true); }, 10); }); }; // 代码分割和懒加载 const lazyLoadFeature = async (featureName, initFunction) => { if (config.enabledFeatures[featureName]) { await loadModule(featureName); return initFunction(); } return Promise.resolve(); }; async function initializeFeatures() { // 核心功能立即加载 if (config.enabledFeatures.autoTranslate) translatePage(); if (config.enabledFeatures.layoutOptimization) optimizeLayout(); if (config.enabledFeatures.darkModeEnhancement) enhanceDarkMode(); // 非核心功能异步加载 const featurePromises = [ lazyLoadFeature('downloadAcceleration', addDownloadAcceleration), lazyLoadFeature('imageAcceleration', accelerateImages), lazyLoadFeature('quickCopy', addQuickCopyButtons), lazyLoadFeature('fileTree', enhanceFileTree), lazyLoadFeature('sizeDisplay', displayRepoSize), lazyLoadFeature('timeLocalization', localizeTime) ]; // 等待所有异步功能加载完成 await Promise.all(featurePromises); // 最后加载辅助功能 requestAnimationFrame(() => { addCustomStyles(); addKeyboardShortcuts(); addQuickJump(); observePageChanges(); setupMenuCommands(); }); } const translatePage = throttle(() => { const walker = document.createTreeWalker( document.body, NodeFilter.SHOW_TEXT, { acceptNode: function(node) { const parent = node.parentElement; if (parent && (parent.tagName === 'SCRIPT' || parent.tagName === 'STYLE' || parent.tagName === 'CODE' || parent.tagName === 'PRE' || parent.classList.contains('notranslate'))) { return NodeFilter.FILTER_REJECT; } return NodeFilter.FILTER_ACCEPT; } } ); const textNodes = []; while (walker.nextNode()) { textNodes.push(walker.currentNode); } // 批量处理文本翻译 const fragment = document.createDocumentFragment(); textNodes.forEach(node => { let text = node.textContent.trim(); if (text && translations.has(text)) { node.textContent = node.textContent.replace(text, translations.get(text)); } }); // 批量处理属性翻译 const elementsWithAttrs = getElements('[placeholder], [title], [aria-label], [data-original-title]'); elementsWithAttrs.forEach(elem => { ['placeholder', 'title', 'aria-label', 'data-original-title'].forEach(attr => { const value = elem.getAttribute(attr); if (value && translations.has(value)) { elem.setAttribute(attr, translations.get(value)); } }); }); }, 100); function addDownloadAcceleration() { const downloadButton = document.querySelector('[data-test-selector="download-zip-button"]'); if (downloadButton) { const accelContainer = document.createElement('div'); accelContainer.className = 'Box-row Box-row--hover-gray p-3 mt-0'; accelContainer.innerHTML = `
加速下载
`; downloadButton.parentElement.appendChild(accelContainer); accelContainer.querySelectorAll('[data-mirror]').forEach(link => { link.addEventListener('click', (e) => { e.preventDefault(); const mirrorIndex = parseInt(e.target.dataset.mirror); const mirror = config.downloadMirrors[mirrorIndex]; const repoPath = window.location.pathname.split('/').slice(1, 3).join('/'); window.open(mirror + 'https://github.com/' + repoPath + '/archive/refs/heads/main.zip'); }); }); } const releaseAssets = document.querySelectorAll('.Box-row a[href*="/releases/download/"]'); releaseAssets.forEach(asset => { if (!asset.parentElement.querySelector('.accel-download')) { const accelLink = document.createElement('a'); accelLink.className = 'ml-2 accel-download'; accelLink.href = '#'; accelLink.textContent = '[加速]'; accelLink.style.fontSize = '12px'; accelLink.onclick = (e) => { e.preventDefault(); window.open(config.downloadMirrors[0] + asset.href); }; asset.parentElement.appendChild(accelLink); } }); } function accelerateImages() { const images = document.querySelectorAll('img'); images.forEach(img => { let newSrc = img.src; for (let [original, mirror] of Object.entries(config.imageMirrors)) { if (img.src.includes(original)) { newSrc = img.src.replace(original, mirror); break; } } if (newSrc !== img.src) { img.src = newSrc; if (img.srcset) { img.srcset = img.srcset.split(',').map(src => { for (let [original, mirror] of Object.entries(config.imageMirrors)) { src = src.replace(original, mirror); } return src; }).join(','); } } }); } function addQuickCopyButtons() { const cloneButton = document.querySelector('[data-testid="code-button"]'); if (cloneButton && !document.querySelector('.quick-copy-buttons')) { const quickCopyContainer = document.createElement('div'); quickCopyContainer.className = 'quick-copy-buttons ml-2'; quickCopyContainer.style.display = 'inline-flex'; quickCopyContainer.style.gap = '4px'; const httpsUrl = document.querySelector('[data-testid="https-url-input"]'); const sshUrl = document.querySelector('[data-testid="ssh-url-input"]'); if (httpsUrl) { const httpsBtn = createCopyButton('HTTPS', httpsUrl.value); quickCopyContainer.appendChild(httpsBtn); } if (sshUrl) { const sshBtn = createCopyButton('SSH', sshUrl.value); quickCopyContainer.appendChild(sshBtn); } cloneButton.parentElement.appendChild(quickCopyContainer); } function createCopyButton(label, value) { const btn = document.createElement('button'); btn.className = 'btn btn-sm'; btn.textContent = `复制 ${label}`; btn.onclick = () => { GM_setClipboard(value); btn.textContent = '已复制!'; setTimeout(() => { btn.textContent = `复制 ${label}`; }, 2000); }; return btn; } } function enhanceFileTree() { const fileNavigation = document.querySelector('.file-navigation'); if (fileNavigation && !document.querySelector('.file-tree-toggle')) { const treeToggle = document.createElement('button'); treeToggle.className = 'btn btn-sm file-tree-toggle ml-2'; treeToggle.innerHTML = ` 文件树 `; const goToFile = fileNavigation.querySelector('[data-hotkey="t"]'); if (goToFile) { goToFile.parentElement.appendChild(treeToggle); } treeToggle.onclick = () => { toggleFileTree(); }; } } function toggleFileTree() { let fileTree = document.querySelector('.github-fast-file-tree'); if (fileTree) { fileTree.style.display = fileTree.style.display === 'none' ? 'block' : 'none'; return; } fileTree = document.createElement('div'); fileTree.className = 'github-fast-file-tree'; fileTree.style.cssText = ` position: fixed; left: 0; top: 60px; bottom: 0; width: 300px; background: var(--color-canvas-default); border-right: 1px solid var(--color-border-default); overflow-y: auto; z-index: 100; padding: 16px; `; fileTree.innerHTML = '
加载文件树中...
'; document.body.appendChild(fileTree); loadFileTree(); } function loadFileTree() { const apiPath = window.location.pathname.split('/').slice(1, 3).join('/'); const branch = document.querySelector('[data-testid="breadcrumb-current-branch"]')?.textContent || 'main'; GM_xmlhttpRequest({ method: 'GET', url: `https://api.github.com/repos/${apiPath}/git/trees/${branch}?recursive=1`, headers: { 'Accept': 'application/vnd.github.v3+json' }, onload: function(response) { if (response.status === 200) { const data = JSON.parse(response.responseText); renderFileTree(data.tree); } } }); } function renderFileTree(tree) { const fileTree = document.querySelector('.github-fast-file-tree'); if (!fileTree) return; const structure = buildTreeStructure(tree); fileTree.innerHTML = renderTreeNodes(structure); } function buildTreeStructure(flatTree) { const root = { name: '/', children: {}, type: 'tree' }; flatTree.forEach(item => { const parts = item.path.split('/'); let current = root; parts.forEach((part, index) => { if (!current.children[part]) { current.children[part] = { name: part, children: {}, type: index === parts.length - 1 ? item.type : 'tree', path: item.path }; } current = current.children[part]; }); }); return root; } function renderTreeNodes(node, level = 0) { let html = ''; const entries = Object.entries(node.children).sort((a, b) => { if (a[1].type === 'tree' && b[1].type !== 'tree') return -1; if (a[1].type !== 'tree' && b[1].type === 'tree') return 1; return a[0].localeCompare(b[0]); }); entries.forEach(([name, child]) => { const icon = child.type === 'tree' ? '📁' : '📄'; const padding = level * 20; if (child.type === 'tree') { html += `
${icon} ${name}
${renderTreeNodes(child, level + 1)}
`; } else { const filePath = child.path; const currentRepo = window.location.pathname.split('/').slice(1, 3).join('/'); const branch = document.querySelector('[data-testid="breadcrumb-current-branch"]')?.textContent || 'main'; const fileUrl = `/${currentRepo}/blob/${branch}/${filePath}`; html += `
${icon} ${name}
`; } }); return html; } function displayRepoSize() { const repoHeader = document.querySelector('[itemprop="name"]'); if (!repoHeader || document.querySelector('.repo-size-display')) return; const apiPath = window.location.pathname.split('/').slice(1, 3).join('/'); GM_xmlhttpRequest({ method: 'GET', url: `https://api.github.com/repos/${apiPath}`, headers: { 'Accept': 'application/vnd.github.v3+json' }, onload: function(response) { if (response.status === 200) { const data = JSON.parse(response.responseText); const sizeInMB = (data.size / 1024).toFixed(2); const sizeDisplay = document.createElement('span'); sizeDisplay.className = 'repo-size-display ml-2 text-small color-fg-muted'; sizeDisplay.textContent = `${sizeInMB} MB`; repoHeader.parentElement.appendChild(sizeDisplay); } } }); } function localizeTime() { const timeElements = document.querySelectorAll('time, relative-time'); timeElements.forEach(elem => { const datetime = elem.getAttribute('datetime'); if (datetime) { const date = new Date(datetime); const now = new Date(); const diff = now - date; const minutes = Math.floor(diff / 60000); const hours = Math.floor(diff / 3600000); const days = Math.floor(diff / 86400000); let relativeTime; if (minutes < 1) { relativeTime = '刚刚'; } else if (minutes < 60) { relativeTime = `${minutes} 分钟前`; } else if (hours < 24) { relativeTime = `${hours} 小时前`; } else if (days < 30) { relativeTime = `${days} 天前`; } else if (days < 365) { relativeTime = `${Math.floor(days / 30)} 个月前`; } else { relativeTime = `${Math.floor(days / 365)} 年前`; } elem.textContent = relativeTime; elem.title = date.toLocaleString('zh-CN'); } }); } function optimizeLayout() { const mainContent = document.querySelector('main'); if (mainContent) { mainContent.style.maxWidth = '1400px'; mainContent.style.margin = '0 auto'; } const readmeContent = document.querySelector('.markdown-body'); if (readmeContent) { readmeContent.style.fontSize = '16px'; readmeContent.style.lineHeight = '1.6'; } const codeLines = document.querySelectorAll('.blob-code-inner'); codeLines.forEach(line => { line.style.fontFamily = 'Consolas, "Liberation Mono", Menlo, Courier, monospace'; line.style.fontSize = '14px'; }); } function enhanceDarkMode() { if (document.documentElement.getAttribute('data-color-mode') === 'dark') { GM_addStyle(` :root { --color-canvas-default: #0d1117 !important; --color-canvas-subtle: #161b22 !important; --color-border-default: #30363d !important; --color-border-muted: #21262d !important; } .markdown-body { color: #c9d1d9 !important; } .markdown-body code { background-color: rgba(110, 118, 129, 0.4) !important; } .markdown-body .highlight { background-color: #161b22 !important; } `); } } function addKeyboardShortcuts() { document.addEventListener('keydown', (e) => { if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return; if (e.key === 'g' && e.ctrlKey) { e.preventDefault(); const searchInput = document.querySelector('[data-testid="header-search-input"]'); if (searchInput) searchInput.focus(); } if (e.key === 't' && e.altKey) { e.preventDefault(); toggleFileTree(); } if (e.key === 'd' && e.altKey) { e.preventDefault(); const downloadBtn = document.querySelector('[data-test-selector="download-zip-button"]'); if (downloadBtn) { window.open(config.downloadMirrors[0] + downloadBtn.href); } } if (e.key === '/' && !e.ctrlKey && !e.altKey) { e.preventDefault(); const searchInput = document.querySelector('[data-testid="header-search-input"]'); if (searchInput) searchInput.focus(); } }); } function addQuickJump() { const nav = document.querySelector('.Header'); if (nav && !document.querySelector('.quick-jump')) { const quickJump = document.createElement('div'); quickJump.className = 'quick-jump position-relative ml-3'; quickJump.innerHTML = `
🔥 热门趋势 🔍 探索项目 🏷️ 浏览主题 📚 精选合集 ❤️ 赞助项目 🔔 我的通知 ⚙️ 账户设置
`; const headerActions = nav.querySelector('.Header-actions'); if (headerActions) { headerActions.insertBefore(quickJump, headerActions.firstChild); } loadRecentRepos(); } } function loadRecentRepos() { const recentRepos = GM_getValue('recentRepos', []); const reposContainer = document.getElementById('recent-repos'); if (reposContainer && recentRepos.length > 0) { reposContainer.innerHTML = recentRepos.slice(0, 5).map(repo => ` ${repo.name} `).join(''); } const currentRepo = window.location.pathname.match(/^\/([^\/]+\/[^\/]+)/); if (currentRepo) { const repoUrl = currentRepo[0]; const repoName = currentRepo[1]; const newRecentRepos = [ { name: repoName, url: repoUrl }, ...recentRepos.filter(r => r.url !== repoUrl) ].slice(0, 10); GM_setValue('recentRepos', newRecentRepos); } } const observePageChanges = (() => { let observer = null; const handleMutations = debounce((mutations) => { let shouldUpdate = false; mutations.forEach(mutation => { if (mutation.type === 'childList') { mutation.addedNodes.forEach(node => { if (node.nodeType === Node.ELEMENT_NODE) { shouldUpdate = true; } }); } else if (mutation.type === 'attributes') { shouldUpdate = true; } }); if (shouldUpdate) { clearDomCache(); // 只执行已启用的功能 const features = config.enabledFeatures; if (features.autoTranslate) translatePage(); if (features.downloadAcceleration) addDownloadAcceleration(); if (features.imageAcceleration) accelerateImages(); if (features.quickCopy) addQuickCopyButtons(); if (features.timeLocalization) localizeTime(); } }, 300); return () => { if (observer) { observer.disconnect(); } observer = new MutationObserver(handleMutations); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'style', 'hidden'] }); }; })(); function setupMenuCommands() { GM_registerMenuCommand('⚙️ GitHub Fast 设置', () => { showSettingsDialog(); }); GM_registerMenuCommand('🔄 刷新翻译', () => { translatePage(); GM_notification({ text: '页面翻译已刷新', title: 'GitHub Fast', timeout: 2000 }); }); GM_registerMenuCommand('📊 显示仓库统计', () => { showRepoStats(); }); } function showSettingsDialog() { const dialog = document.createElement('div'); dialog.className = 'github-fast-settings-dialog'; dialog.style.cssText = ` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--color-canvas-default); border: 1px solid var(--color-border-default); border-radius: 6px; padding: 24px; z-index: 9999; box-shadow: 0 16px 32px rgba(0,0,0,0.15); max-width: 500px; width: 90%; `; dialog.innerHTML = `

GitHub Fast 设置

`; document.body.appendChild(dialog); document.getElementById('save-settings').onclick = () => { dialog.querySelectorAll('input[data-feature]').forEach(input => { config.enabledFeatures[input.dataset.feature] = input.checked; }); GM_setValue('githubFastFeatures', config.enabledFeatures); dialog.remove(); location.reload(); }; } function showRepoStats() { const apiPath = window.location.pathname.split('/').slice(1, 3).join('/'); if (!apiPath.includes('/')) return; GM_xmlhttpRequest({ method: 'GET', url: `https://api.github.com/repos/${apiPath}`, headers: { 'Accept': 'application/vnd.github.v3+json' }, onload: function(response) { if (response.status === 200) { const data = JSON.parse(response.responseText); GM_notification({ text: ` ⭐ Stars: ${data.stargazers_count} 🍴 Forks: ${data.forks_count} 👀 Watchers: ${data.watchers_count} 📊 Size: ${(data.size / 1024).toFixed(2)} MB 🌐 Language: ${data.language || 'Unknown'} 📅 Created: ${new Date(data.created_at).toLocaleDateString('zh-CN')} 🔄 Updated: ${new Date(data.updated_at).toLocaleDateString('zh-CN')} `, title: `${data.full_name} 统计信息`, timeout: 10000 }); } } }); } function addCustomStyles() { GM_addStyle(` body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", "微软雅黑", sans-serif !important; } .quick-copy-buttons button { transition: all 0.2s ease; } .quick-copy-buttons button:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .repo-size-display { font-weight: 600; background: var(--color-neutral-muted); padding: 2px 8px; border-radius: 12px; } .accel-download { color: var(--color-accent-fg); text-decoration: none !important; font-weight: 500; } .accel-download:hover { text-decoration: underline !important; } .github-fast-file-tree { font-size: 14px; line-height: 1.5; } .tree-item { padding: 4px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tree-item:hover { background: var(--color-neutral-subtle); } .tree-item.collapsed + .tree-children { display: none; } .tree-toggle { cursor: pointer; user-select: none; margin-right: 4px; } .tree-name { color: var(--color-fg-default); text-decoration: none; } .tree-name:hover { text-decoration: underline; color: var(--color-accent-fg); } .quick-jump summary { cursor: pointer; list-style: none; } .github-fast-settings-dialog input[type="checkbox"] { margin-right: 8px; } .markdown-body { font-size: 16px !important; line-height: 1.6 !important; } .markdown-body h1, .markdown-body h2, .markdown-body h3 { font-weight: 600 !important; margin-top: 24px !important; margin-bottom: 16px !important; } .blob-code-inner { font-size: 14px !important; line-height: 1.5 !important; } @media (max-width: 768px) { .github-fast-file-tree { width: 80% !important; } .quick-copy-buttons { display: block !important; margin-top: 8px !important; } .repo-size-display { display: block !important; margin-top: 4px !important; margin-left: 0 !important; } } @media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } } .Header { backdrop-filter: blur(10px); } .btn-primary { background-color: #238636 !important; border-color: #238636 !important; } .btn-primary:hover { background-color: #2ea043 !important; border-color: #2ea043 !important; } details-menu { animation: fade-in 0.2s ease; } @keyframes fade-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .notification-indicator { transition: all 0.2s ease; } .notification-indicator:hover { transform: scale(1.1); } .commit-message { font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace !important; } .Box-row--hover-gray:hover { background-color: var(--color-canvas-subtle) !important; } .timeline-comment { border-radius: 8px !important; } .comment-body { font-size: 14px !important; line-height: 1.5 !important; } .tabnav-tab.selected { font-weight: 600 !important; } .flash { border-radius: 6px !important; margin-bottom: 16px !important; } .file-tree-toggle { transition: all 0.2s ease; } .file-tree-toggle:hover { background-color: var(--color-btn-hover-bg) !important; } .subnav-search-input { font-size: 14px !important; } .Counter { font-weight: 600 !important; } .topic-tag { transition: all 0.2s ease; } .topic-tag:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .avatar { border: 2px solid transparent; transition: border-color 0.2s ease; } .avatar:hover { border-color: var(--color-accent-emphasis); } .SelectMenu-modal { border-radius: 12px !important; box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important; } .Label { font-weight: 500 !important; } .Progress { height: 8px !important; border-radius: 4px !important; } .Toast { border-radius: 6px !important; box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important; } `); } })();