You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
isRepoRoot Fails on https://github.com/Witold101/wpw #24
On is repoRoot we want to make sure we are not on the home so we detect is the title matches (so I think). However if the repo does not have a description the the title will match.
Example:
This repo: "fregante/github-url-detection: Which GitHub page are you on? Is it an issue? Is it a list? Perfect for your WebExtension or userscript."
Witold101/wpw: "Witold101/wpw"
Activity
notlmn commentedon Jul 13, 2020
Both repo and usernames are case-insensitive as far as GitHub is considered.
getRepoURL()and similar getters should no convert to other cases while returning, instead that should be left to functions likeisRepoRoot().Example:
notlmn commentedon Jul 13, 2020
Looks like
link[rel="alternative"]can betray you sometimes too. There is stuff likemeta[name="go-import"]and other analytics tags.yakov116 commentedon Jul 13, 2020
select.last
yakov116 commentedon Jul 20, 2020
Figured it out.
https://github.com/fregante/github-url-detection/blob/91f020d54264ecd443e80e6d2cc4e6c1943725f6/index.ts#L298
On is repoRoot we want to make sure we are not on the home so we detect is the title matches (so I think). However if the repo does not have a description the the title will match.
Example:
This repo: "fregante/github-url-detection: Which GitHub page are you on? Is it an issue? Is it a list? Perfect for your WebExtension or userscript."
Witold101/wpw: "Witold101/wpw"
Not sure how to go about it
fregante commentedon Jul 22, 2020
How does my PR look?
yakov116 commentedon Jul 22, 2020
@fregante your pr's always look good 😁
I am away from the computer for the next while I will test it and let you know.
fregante commentedon Jul 23, 2020
@notlmn we can use
rel=canonicalinsidegetRepoURLIFurlisn't specified, but that doesn't appear on every page.og:urlseems to appear on every page: #26