Skip to content

Releases

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 19:17
73bf00d

Added

  • githubStars(repo, { min }): below min stars it resolves to undefined, so the button shows no count until the repo has that many.

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 18:49
c9673bf
  • links turns the button into a menu of ways to support: it opens a list above a bottom-corner button or below a top-corner one, using the browser's popover, so it needs no script. Each link takes an icon, a description and a count. href is no longer needed when there are links, and mount() then returns the <button>.
  • A count option shows a number after the label, in a small pill: numbers are shortened the way GitHub does (1,204, 12.3k, 1.2M), and a string is shown as is. --tipjar-count-bg and --tipjar-count-label colour it.
  • githubStars('owner/name') asks GitHub how many stars a repo has, for a "Star on GitHub" button. It caches the count in sessionStorage for an hour, takes a token for build servers, and resolves to undefined instead of throwing when GitHub can't answer.

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 19:14
1462fd9
  • Breaking, look change: four icons are redrawn, each with a new animation. coin is a coin that spins on its edge, slows, and catches a shine; a pixel coin turns through frames. tea has the bag's string over the rim and its tag hanging outside the cup, swaying. pizza is a whole pie with one slice sliding out. music is two beamed notes that bop to a beat.
  • Breaking, look change: the coffee's steam is drawn as curly wisps (flat and outline; pixel is unchanged). It no longer rises past the button's edge: it sways, drifts a little and fades in and out over the cup.
  • Look change: the big sparkle now glimmers too, on a slower beat than the two small ones. Its drawing is unchanged.

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 03:48
be936d0
  • A compact: 'hover' button no longer lifts as it opens; it only grows sideways. It doesn't pop or wiggle either: opening is its hover effect. Shine and fill still play.
  • hover: 'wiggle' now tilts the whole button, like the nudge, instead of the icon. hover is for the button and animate for the icon's own moving part.

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 03:11
2f4f554
  • compact: 'hover' shows just the icon in a circle, and opens into the full button with the label sliding in on hover or keyboard focus. On touch screens it stays a circle.
  • The hover option picks a hover effect: lift (the default, as before), pop, wiggle, shine, fill or none. --tipjar-shine and --tipjar-fill set their colours.
  • The enter option adds an entrance when the page loads: fade, slide or pop, after --tipjar-enter-delay (0.6s by default).
  • Look change: the button squishes slightly while pressed, on every device.
  • A new jar icon, drawn flat, pixel and outline, with a coin that drops in.
  • Icons can have moving parts, played by the new animate option: on hover (the default, and on keyboard focus), loop (three times on load, and on hover) or none. Coffee's steam rises past the edge of the button, and jar's coin drops in. --tipjar-accent colours the moving parts.
  • Four new icons, drawn flat, pixel and outline: coin (flips), tea (the tag swings), pizza (the slice pulls away) and music (a note floats up).
  • Look change: every 1.0 icon now moves on hover: the heart beats, the coffee steams, the star turns (a pixel star pulses), the gift's lid hops and the small sparkles twinkle. Their still drawings are unchanged; pass animate: 'none' to keep them still.
  • mount() takes nudgeAfter: seconds before one small wiggle, at most once per visit, never while tucked, hidden, already hovered or focused, or for people who ask for less motion. nudge(button, seconds) does the same for a button already on the page.
  • Reduced motion now also turns off every new effect, and wins over a site's own transitions on the button.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 10:52
3ec9530
  • Breaking: escapeHtml and safeHref are no longer exported. tipjar() still checks every link and escapes every text option inside; they were never meant as general-purpose helpers.
  • The README has a Stability section saying what semver covers from 1.0.
  • The package now includes CHANGELOG.md.
  • Look change: on a dark page (prefers-color-scheme: dark) the default button is now light (#f4f1ea fill, #1f1d2b label) with a dark ring, instead of a dark button with a white halo. Only tipjar's fallbacks change: a --tipjar-bg, --tipjar-label or --tipjar-ring you set still wins.
  • In forced-colours mode (Windows High Contrast) the button gets a LinkText border, so it still reads as a button.
  • The hover lift only applies on devices that can hover, so it no longer sticks after a tap on a phone.
  • Security: href with control characters before the scheme, such as "\u0001javascript:…", was let through as a relative link, but browsers drop those characters and run it as javascript:. It now throws like any other unsafe link.
  • With newTab, screen readers now hear "(opens in a new tab)" after the label. Change the words with the new newTabHint option, or pass '' for none. The link still has no noreferrer; the README explains why and how to hide the referrer site-wide.
  • tuck(button, watch) tucks a button that's already on the page, such as server-rendered tipjar() markup, and returns a function that stops. mount() uses it.
  • hideWhenVisible (and tuck) take several elements: a selector watches every match, or pass a list. The button tucks while any of them is on screen.
  • A hideWhenVisible selector that matches nothing now warns in the console instead of silently doing nothing.
  • Breaking: tipjar now supports Node 22 and newer (engines.node is >=22), since Node 20 reached end of life. CI tests Node 22, 24 and 26.

v0.1.0 First Release

Choose a tag to compare

@mtblck mtblck released this 02 Nov 03:17
02f83a6

First version

  • tipjar(), mount(), icon(), style.css, and five icons (heart, coffee, star, gift, sparkle) drawn flat, pixel and outline.