-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default-branch-button
on forks: add secondary button to see folder on source repo
#2985
Comments
I just realized that Unrelated Feature 😄 it exactly this! Can I have a go for it? Played around: |
No extra UI |
This is still valid and should be read. |
Part of default branch or its own feature? |
|
This comment has been minimized.
This comment has been minimized.
I think so, it kept it very simple and it follows the way we did it for forked to. |
i lost you with this one, how would this be different that using HEAD? |
Variant 5: or with 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 |
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
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 |
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 |
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('/');
} |
<<
link to https://github.com/sindresorhus/refined-github/blob/master/source/background.tsExample: (ignore the arrow)
How:
get-default-branch
function to accept auser/repo
string (and it should only useparseBranchFromDom
if the string matches the current page)More issues semi-related to this one: #1115 #1168 #1557
The text was updated successfully, but these errors were encountered: