Skip to content

About

Chrome extension that summarizes the current webpage or YouTube video using a locally hosted LM Studio instance. Supports transcript-based YouTube summaries, parallel title/summary generation (LM Studio ≥ 0.4.0), selectable models, and persistent local settings.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Website Summarizer - Chrome Extension

A powerful Chrome extension that summarizes any website using your local LM Studio instance. Features special support for YouTube videos with automatic transcript extraction and parallel processing capabilities for faster results.

Features

  • Universal Website Summarization: Summarize any webpage with a single click
  • YouTube Support: Automatically extracts video transcripts for accurate video summaries
  • Parallel Processing: For LM Studio >=0.4.0, uses parallel API calls for faster results
  • Local AI Processing: All processing happens locally using your LM Studio instance
  • Persistent Settings: Configuration is saved locally and persists across browser restarts
  • Model Selection: Choose from available models in your LM Studio instance
  • Smart Content Extraction: Intelligently extracts main content while filtering out ads and navigation

Features by Page Type

Regular Webpages

  • Generates a concise title
  • Creates a comprehensive summary
  • Uses parallel processing (LM Studio >=0.4.0) for faster results

YouTube Videos

  • Extracts video transcripts automatically
  • Generates a title based on video content
  • Creates separate summaries for:
    • Video content (from transcript)
    • Page content (description, comments, etc.)
  • Uses parallel processing (LM Studio >=0.4.0) for all three tasks simultaneously

Prerequisites

  1. LM Studio installed and running

    • Download from: https://lmstudio.ai/
    • Version 0.4.0 or higher recommended for parallel processing support
    • Must have at least one model loaded
  2. Chrome Browser (or Chromium-based browser like Edge, Brave, etc.)

Installation

