Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Celebrate a landed change request, once

c8fa5759b293126f1b247abc746bc339791568cb · Keenan Nemetz · 13d ago · parent 53ff967b

Celebrate a landed change request, once

A successful landing now redirects with ?merged=1, and app.js answers that
parameter by fetching static/confetti.browser.js (canvas-confetti 1.9.3, ISC)
and firing one burst. The flag is removed from the address as soon as it is
read, so a reload, a bookmark or a shared link is an ordinary visit, and no
page without the parameter ever requests the bundle. The library honours
prefers-reduced-motion through disableForReducedMotion, and reset() before
firing means a page restored from the back/forward cache cannot stack a
second canvas.

The asset is vendored the way htmx and Lucide are: the file is unmodified
from the published npm tarball, with the license beside it, so script-src
'self' stays as it is. It is deliberately not in the page shell, because
Static() serves assets uncompressed and a shell script would make every page
pay for a celebration only one page uses.

Refs #01M5XZ7T4R88BA9KV1KTSV7ZXP

server/web/templates.go +5

@@ -21,6 +21,11 @@ package web
21 21 //
22 22 // Static assets are served from /static/ and never inlined into a template. The
23 23 // passkey script is a static asset too; it runs under the same CSP as the rest.
24 //
25 // Two scripts are vendored beside the assets that load them. htmx.min.js is loaded
26 // by the shell on every page. confetti.browser.js (canvas-confetti 1.9.3, ISC, see
27 // static/canvas-confetti.LICENSE) is not: app.js fetches it only on a page that a
28 // landing redirected to, so the rest of the instance never pays for it.
24 29
25 30 import (
26 31 "embed"