A Chrome extension that summarises web pages, selected text, and YouTube transcripts using the OpenAI API (defaulting to GPT-4o-mini). It also includes ChatGPT integration for asking questions and fact-checking, plus a simple paywall blocker feature. This plugin is designed to help you quickly generate concise or detailed summaries and verify information directly in your browser.
- Web Page Summarization: Automatically extracts the main content of a web page using Mozilla's Readability library and sends it for summarization.
- YouTube Transcript Summarization: Extracts available transcripts from YouTube videos and summarizes them.
- Selected Text Summarization: Summarize only the text you highlight on a page.
- ChatGPT Integration:
- Send to ChatGPT: Opens ChatGPT in a new tab with the article/video content pre-filled, allowing you to ask follow-up questions interactively.
- Fact Check: Automatically sends content to ChatGPT with a specialized prompt to fact-check key claims using credible sources.
- Both features use intelligent DOM injection with multiple fallback strategies to ensure compatibility with ChatGPT's interface.
- Copy to Clipboard:
- Copy YouTube transcripts with metadata (title, channel, date, word count).
- Copy article content with metadata (title, published date, URL, word count).
- Article & Text Reading (Text-to-Speech):
- Read full articles aloud in a sidebar with playback controls.
- Read only highlighted text aloud using the same on-page reader.
- Context Menu Integration:
- Summarise the current page or highlighted text via right-click.
- Read full articles or selected text aloud via right-click TTS options.
- Configurable Summarization:
- Choose the OpenAI model (e.g.,
gpt-4o-mini,gpt-4, etc.). - Set maximum tokens for the summary.
- Adjust the creativity/randomness using the temperature setting.
- Define custom system prompts for both general text and YouTube transcript summarization.
- Choose the OpenAI model (e.g.,
- Site Blocker (paywall bypass): Maintain a list of website origins to block. On blocked sites the extension: stops the page load early (once the body exists) so paywall scripts do not complete; blocks known paywall API requests (e.g. GraphQL member/paywall queries) via
fetchand XHR hooks; and hides common paywall overlay elements. Add origins via the popup or options page. Works best on sites that use Tinypass/Piano-style paywalls; effectiveness depends on site structure. - API Key Management: Securely store your OpenAI API key in Chrome's sync storage or load it locally from a
key.txtfile (useful for development, ignored by.gitignore). - Debug Logging: Maintains a detailed log of actions in local storage, which can be downloaded from the options page for troubleshooting.
- Summary Display: Shows summaries in a clean overlay on the current page, including metadata like original word count and estimated read time.
-
Clone: Use Git to clone the repository:
git clone https://github.com/adamlove86/chrome-gpt-summary.git cd chrome-gpt-summary -
Download: Alternatively, download the repository as a ZIP file from GitHub and extract it to a local folder.
- Open your Chrome or Edge browser.
- Navigate to the extensions page:
- Chrome:
chrome://extensions/ - Edge:
edge://extensions/
- Chrome:
- Enable Developer mode using the toggle switch (usually in the top-right corner).
- Click the Load unpacked button.
- Browse to the directory where you cloned or extracted the repository (the folder containing
manifest.json) and select it.
- Click the extension's icon (puzzle piece icon) in your browser toolbar and find the "Summarise with GPT-4o-mini" icon. You might need to pin it for easy access.
- Click the extension icon to open the popup.
- Go to Options.
- API Key:
- Enter your OpenAI API key in the designated field. You need an account with OpenAI to get a key.
- Alternatively (for development): Create a file named
key.txtin the extension's root directory and paste your API key into it. The extension will prioritize the key fromkey.txtif it exists. Note:key.txtis included in.gitignoreand should not be committed.
- Settings: Adjust the OpenAI model, max tokens, temperature, and custom prompts as desired.
- Blocked Sites: Manage your list of blocked website origins here.
- Click Save Settings.
- Summarize Current Page:
- Navigate to the web page or YouTube video you want to summarize.
- Click the extension icon in your toolbar.
- Click the 📄 Summarise Page button in the popup.
- Alternatively: Right-click anywhere on the page (not on a link or selected text) and choose "Summarise with ChatGPT" from the context menu.
- Summarize Selected Text:
- Highlight the text you want to summarize on any web page.
- Right-click on the selected text.
- Choose "Summarise with ChatGPT" from the context menu.
- Read Full Article Aloud (Popup):
- Navigate to an article page (non-YouTube).
- Click the extension icon.
- Click 🔊 Read Article to open the sidebar reader and listen to the full article text.
- Read Full Article Aloud (Right-Click):
- On an article page, right-click anywhere on the page (not on a link or selected text).
- Choose "🔊 Read Article (TTS)" from the context menu.
- Read Highlighted Text Aloud (Right-Click):
- Highlight any text on a page.
- Right-click on the selection.
- Choose "🔊 Read Selected Text (TTS)" to open the sidebar reader for just that selection.
-
Send to ChatGPT (Interactive Questions):
- Navigate to an article or YouTube video.
- Click the extension icon.
- Click the 💬 Send to ChatGPT button.
- ChatGPT will open in a new tab with the content pre-filled and auto-submitted.
- You can then ask follow-up questions about the content.
-
Fact Check Content:
- Navigate to an article or YouTube video.
- Click the extension icon.
- Click the 🔍 Fact Check button.
- ChatGPT will open with a specialized fact-checking prompt, analyzing key claims using credible sources.
- Copy Transcript/Content:
- For YouTube videos: Click 📋 Copy Transcript to copy the transcript with metadata.
- For articles: Click 📋 Copy Content to copy the article text with metadata.
- Block Current Site:
- Navigate to the site you want to block.
- Click the extension icon.
- Click the 🚫 Block Paywall Site button. Confirm the site origin in the prompt.
- View/Download Debug Logs:
- Go to the ⚙️ Options page.
- Click the Download Debug Log button or View Recent Logs.
- The extension uses a background service worker (
background.js) for handling API calls, context menus, and message passing. - Content scripts (
contentScript.js,youtubeTranscript.js,content_blocker.js) are injected at document start:content_blocker.jsruns first on blocked origins to apply early stop, request blocking, and overlay hiding. - ChatGPT integration (
chatgpt_inject.js) uses ProseMirror-aware DOM manipulation to auto-fill and submit prompts with multiple selector fallbacks. Readability.jsis used for extracting the main article content from web pages.- Summaries and errors are displayed using dynamically injected scripts (
displaySummary.js,displayError.js). - Settings are stored using
chrome.storage.sync(for settings) andchrome.storage.local(for logs and latest summary data).
The extension can automatically open ChatGPT and submit content by:
- Opening a new tab to
https://chatgpt.com/ - Waiting for page load and React initialization
- Injecting text into a hidden data element
- Using
chatgpt_inject.jsto:- Find ChatGPT's ProseMirror editor (
#prompt-textarea) - Set text in the internal
<p>element - Dispatch proper input events for React compatibility
- Click the send button (
data-testid="send-button")
- Find ChatGPT's ProseMirror editor (
- Falling back to clipboard copy if DOM structure changes or user isn't logged in
The system uses multiple selector strategies and retry logic to maintain compatibility as ChatGPT's interface evolves.
On blocked origins the content script (content_blocker.js, run_at: document_start):
- Early stop — Waits for
document.body(or a short timeout), then callswindow.stop()so further scripts and requests (including paywall bootstrap) are aborted. - Request blocking — Hooks
fetchandXMLHttpRequestto block requests whose URL matches known paywall query patterns (e.g. member/paywall GraphQL), so those API calls never complete even if they are initiated. - Overlay neutralizer — Injects CSS and a throttled
MutationObserverto hide common paywall/piano/meter elements and restore scroll.
Sites using Tinypass/Piano-style paywalls are the primary target; behaviour may vary by site.
This project is licensed under the MIT License - see the LICENSE file for details.
Previous versions may have been under GPL-3.0, but the current license file is MIT.
Contributions, issues, and feature requests are welcome. Feel free to fork the repository and submit pull requests.
This extension uses the OpenAI API and requires a valid API key. Usage costs may apply based on OpenAI's pricing. The site blocking feature uses early stop, request blocking, and overlay hiding and may not work on all sites or against all paywall techniques.
