How alex22379/smkid-konsekvenshjulet works
S/M-KIDs Konsekvenshjul is a small client-side consequence wheel for a student council. On startup, its JavaScript fetches consequences from Google Apps Script, falls back to a local JSON list if that fetch fails, shuffles the results, and builds the wheel. A user clicks the wheel to spin it; while spinning, the app updates the displayed consequence and plays a tick sound. The source excerpt shows these runtime links; HTML and styling details are not sampled.
Main entry points: main.js Wheel runtime · consequences.json Fallback list · tick.wav Tick sound
Components 5
Consequence wheel
- Wheel runtime
frontend/main.js
Other components
- User
- Apps Script list
- Fallback list
frontend/data/consequences.json - Tick sound
frontend/assets/tick.wav
Connections 4
- User → Wheel runtime: clicks
frontend/main.js - Wheel runtime → Apps Script list: fetches list
frontend/main.js - Wheel runtime → Fallback list: fallback fetch
frontend/main.js - Wheel runtime → Tick sound: loads sound
frontend/main.js