20 lines
497 B
Markdown
20 lines
497 B
Markdown
# ADR 0002 — Preferences module for items-per-page (localStorage) and DOM initializer
|
|
|
|
**Date:** 2025-09-02
|
|
|
|
## Context
|
|
|
|
Persist the user's preferred items-per-page with minimal risk while keeping static deploy.
|
|
|
|
## Decision
|
|
|
|
- Add `src/state/prefs.js` with getters/setters + DOM binder.
|
|
- Add `scripts/init-prefs.mjs` to auto-init on DOM ready.
|
|
|
|
## Consequences
|
|
|
|
- Add one line to `index.html` after main script:
|
|
```html
|
|
<script type="module" src="./scripts/init-prefs.mjs"></script>
|
|
```
|