A Chrome extension that interrupts your YouTube Shorts sessions, quizzes what you actually watched, and has ancient philosophers roast you with an AI receipt.
- Install dependencies:
npm install- Copy
.env.exampleto.env.localand fill it in:
OPENAI_API_KEY=your_openai_api_key_here
DEMO_PASSWORD=choose_a_private_demo_password
OPENAI_MODEL=gpt-4o-mini
OPENAI_VISION_MODEL=gpt-4o-miniThe demo password is what you'll enter in the extension popup. Keep the OpenAI key out of the extension/ folder entirely.
- Run the dev server:
npm run dev- Go to
chrome://extensions - Turn on Developer mode
- Click
Load unpacked - Select the
extensionfolder - Open any
youtube.com/shorts/URL
The summons timing is randomized on purpose so the extension doesn't feel predictable. Hit End Session when you want the final receipt.
- Don't commit
.env.local - Don't put your
OPENAI_API_KEYanywhere insideextension/ - The extension never touches video files, audio, transcripts, cookies, or your account. It reads captions, grabs one temporary frame screenshot per Short, and uses metadata. Screenshots go to
/api/analyze-frameand are not stored - If OpenAI fails or the key is missing, the API falls back to a hardcoded receipt
- Everything else (stats, evidence, your demo password) lives in
chrome.storage.local
| File | What it does |
|---|---|
extension/manifest.json |
Manifest V3 config |
extension/content.js |
Injects the trial panel, tracks URLs, buffers captions, picks evidence, fires quiz and receipt requests |
extension/background.js |
Handles API calls from the extension context, captures temporary frame screenshots |
extension/assets/ |
Philosopher portraits and the jumpscare sound |
extension/popup.html / popup.js |
The extension popup and its storage controls |
POST /api/generate-receipt
{
"demoPassword": "your_demo_password",
"watchedCount": 12,
"wisdom": 38,
"courtMood": "Deeply suspicious",
"quizCount": 4
}POST /api/analyze-frame
Takes an imageDataUrl plus metadata, returns:
{
"summary": "appears to show broad visual context",
"topics": ["fitness"],
"confidence": "medium"
}POST /api/generate-quiz
Takes selectedEvidence and returns a 4-option quiz. Captions are weighted highest, frame summaries medium, metadata lowest.
{
"question": "What detail did the Short focus on?",
"answers": [
{ "text": "...", "correct": true },
{ "text": "...", "correct": false },
{ "text": "...", "correct": false },
{ "text": "...", "correct": false }
]
}