From ad3645c47cfc6989bb9aa833f5856bb3eda81dc3 Mon Sep 17 00:00:00 2001 From: thinkpad-l13-yoga Date: Sun, 5 Jan 2025 07:36:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E5=85=832025=E5=B9=B401=E6=9C=8805?= =?UTF-8?q?=E6=97=A5=20(=E9=80=B1=E6=97=A5)=2007=E6=99=8236=E5=88=8651?= =?UTF-8?q?=E7=A7=92=20CST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GitHub.js | 1 - 1 file changed, 1 deletion(-) diff --git a/GitHub.js b/GitHub.js index af2d64369a..a57e23bd34 100644 --- a/GitHub.js +++ b/GitHub.js @@ -55,7 +55,6 @@ async function detectWeb(doc, url) { let ogTitle = attr(doc, 'meta[property="og:title"]', 'content'); let path = url.split('/').slice(3, 5).join('/'); let repo = url.split('/').slice(4, 5)[0]; - // if (!/^(GitHub - )?[^/\s]+\/[^/\s]+(: .*)?$/.test(attr(doc, 'meta[property="og:title"]', 'content')) && !/^(GitHub - )?[^/\s]+\/[^/\s]+( .*)?$/.test(attr(doc, 'meta[property="og:title"]', 'content'))) { if (!ogTitle.startsWith(path) && !ogTitle.startsWith(repo + '/')) { // and anything without a repo name (abc/xyz) as its og:title. // deals with repo pages that we can't scrape, like GitHub Discussions.