From 8a4c77b1dc6f6634c088e75596eb10a78360ba87 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 11:31:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5`main.user.js`=E9=81=97?= =?UTF-8?q?=E6=BC=8F=E5=86=85=E5=AE=B9=E8=87=B3`main(greasyfork).user.js`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main(greasyfork).user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main(greasyfork).user.js b/main(greasyfork).user.js index b7750a34a..2c620ec17 100644 --- a/main(greasyfork).user.js +++ b/main(greasyfork).user.js @@ -15,6 +15,7 @@ // @grant GM_getValue // @grant GM_setValue // @grant GM_registerMenuCommand +// @grant GM_unregisterMenuCommand // @grant GM_notification // @connect www.iflyrec.com // @supportURL https://github.com/maboloshi/github-chinese/issues @@ -214,10 +215,10 @@ page = t ? 'repository/' + t[1] : 'repository'; } else if (isOrganization) { // 组织页 t = pathname.match(I18N.conf.rePagePathOrg); - page = t ? 'orgs/' + t[1] : 'orgs'; + page = t ? 'orgs/' + (t[1] || t.slice(-1)[0]) : 'orgs'; } else { t = pathname.match(I18N.conf.rePagePath); - page = t ? t[1] : false; // 取页面 key + page = t ? (t[1] || t.slice(-1)[0]) : false; // 取页面 key } if (!page || !I18N[lang][page]) {