From 439bf923c1938fc0bf873ba037abcffa415dc8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=99=E6=BC=A0=E4=B9=8B=E5=AD=90?= <7850715+maboloshi@users.noreply.github.com> Date: Sat, 8 Jun 2024 20:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=EF=BC=9A?= =?UTF-8?q?=E9=80=82=E9=85=8D`skills.github.com`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.user.js b/main.user.js index da14b3c92..0de91e036 100644 --- a/main.user.js +++ b/main.user.js @@ -10,6 +10,7 @@ // @match https://github.com/* // @match https://gist.github.com/* // @match https://www.githubstatus.com/* +// @match https://skills.github.com // @require https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/locals.js?v1.9.0 // @run-at document-end // @grant GM_xmlhttpRequest @@ -183,7 +184,8 @@ // 站点,如 gist, developer, help 等,默认主站是 github const siteMapping = { 'gist.github.com': 'gist', - 'www.githubstatus.com': 'status' + 'www.githubstatus.com': 'status', + 'skills.github.com': 'skills' }; const site = siteMapping[location.hostname] || 'github'; // 站点 const pathname = location.pathname; // 当前路径 @@ -215,6 +217,8 @@ page = 'gist'; } else if (site === 'status') { // GitHub Status 页面 page = 'status'; + } else if (site === 'skills') { // GitHub Skills 页面 + page = 'skills'; } else if (pathname === '/' && site === 'github') { // github.com 首页 page = isLogin ? 'page-dashboard' : 'homepage'; } else if (isRepository) { // 仓库页