Skip to content

Hide repo-avatars for custom pages, like codespaces#9060

Closed
DarkIntaqt wants to merge 1 commit into
refined-github:mainfrom
DarkIntaqt:ft/hide-repo-avatars
Closed

Hide repo-avatars for custom pages, like codespaces#9060
DarkIntaqt wants to merge 1 commit into
refined-github:mainfrom
DarkIntaqt:ft/hide-repo-avatars

Conversation

@DarkIntaqt

Copy link
Copy Markdown

The custom page "Create new Codespaces" seems to have the same DOM tree than a normal repository.
Therefore, the repo-avatars feature tried to fetch an avatar for it.

I added a denyList/set of "owners" that don't have avatars as they are GitHub special pages. Currently, I only found it on the Codespaces site, but I assume that there are more. The list is currently hardcoded.

Maybe, a more permanent solution would be to integrate a feature into github-url-detection in order to detect these special pages and not identify these as repositories.

Test URLs

https://github.com/codespaces/new
https://github.com/refined-github/refined-github (nothing changed)

Screenshot

Before:
Bildschirmfoto 2026-03-08 um 18 49 43

After:
Bildschirmfoto 2026-03-08 um 19 32 10

@SunsetTechuila

Copy link
Copy Markdown
Contributor

Thank you, but that's not the right way to fix this issue. The proper approach would be to add codespaces to https://github.com/Mottie/github-reserved-names.

repo-avatars calls pageDetect.hasRepoHeader -> which calls isRepo -> which checks whether the given username is reserved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants