Skip to content

dangerouslyconfident/interYT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

interYT - YouTube Q&A Chrome Extension

AI-powered YouTube video analysis using Google's Gemini 2.5 Flash API

Version Chrome Extension License

interYT is a powerful Chrome browser extension that transforms how you interact with YouTube content. Get instant answers about video transcripts, analyze comments sentiment, generate summaries, and discover related content - all powered by Google's Gemini 2.5 Flash API.


✨ Features

Core Functionality

  • πŸ€– AI-Powered Q&A - Ask questions about video content with context-aware answers using Gemini 2.5 Flash
  • πŸ“ Video Summarization - Generate concise bullet-point summaries (up to 1536 tokens for comprehensive coverage)
  • πŸ’¬ Comment Analysis - Fetch and analyze top comments with AI-powered sentiment summaries (512 tokens)
  • πŸ”— Related Videos - Get AI-suggested videos with direct YouTube links (πŸ”—) or search fallback (πŸ”)
  • πŸ” Google Search Integration - Enriched answers with real-time external information

Enhanced Context

  • 🎯 Metadata Extraction - Automatically includes channel name and video description for richer AI responses
  • πŸ“‹ Auto-Fetch Transcripts - Seamlessly detects and loads YouTube transcripts
  • πŸ”— Timestamp Links - AI responses include clickable timestamps to jump to video moments

User Experience

  • 🎨 Modern Dark UI - Clean, professional interface with gradient accents
  • πŸ“Š 3-Tab Interface - Organized tabs for Q&A, Comments, and Tools
  • πŸ“œ Question History - Saves your last 5 Q&A sessions locally
  • πŸ”’ Secure Settings - Built-in settings page for easy API key management (encrypted by Chrome)

Export & Share

  • πŸ“„ PDF Export - Save Q&A history and summaries to PDF
  • πŸ“€ Social Sharing - Share insights via WhatsApp or Telegram

Maximum Token Limits (v0.7.2+)

  • Q/A Answers: 2048 tokens (~1500 words) - Complete, detailed responses
  • Video Summaries: 1536 tokens (~1150 words) - Comprehensive summaries
  • Comment Summaries: 512 tokens (~380 words) - Detailed sentiment analysis

πŸ“¦ Installation

Prerequisites

Steps

  1. Download Extension Files

    git clone https://github.com/dangerouslyconfident/interYT.git
    cd interYT
  2. Load Extension in Chrome

    • Open Chrome and navigate to chrome://extensions/
    • Enable Developer mode (toggle in top-right corner)
    • Click Load unpacked
    • Select the interYT folder
  3. Configure API Key

    • Right-click the interYT extension icon
    • Select Options
    • Paste your Gemini API key
    • Click Save
  4. Start Using

    • Visit any YouTube video
    • Click "..." below the video β†’ Show transcript
    • Click the interYT extension icon to start asking questions!

πŸš€ Usage

Asking Questions

  1. Open a YouTube video with transcripts available
  2. Click the interYT extension icon
  3. The transcript will auto-load
  4. Type your question in the input field
  5. Get AI-powered answers with Google Search integration

Example Questions:

  • "What are the main points discussed?"
  • "Summarize the video's conclusion"
  • "What examples were given about AI?"

Generating Summaries

  1. Go to the Tools tab
  2. Click Summarize Video
  3. Get a concise bullet-point summary (5-7 points)

Analyzing Comments

  1. Go to the Comments tab
  2. Click Fetch Comments
  3. View top comments and AI sentiment summary

Related Videos

  1. Go to the Tools tab
  2. Click Find Related Videos
  3. Get AI-suggested videos on similar topics

πŸ—οΈ Project Structure

