sindresorhus/refined-github

Wrong `releases-tab` position if repo name contains "settings" #2763

jerone posted onGitHub

image

Test

Fix

https://github.com/sindresorhus/refined-github/blob/master/source/features/releases-tab.tsx#L61 should be

-appendBefore('.reponav', '.reponav-dropdown, [href$="settings"]', releasesTab);
+appendBefore('.reponav', '.reponav-dropdown, [href$="/settings"]', releasesTab);

Same as https://github.com/sindresorhus/refined-github/blob/master/source/features/releases-tab.tsx#L17


I think the selector would still apply to repos named settings. Is there anything more specific? Maybe they added a class now or we can just add :last-child (which will break if other extensions added extra tabs, but by “break” I mean the tab will be added at the very end. Not a big deal)

posted by fregante about 5 years ago

How about using something like [data-selected-links^="repo_settings"]?

posted by arnaudvalle about 5 years ago

I think that's right

posted by fregante about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests