vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Load the Prism worker from the static route
9a9e708c1def7250086e612cdee88e1ea12298ab · Keenan Nemetz · 21d ago · parent 7c02af12
Load the Prism worker from the static route The highlighting script asked for /static/prism-worker.js, but every browser asset is served under /-/static/. The request fell through to the HTML 404 page, so the browser refused the worker for its MIME type and every blob stayed plain. HTMX also compiles an hx-trigger filter with Function(), which script-src 'self' blocks. The two polling triggers used a visibility filter for that; drop the filter, pause the request in app.js while the tab is hidden, and turn eval off in the HTMX config so a future filter is caught instead of failing in production. Tests hold the worker to its route and the templates to trigger forms that do not need eval.
server/issues_changes_test.go +2−2
| @@ -557,7 +557,7 @@ func TestChangeLinksIssuesFromTheIssuesSection(t *testing.T) { | |||
| 557 | 557 | `id="request-issues"`, "First linked issue", `value="` + first + `"`, | |
| 558 | 558 | `value="remove"`, `request-unlink`, `class="request-issue-search"`, | |
| 559 | 559 | `hx-get="/` + f.repo + `/changes/` + id + `/live"`, | |
| 560 | `hx-trigger="every 20s [document.visibilityState === 'visible']"`, `hx-swap="none"`, | ||
| 560 | `hx-trigger="every 20s"`, `hx-swap="none"`, | ||
| 561 | 561 | } { | |
| 562 | 562 | if !strings.Contains(page, want) { | |
| 563 | 563 | t.Fatalf("the request page is missing %q:\n%s", want, page) | |
| @@ -1393,7 +1393,7 @@ func TestRepoTabCountsPollOutOfBand(t *testing.T) { | |||
| 1393 | 1393 | `id="repo-issue-count"`, | |
| 1394 | 1394 | `id="repo-request-count"`, | |
| 1395 | 1395 | `hx-get="/` + f.repo + `/counts"`, | |
| 1396 | "every 30s [document.visibilityState === 'visible']", | ||
| 1396 | `hx-trigger="every 30s"`, | ||
| 1397 | 1397 | } { | |
| 1398 | 1398 | if !strings.Contains(page, want) { | |
| 1399 | 1399 | t.Fatalf("the repository header does not show %q:\n%s", want, page) | |