interYT/
β”œβ”€β”€ manifest.json          # Extension configuration (Manifest V3)
β”œβ”€β”€ popup.html            # Main popup UI
β”œβ”€β”€ popup.js              # Core logic & Gemini API calls
β”œβ”€β”€ popup.css             # Styling with gradients & animations
β”œβ”€β”€ settings.html         # Settings page UI
β”œβ”€β”€ settings.js           # API key management
β”œβ”€β”€ content.js            # YouTube page scraper
β”œβ”€β”€ lib/
β”‚   └── jspdf.umd.min.js  # PDF export library (364KB)
β”œβ”€β”€ images/               # Extension icons (16px, 48px, 128px)
β”œβ”€β”€ demo/                 # Web-based demo interface
β”œβ”€β”€ server.py             # Python HTTP server for local testing
└── README.md             # This file

πŸ”§ Technical Details

API Integration

  • Model: Google Gemini 2.5 Flash (gemini-2.5-flash-preview-09-2025)
  • Features: System instructions, Google Search tool, context enrichment
  • Error Handling: Exponential backoff retry logic for 429/5xx errors
  • Token Limits: Maximized for complete responses (Q/A: 2048, Summaries: 1536, Comments: 512)

Security

  • API keys stored in chrome.storage.local (encrypted by Chrome)
  • Never transmitted except to Gemini API
  • No hardcoded credentials
  • Secure settings page with validation

Content Scraping

  • Multiple fallback DOM selectors for YouTube's changing structure
  • Resilient comment extraction
  • Automatic transcript detection
  • Console logging with [interYT] prefix for debugging

πŸ“‹ Changelog

v1.1.0 - Clickable YouTube Links (November 08, 2025)

  • πŸ”— Added: Related videos now include direct YouTube links when Gemini provides URLs
  • 🎯 Enhanced: Smart URL parser handles 9 different Gemini response formats (numbered lists, bullets, with/without URLs)
  • ✨ Visual Indicators: πŸ”— icon for direct video links, πŸ” icon for YouTube search fallback
  • πŸ›‘οΈ Backward Compatible: Gracefully falls back to YouTube search when URLs not available
  • πŸš€ Improved UX: Click opens exact video directly instead of searching - instant access!

v1.0.0 - Production Release - Share & Export Fixes (November 08, 2025)

  • πŸŽ‰ Stable Release: First production-ready version with all major features working reliably
  • πŸ› Fixed: Comment summary now properly stored for sharing/export (was showing "gemini-preview...")
  • πŸ“€ Enhanced: Share feature text limit increased from 150 to 400 characters for better context
  • πŸ’¬ Added: Comment sentiment summary now included in shared content
  • ✨ Complete: All features (Q&A, summaries, comments, export, share) fully functional

v0.9.0 - Loading Spinners & API Debugging Fix (November 08, 2025)

  • πŸ”„ Fixed: Loading spinners now ALWAYS stop - centralized hideCommentsLoaders() function
  • πŸ›‘οΈ Enhanced: 10-second timeout fallback prevents infinite spinners
  • πŸ” Debugging: Comprehensive Gemini API response logging (full structure, finish reasons, extraction paths)
  • πŸ§ͺ functionCall Handling: Added explicit support for functionCall responses with args parsing
  • πŸ“Š Traverse ALL Properties: Enhanced findTextInObject with cycle detection to search entire response
  • ✨ Reliability: All exit paths (timeout, early returns, errors) properly hide loaders

v0.7.2 - Maximum Token Limits Update (November 08, 2025)

  • πŸš€ Maximized: Q/A answers β†’ 2048 tokens (~1500 words) - no more cut-offs!
  • πŸ“ Expanded: Video summaries β†’ 1536 tokens (~1150 words) - comprehensive coverage
  • πŸ’¬ Doubled: Comment summaries β†’ 512 tokens (~380 words) - detailed sentiment analysis
  • ✨ Complete: All features now use maximum token limits for full-length responses

v0.7.1 - Summary Generation Hotfix (November 08, 2025)

  • πŸ› Fixed: Video summary generation (increased tokens 400β†’600, softened strict prompts)
  • πŸ”§ Enhanced: Comprehensive error logging for API response debugging
  • πŸ› οΈ Fixed: Regex bug in related videos Pattern 4 (escaped dash in character class)

