Skip to content

Commit

Permalink
西元2025年01月05日 (週日) 07時36分51秒 CST
Browse files Browse the repository at this point in the history
  • Loading branch information
pulipulichen committed Jan 4, 2025
1 parent e6ab9f8 commit ad3645c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion GitHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ad3645c

Please sign in to comment.