Skip to content

Browser userscript to explain selected text using LLM with follow-up chat, web search, and Anki integration

Notifications You must be signed in to change notification settings

happyjake/text-explainer-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Text Explainer X

A browser userscript that explains selected text using LLM with follow-up chat, web search, and Anki integration.

Features

  • Text Explanation: Select any text and get instant explanations
    • Single words: Definition, pronunciation (IPA), context, example sentences
    • Phrases/sentences: Translation with tone preservation
    • Long text (500+ words): Structured summary with key points
  • Follow-up Chat: Ask follow-up questions about the explanation
  • Web Search: Integrated search via Brave, Kagi, or Tavily for current information
  • Anki Integration: Save vocabulary and knowledge as flashcards
  • Multi-provider LLM Support: OpenRouter, OpenAI, Anthropic, Gemini
  • Customizable: Keyboard shortcuts, floating button, response language

Installation

  1. Install a userscript manager:

  2. Install the script:

Configuration

Click the Tampermonkey icon and select "Text Explainer Settings" to configure:

Setting Description
Provider LLM provider (OpenRouter, OpenAI, Anthropic, Gemini)
Model Model name (e.g., openai/gpt-4o-mini)
Base URL API endpoint URL
API Key Your API key for the provider
Search Web search provider (Brave, Kagi, Tavily) + API key
Anki AnkiConnect endpoint URL + API key
Language Response language (Chinese, English, Japanese, etc.)
Shortcut Keyboard shortcut (default: Alt+D)
Float Btn Floating button for touch devices

Usage

  1. Select text on any webpage
  2. Press Alt+D (or your configured shortcut)
  3. View the explanation in the popup
  4. Ask follow-up questions or add to Anki

Credits

  • Original script: Text Explainer by RoCry
  • Enhanced version with follow-up chat, web search, and Anki integration

License

MIT License

About

Browser userscript to explain selected text using LLM with follow-up chat, web search, and Anki integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published