There are 76 alert() call sites across the eight tools — three different ad-hoc error-surfacing patterns (alert, console.error, classifier's own showToast). Touching every site is a sweep with no judgment payoff: every alert is "something went wrong, the user should know," which is exactly what toast at level='error' is for. Shim is one if-block at the bottom of shared/toast.js. It saves the native window.alert as window.alertNative (so any truly modal-blocking call site can opt back in by name), then replaces window.alert with a function that forwards through window.zddc.toast(msg, 'error'). Effect is global — every existing alert in every tool becomes a non-blocking, ARIA-announced (aria-live=assertive) toast that the user can click to dismiss. handler/tables.html refreshed by ./build as a side effect (it bakes the current tables/dist/ into the binary every build). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| vendor | ||
| base.css | ||
| build-lib.sh | ||
| build-words.txt | ||
| favicon.svg | ||
| hash.js | ||
| help.js | ||
| logo.css | ||
| logo.js | ||
| nav.css | ||
| nav.js | ||
| preview-lib.js | ||
| theme.js | ||
| toast.css | ||
| toast.js | ||
| zddc-filter-test.html | ||
| zddc-filter.js | ||
| zddc-source.js | ||
| zddc-test.html | ||
| zddc.js | ||