1. Install LM Studio

  1. Download and install LM Studio from https://lmstudio.ai/
  2. Download and load a model (recommended: Llama 3, Mistral, or similar)
  3. Start the local server:
    • Click on the "Local Server" tab
    • Click "Start Server"
    • Note the URL (typically http://localhost:1234)

2. Install the Extension

Option A: From Source (Recommended for Development)

  1. Clone or download this repository
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode" (toggle in the top-right corner)
  4. Click "Load unpacked"
  5. Select the extension directory (the folder containing manifest.json)

Option B: From .crx file (if packaged)

  1. Download the .crx file
  2. Open Chrome and navigate to chrome://extensions/
  3. Drag and drop the .crx file onto the extensions page

3. Configure the Extension

  1. Click on the extension icon in Chrome's toolbar
  2. Click "Settings" button
  3. Enter your LM Studio configuration:
    • LM Studio URL: Enter your LM Studio server URL (e.g., http://localhost:1234)
    • LM Studio Version: Enter your LM Studio version (e.g., 0.4.0)
    • Model: Click "Test Connection" to load available models, then select one
  4. Click "Test Connection" to verify the connection
  5. Click "Save Settings"

Usage

Summarizing a Webpage

  1. Navigate to any webpage you want to summarize
  2. Click the Website Summarizer extension icon
  3. Click "Summarize Page"
  4. Wait for the AI to process the content (this may take 10-30 seconds depending on page size and model)
  5. View the results:
    • Title: AI-generated concise title
    • Summary: Comprehensive summary of the page content

Summarizing a YouTube Video

  1. Navigate to any YouTube video
  2. Click the Website Summarizer extension icon
  3. The extension will automatically detect it's a YouTube page
  4. Click "Summarize Page"
  5. The extension will:
    • Attempt to extract the video transcript
    • Process the transcript and page content
  6. View the results:
    • Title: AI-generated title based on video content
    • Video Summary: Summary of the video content (from transcript)
    • Page Summary: Summary of the page content (description, comments, etc.)

Note: If transcript extraction fails, the extension will fall back to summarizing the page content only.

Parallel Processing

For LM Studio version 0.4.0 and higher, the extension uses parallel API calls to generate results faster:

  • Regular pages: Title and summary are generated simultaneously
  • YouTube videos: Title, video summary, and page summary are generated simultaneously

This can reduce processing time by up to 50-70% compared to sequential processing.

Settings

LM Studio URL

The URL where your LM Studio server is running. Default is http://localhost:1234.

LM Studio Version

Your LM Studio version. Versions 0.4.0 and higher support parallel processing.

Model

The AI model to use for summarization. Models can be selected after testing the connection.

Troubleshooting

"Not configured" Error

  • Make sure you've configured the extension in Settings
  • Verify LM Studio is running and the server is started
  • Click "Test Connection" in Settings to verify

"No models available"

  • Make sure you've loaded at least one model in LM Studio
  • Restart LM Studio and try again
  • Check that the LM Studio server is running

"Failed to extract transcript" (YouTube)

  • Some videos don't have transcripts available
  • The extension will fall back to summarizing page content
  • Try enabling captions on the video first

"Not enough content to summarize"

  • Make sure the page has fully loaded before clicking summarize
  • Some pages may have content that's loaded dynamically
  • Try scrolling down to load more content, then try again

Connection Errors

  • Verify LM Studio is running
  • Check that the URL in settings is correct
  • Make sure no firewall is blocking the connection
  • Try accessing the URL in your browser (e.g., http://localhost:1234/v1/models)

Slow Processing

  • Processing time depends on:
    • Model size and speed
    • Page content length
    • Your computer's performance
  • Consider using a smaller/faster model for quicker results
  • For LM Studio <0.4.0, upgrade to 0.4.0+ for parallel processing

Privacy

This extension:

  • Processes all data locally on your machine
  • Does not send any data to external servers
  • Only communicates with your local LM Studio instance
  • Stores settings locally in Chrome's storage

Development

Project Structure

Site-Summarizer/
├── manifest.json              # Extension manifest
├── popup.html                 # Main popup UI
├── popup.js                   # Popup logic
├── settings.html              # Settings page UI
├── settings.js                # Settings page logic
├── background.js              # Background service worker
├── content.js                 # Content script for page extraction
├── youtube-transcript.js      # YouTube transcript extractor
├── lmstudio-client.js        # LM Studio API client
├── storage.js                 # Storage utility
├── icons/                     # Extension icons
│   ├── icon16.png
│   ├── icon32.png
│   ├── icon48.png
│   └── icon128.png
└── README.md                  # This file

Building

No build process is required. The extension can be loaded directly in Chrome as an unpacked extension.

Testing

  1. Load the extension in Chrome
  2. Configure LM Studio settings
  3. Test on various websites:
    • News articles
    • Blog posts
    • YouTube videos
    • Documentation pages

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Technical Details

Content Extraction

  • Removes scripts, styles, navigation, ads, and other non-content elements
  • Attempts to identify main content areas using common selectors
  • Falls back to full page content if main content can't be identified

YouTube Transcript Extraction

  • First attempts to extract from page's ytInitialPlayerResponse
  • Falls back to UI extraction if needed
  • Prefers English captions when available
  • Handles multiple caption formats

LM Studio API

  • Uses OpenAI-compatible API format
  • Supports both sequential and parallel processing
  • Configurable temperature and max tokens
  • Error handling and retries

Known Limitations

  • YouTube transcript extraction may not work on all videos
  • Some websites with heavy JavaScript may not extract content properly
  • Very large pages may hit token limits
  • Processing time varies significantly by model and hardware

License

MIT License - see LICENSE file for details

Support

For issues, questions, or suggestions:

  • Open an issue on GitHub
  • Check existing issues for solutions

Version History

1.0.0 (Initial Release)

  • Basic website summarization
  • YouTube transcript extraction
  • Parallel processing support (LM Studio >=0.4.0)
  • Local storage for settings
  • Model selection

Acknowledgments

  • Built for use with LM Studio (https://lmstudio.ai/)
  • Uses OpenAI-compatible API format
  • Inspired by the need for local, private AI-powered summarization

About

Chrome extension that summarizes the current webpage or YouTube video using a locally hosted LM Studio instance. Supports transcript-based YouTube summaries, parallel title/summary generation (LM Studio ≥ 0.4.0), selectable models, and persistent local settings.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages