<< link to https://github.com/sindresorhus/refined-github/blob/master/source/background.tsExample: (ignore the arrow)

How:
get-default-branch function to accept a user/repo string (and it should only use parseBranchFromDom if the string matches the current page)More issues semi-related to this one: https://github.com/sindresorhus/refined-github/pull/1115 https://github.com/sindresorhus/refined-github/pull/1168 https://github.com/sindresorhus/refined-github/pull/1557
I just realized that Unrelated Feature 馃槃 it exactly this!
Can I have a go for it?
Played around:
Version 1

Version 2

Version 3

Edit the
get-default-branchfunction to accept auser/repostring (and it should only useparseBranchFromDomif the string matches the current page)
This is still valid and should be read.
Part of default branch or its own feature?
fork-source-link-same-view
Edit the
get-default-branchfunction to accept auser/repostring (and it should only useparseBranchFromDomif the string matches the current page)
Perhaps we can skip this and keep it simple by using HEAD as previously suggested.
I think so, it kept it very simple and it follows the way we did it for forked to.
However its your call chief
Edit the
get-default-branchfunction to accept auser/repostring (and it should only useparseBranchFromDomif the string matches the current page)This is still valid and should be read.
i lost you with this one, how would this be different that using HEAD?
Variant 5:

or with master branch:

then it is more clear that i can jump to a specific file or i can use the breadcrump higher directory to jump to this directory
because i think the link forked from ..../.... gets a blind spot because i tried it many times, but then i see this link is useless for me in this case to jump to the same file...
gets a blind spot because i tried it many times
Happened to me today while trying out the feature.
In other words you dont realize you changed repo's since the page looks the same.
@fregante what if we add it any only alt?
I made a POC
https://github.com/yakov116/refined-github/tree/fork-source-link-same-view
Variant 5:
I think that will get too noisy on long paths
long path also in a much bigger font above the file, so it is the same "noice" as the file name above the file, but in very small size
I made a POC
This feature is 1 line long. No delegate needed.
const forkSource = select('fork source link')!;
forkSource.pathname = createLink(forkSource.textContent);
... ish, I think you'll need GitHubURL to replace the branch as well
If we change the pathname we mess up this line
https://github.com/sindresorhus/refined-github/blob/ebeb9903c6ddeac0e9d425753b79bedbd2357321/source/features/forked-to.tsx#L20
If we change the pathname we mess up this line
export function getForkedRepo(): string | undefined {
- return select<HTMLAnchorElement>('.fork-flag a')?.pathname.slice(1);
+ return select<HTMLAnchorElement>('.fork-flag a')?.pathname.slice(1).split('/', 2).join('/');
}
Most helpful comment
I just realized that Unrelated Feature 馃槃 it exactly this!
Can I have a go for it?
Played around:
Version 1

Version 2

Version 3
