Add support to detect new Stars "browser" and Star Lists pages #211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Github added some new functionality with Star Lists recently: https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars#organizing-starred-repositories-with-lists
And it seems they shadow added a new Stars browser (cannot find documentation for that) that is available at
/stars.I've added the following functions to detect these paths as I can foresee a few features that could be cool to include in Refined Github to enhance them, especially the Star Lists:
isStarsURL implementation tableToggle isStars table
truetrue. 🔒 login is required on this page - Will always be the user's own profiletruetruetruefalsefalse./username?tab=starspage instead.true/usernameprofile UI, not the "Stars Browser" UI._isOwnStarsURL implementation tableNote: I noticed the current
isOwn...methods do not have URL tests associated with them currently, so I did not add any for these in the code.Toggle isOwnStars table
truefalse. SeeisStarstabletrueorfalseisStarstable. Return value determined byisLoggedIntrueorfalseisStarstable. Return value determined byisLoggedIntrueorfalseisStarstable. Return value determined byisLoggedInfalsefalse./username?tab=starspage instead.trueorfalseisStarstable. Return value determined byisLoggedInisStarsListURL implementation tableToggle isStarsList table
falsetrue/usernameprofile UI, not the "Stars Browser" UI.isOwnStarsListURL implementation tableNote: I noticed the current
isOwn...methods do not have URL tests associated with them currently, so I did not add any for these in the code.Toggle isOwnStarsList table
falsetrueorfalseisStarsListtable. Return value determined byisLoggedInOn a couple things I did/didn't include:
isOwn...implementations. In my head, they seemed like they could be useful for some Refined Github features that would apply only the the user's Star Lists, so I added them. If you don't feel like they fit here, I'm not opposed to removing them but I genuinely can think of a couple examples where they might be useful down the line and they'd end up getting added anyway in the future.isStarsRepositoriesorisStarsTopicsor theisOwn...version of them as they are essentially and functionally the exact same UX as the other "Star Browser" pages (except the Stars List page itself)/username?tab=starsURL toisStarsorisOwnStarsfor basically the same reason - the UX is drastically different on these pages, which I can't imagine would be useful at all for anyone using these checks to implement features on Refined Github. In fact, I can see it being a hindrance that makes these checks unusable for now until Github decides to further change this UX and go all in on the "Stars Browser" or whatever they are calling it.