In QUI when.rendered: when webkitSpeechRecognition is available, start continuous zh-TW recognition with interim results; otherwise show an alert.
onresult debounces 500ms, then matches keywords: 現在/當前時間 → setTime, 現在/當前年份 → setYear, 現在/當前日期 → setDate, 現在/當前秒數 → setSec (each refreshed every 1s by setInterval).
'計時N分鐘' / '計時N秒' parsed by regex start setCountDown; '停止' calls setStop (all digits '-'); other speech of 2+ chars and onerror/onend show a face (setFace: eyes + mouth).
declared in SCSS (index.scss / _init.scss); no font stylesheet linked
Web Speech API (webkitSpeechRecognition)
-
browser built-in
Styling
Item
Value
SCSS entry
sass/index.scss
Output CSS
css/index.css
Partials
_init.scss, function/_hsbTohsl.scss
_init holds the reset; function/_hsbTohsl provides hsb()/hsba(). index.scss sizes the clock with --width: calc(100vw / 40), --height and --triHeight, and toggles segment opacity per [data-value] (0-9, '-', eye, mouth/none for the colon).