blame.ts
typescript
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
6 days ago
| 1 | /** |
| 2 | * blame.ts — interactivity for the code blame page. |
| 3 | * |
| 4 | * Registered as: window.MusePages['blame'] |
| 5 | */ |
| 6 | |
| 7 | export function initBlame(_data: Record<string, unknown>): void { |
| 8 | // Line hash navigation: highlight target line on load and hash change |
| 9 | function highlightTargetLine(): void { |
| 10 | document.querySelectorAll<HTMLElement>('.blm-code-row--targeted').forEach((el) => { |
| 11 | el.classList.remove('blm-code-row--targeted'); |
| 12 | }); |
| 13 | const hash = window.location.hash; |
| 14 | if (!hash) return; |
| 15 | const target = document.querySelector<HTMLElement>(hash); |
| 16 | if (target && target.classList.contains('blm-code-row')) { |
| 17 | target.classList.add('blm-code-row--targeted'); |
| 18 | target.scrollIntoView({ behavior: 'smooth', block: 'center' }); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | highlightTargetLine(); |
| 23 | window.addEventListener('hashchange', highlightTargetLine); |
| 24 | } |
File History
3 commits
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
6 days ago
sha256:3fadb0439bba9451b89229676971c0d4a40900dec7810e9d5f8791b8d950d505
fix: install.sh version from latest published tarball, not …
Sonnet 4.6
minor
⚠
97 days ago
sha256:763eb2cb8675073b84c19345b27586d2ed939a9aee97c5479b69f502f1a70eff
fix(tests): update test suite to match current implementation
Sonnet 4.6
patch
119 days ago