You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
Highlights
New: Added sponsor button (pass type=sponsor)
New: Updated the font stack to a more modern one
Breaking: Dropped ancient CSS vendor prefixes and IE < 10 support; the button will still work on IE9, but it won't look perfect, IE < 9 no longer works.
Enhancement: Reduced filesize approximately -20% off the uncompressed github-btn.html's size (6849 -> 5419 bytes)
Enhancement: When count=true is not passed, we now don't make any GitHub API request which should significantly improve page load times
Detailed changes
Improved button's accessibility:
counter is hidden with aria-hidden if it's empty
a title is added in the iframe
Improve button's HTML
add doctype
add lang
add charset
add rel="noopener noreferrer" for external links
remove aria-label since we set it via JS
Improve button's CSS:
the embedded SVG is no longer base64-encoded (-45% off the uncompressed SVG)
the embedded SVG is optimized with SVGO (approximately -25% off the compressed SVG, -28% off the uncompressed SVG)
the CSS is streamlined
Improved button's JS:
we no longer make unneeded GitHub API calls, for example if you don't pass query=true
add a few fail-safe checks
switched to Node.textContent since we weren't adding HTML
wrap the code in an IIFE so that the minifier mangles the variables properly
switch to strict mode
Build:
it should be generally easier to work on the project locally; npm i && bundle i to get started