Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix hide-zero-packages on repo roots - #3784

Closed
cheap-glitch wants to merge 1 commit into
refined-github:masterfrom
cheap-glitch:fix-hide-zero-packages
Closed

Fix hide-zero-packages on repo roots#3784
cheap-glitch wants to merge 1 commit into
refined-github:masterfrom
cheap-glitch:fix-hide-zero-packages

Conversation

@cheap-glitch

Copy link
Copy Markdown
Contributor

Thanks for contributing! 🍄

  1. LINKED ISSUES: None

  2. TEST URLS: https://github.com/sindresorhus/refined-github

This feature broke because the URL of the "Packages" links now ends with some query parameters (e.g. https://github.com/users/sindresorhus/packages?repo_name=refined-github)

async function init(): Promise<void | false> {
const packagesTab = await elementReady([
'.BorderGrid-cell a[href$="/packages"]', // `isRepoRoot`
'.BorderGrid-cell a[href*="/packages"]', // `isRepoRoot`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also catch any repo that has the word “packages” in it, doesn’t it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, didn't think about that. Then how about

Suggested change
'.BorderGrid-cell a[href*="/packages"]', // `isRepoRoot`
'.BorderGrid-cell a[href*="/packages?"]', // `isRepoRoot`

@cheap-glitch

Copy link
Copy Markdown
Contributor Author

Closing because of #3783 (comment).

@cheap-glitch
cheap-glitch deleted the fix-hide-zero-packages branch December 5, 2020 21:16
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