refined-github / refined-github

:octocat: Browser extension that simplifies the GitHub interface and adds useful features
MIT License
24.52k stars 1.48k forks source link

`comments-time-machine-links` - missing from repo home links #4979

Open kidonng opened 2 years ago

kidonng commented 2 years ago

Description

Consider this comment: https://togithub.com/rome/tools/issues/144#issuecomment-682564926.

It has a link pointing to here: https://github.com/evanw/esbuild#why-is-it-fast, however the hash no longer works because the README has been updated.

Ideally comments-time-machine-links should append ?rgh-link-date=2020-08-28T13:20:47Z to the link and turn it into a working version when visited: https://github.com/evanw/esbuild/tree/HEAD@%7B2020-08-28T13:20:47Z%7D#why-is-it-fast.

This should target all "bare" repository links with hash (i.e. nothing else except hash after <user>/<repo>).


Also the feature only works for /blob/ and /tree/ links, however there are more types of links it should support, for example /blame/.

Screenshot

No response

Example URL

See above

fregante commented 19 hours ago

This is not a feature request for "more places", this is just a regular file/folder link that just does not contain /blob/ or /tree/ so it's ignored:

https://github.com/refined-github/refined-github/blob/f3d06808fba45ba2200070b3ebc441eaea0c08e2/source/features/comments-time-machine-links.tsx#L67-L70