Skip to content

release-download-count - Avoid duplicates, preserve hash - #9799

Merged
fregante merged 3 commits into
mainfrom
release-count-native
Jul 10, 2026
Merged

fregante merged 3 commits into
mainfrom
release-count-native

Conversation

@fregante

Copy link
Copy Markdown
Member

@github-actions github-actions Bot added the bug label Jul 10, 2026
@fregante fregante changed the title release-download-count - Don't hide hash release-download-count - Avoid duplicates, preserve hash Jul 10, 2026
const hash = $optional(':scope > div:has(clipboard-copy)', assetSize.parentElement!);
// Hide sha on mobile. They have the classes but they're not correct (they hide in mid sizes, but show on smallest and largest)
hash?.classList.add('d-none');
hash?.classList.add('d-none', 'd-md-flex');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

// The native counter doesn't have heat colors, so we replace it anyway.
// https://github.com/refined-github/refined-github/issues/9769#issuecomment-4857658434
if (nativeCount) {
nativeCount.replaceWith(widget);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Native count appears after the hash, we keep its placement

count

nativeCount.replaceWith(widget);
} else {
// Add at the beginning of the line to avoid content shift
assetSize.parentElement!.prepend(widget);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@fregante
fregante merged commit 393ce2c into main Jul 10, 2026
21 checks passed
@fregante
fregante deleted the release-count-native branch July 10, 2026 15:20
@fregante fregante mentioned this pull request Jul 11, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

release-download-count is removing the sha release-download-count (partly) implemented by GitHub

1 participant