This button shouldn't appear on tag pages
in edit-files-faster we do this.
Do the same here?
Does that even work? We had this exact issue on both features before: https://github.com/sindresorhus/refined-github/issues/2261
Maybe we should undo that. The edit button isn't available on tagged blobs either: https://github.com/sindresorhus/refined-github/blob/19.7.19/source/libs/on-file-list-update.ts
Maybe we should require the user to first click the default-branch-button and then the edit button will appear there, regularly.
GitHub themselves is inconsistent:
GitHub adds “edit readme” links on commits as well but they will point to master, like /edit/master/readme.md so we should do the same
This happens on the readme, but not other files. 🤷♂️
in
edit-files-fasterwe do this.
Do the same here?
Alright, let's do this.
@fregante 2 issues.
One is the the issue you are having is githubs issue
https://github.com/sindresorhus/refined-github/blob/45ab67ec7f1675cc29182a993688e7a45fa429bc/source/features/edit-readme.tsx#L13-L15
number 2 is the whole feature is broken since the selector was changed
One is the the issue you are having is githubs issue
?
That edit button is added by github not refined-github
GitHub adds it to your repos
RG adds it to repos you can't edit, e.g.: https://github.com/sindresorhus/refined-github#readme
Right and that is broken
https://github.com/sindresorhus/refined-github/blob/45ab67ec7f1675cc29182a993688e7a45fa429bc/source/features/edit-readme.tsx#L8
Needs to be changed to const readmeHeader = select('#readme .Box-header h2');
Lol you're right, it's their own bug. I guess edit-readme should have 2 parts:
Lol you're right, it's their own bug. I guess
edit-readme-fastershould have 2 parts:
- add button if missing
- fix button if it's a tagged page
But....
The selector can be a h2 or a h3.
On the master branch it looks like its a h3 on tags it looks like its a h2
On the master branch it looks like its a
h3on tags it looks like its ah2
I'm not seeing that difference, it's also an h2. This on my repo (link by GitHub)

This on another repo (edit-readme-faster missing)

I'll open a new specific issue