v0.7.0 - Conciseness & Related Videos Fix (November 08, 2025)

  • πŸ“ Improved: Video summaries limited to 5-7 concise bullet points (400 tokens)
  • πŸŽ₯ Fixed: Related videos feature with robust multi-pattern parser (5 formats supported)
  • πŸ”§ Enhanced: Better Gemini prompts for "Title - Description" format
  • 🎯 UX: Summaries no longer feel overwhelming or cut off

v0.5.0 - Bug Fix & Stability Release (November 08, 2025)

  • πŸ› Fixed: Comment summary with intelligent fallback logic and validation
  • πŸ“œ Fixed: Proper scrolling for all content containers (no more cut-offs)
  • ✨ Enhanced: Uniform gradient scrollbars across all scrollable areas
  • πŸ”§ Improved: Smart API response parsing with whitelisted text-bearing keys
  • πŸ›‘οΈ Stability: Better error messages and graceful degradation

v0.4.1 - Professional Polish Update (November 08, 2025)

  • 🎨 Polished: Professional UI with abstract gradients and warm accents
  • ✨ Enhanced: Smooth crossfade transitions between tabs (150ms)
  • πŸ“œ Fixed: Overflow issues with custom gradient scrollbars
  • πŸ’« Added: Micro-interactions (ripple effects, tactile feedback, smooth hovers)
  • 🎯 Improved: Professional cubic-bezier easing for all transitions

v0.4.0 - Context Enrichment Update (November 08, 2025)

  • ✨ Added: Video metadata extraction (channel name & description)
  • 🧠 Enhanced: AI context now includes channel/description for more accurate answers
  • πŸ“‹ Added: 3-tab interface (Q&A, Comments, Tools)
  • πŸ›‘οΈ Resilient: Multiple fallback selectors for YouTube's changing DOM

v0.3.0 - Major Feature Update (November 08, 2025)

  • ✨ Added: Video summarization, timestamp-linked answers, related videos, PDF export
  • πŸ“€ Added: WhatsApp and Telegram sharing
  • πŸ”’ Security: Settings page for API key management (no more hardcoded keys)
  • πŸ› Fixed: Improved DOM selectors, better error messages, bundled jsPDF locally

πŸ› Known Issues & Limitations

  • Browser Extension Only: Cannot run directly in web browsers' built-in viewers (requires installation)
  • YouTube DOM Changes: YouTube frequently updates their page structure - extension uses multiple fallback selectors
  • Transcript Required: Videos must have transcripts enabled (auto-generated or manual)
  • API Key Required: Users must obtain their own free Gemini API key from Google AI Studio

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Workflow

  1. Edit files in your IDE/Replit
  2. Go to chrome://extensions in your browser
  3. Click the reload icon on interYT extension card
  4. Test on YouTube videos

Testing Checklist

  • Extension loads without errors
  • Settings page opens and saves API key
  • Transcript auto-fetches correctly
  • Q&A generates accurate responses
  • Comment fetching and summarization works
  • No console errors (check DevTools)
  • All spinners stop properly

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Google Gemini API - Powers all AI features
  • jsTXT - Enables TXT export functionality
  • YouTube - For the platform and content
  • Chrome Extensions Team - For the Manifest V3 platform

πŸ“ž Support & Resources


🎯 Future Roadmap

  • Import Q&A history
  • Custom AI prompt templates
  • Support for more video platforms (Vimeo, Dailymotion)
  • Batch comment analysis
  • Bookmark favorite Q&A sessions
  • Dark/light theme toggle
  • Keyboard shortcuts

Made with ❀️ by dangerouslyconfident & Special thanks to shwetankg07

If you found this helpful, consider giving it a ⭐ on GitHub!

About

an extension that makes youtube videos interactive using ai!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors