A lightweight, client-side web app that picks a random Seinfeld episode from the full canonical list of 180 episodes. Built as a static site with no backend. Just open it and spin the wheel!
- Uniformly samples from all 180 Seinfeld episodes (Seasons 1–9)
- Displays the season number, episode number, and title
- Fetches an episode still image dynamically via the TVmaze API
- Links directly to the show on Netflix
- Swipe left or right on touch devices to get another episode
- Dark and light mode, with automatic detection based on system preference
- Installable as a Progressive Web App (PWA)
- Fully responsive, works on desktop and mobile
- All 180 episodes are stored in a canonical array in
script.js, each entry containing the season number, episode number, and title. - When the user clicks Pick an Episode (or swipes), a random index is chosen with
Math.floor(Math.random() * episodes.length), giving each episode an equal probability of being selected. - The UI updates the season badge, episode number, and title immediately.
- An asynchronous request is made to the TVmaze API to retrieve the episode still image, which is displayed once loaded.
.
├── index.html # App shell and markup
├── style.css # All styling, including dark/light mode
├── script.js # Episode data, sampling logic, and UI behavior
├── manifest.json # PWA web app manifest
├── service-worker.js # Service worker for offline/PWA support
├── icons/
│ ├── icon-192.png # PWA icon (192 × 192)
│ └── icon-512.png # PWA icon (512 × 512)
└── LICENSE
The app includes a manifest.json and a service-worker.js, which enable it to be installed as a Progressive Web App on supported devices and browsers.
- On Android (Chrome), an Install app button appears in the top bar when the install prompt is available.
- On desktop Chrome and Edge, the browser may also offer an install option in the address bar.
- Episode images are fetched from the TVmaze API. If an episode has no image in their database, a fallback message is displayed instead.
- PWA install prompt behavior varies by browser. On iOS (Safari), the standard
beforeinstallpromptevent is not supported; users can still add the app to their Home Screen manually via the Share menu.
- Episode data: manually compiled canonical list of 180 Seinfeld episodes from Wikipedia
- Episode images: TVmaze API
- Seinfeld © NBC / Castle Rock Entertainment
This project is licensed under the MIT License. See the LICENSE file for details.