Skip to content

About

A lightweight WebExtension that adds customizable actions to both your right-click context menu and an interactive floating selection toolbar. Supports URL templates, browser speech synthesis, and custom Kokoro TTS servers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Right Click Actions

CI - Lint & Validate Release GHCR Package License: MIT

A lightweight WebExtension that adds customizable actions to both your right-click context menu and an interactive floating selection toolbar. Supports URL templates, browser speech synthesis, and custom Kokoro TTS servers.


✨ Features

  • Context Menu & Floating Toolbar: Quickly trigger actions from either right-clicking or selecting text directly on any webpage.
  • Dynamic URL Templates: Build custom search/lookup URLs using {text}, {lang_from}, and {lang_to} placeholders.
  • Kokoro TTS Integration: High-quality neural Text-to-Speech support via OpenAI-compatible endpoints with configurable speed, voice, and credentials.
  • Built-in Speech Synthesis: Native browser text-to-speech with ext:speak.
  • Clean Configuration UI: Modern options page with live auto-save, inline delete protection, and toast feedback.
  • Minimal Permissions: Operates with strict minimal permissions (contextMenus, storage).

🛠 Project Structure

├── background.js              # Background script (context menus, tab management, Kokoro API)
├── content.js                 # Content script (floating selection toolbar, audio playback)
├── options.html / .js         # Configuration page for actions, language, and TTS settings
├── style.css                  # Modern responsive design system for options UI
├── manifest.json              # WebExtension Manifest V3
├── Dockerfile                 # Minimal OCI container for GHCR packaging
├── .github/workflows/
│   ├── ci.yml                 # Automated linting & validation on PRs and pushes
│   └── release.yml            # Release workflow (GitHub Release + GHCR package push)
└── package.json               # Developer scripts and web-ext lint tool

📦 GitHub Container Registry (GHCR)

Packages are automatically published to GHCR on every tagged release:

docker pull ghcr.io/mcavdar/right-click:latest

Extract extension files from the container image:

docker create --name rca ghcr.io/mcavdar/right-click:latest
docker cp rca:/extension ./right-click-extension
docker rm rca

🚀 Local Development

1. Load in Firefox

  1. Open Firefox and navigate to about:debugging#/runtime/this-firefox.
  2. Click "Load Temporary Add-on...".
  3. Select manifest.json from this repository.

2. Run Linting Locally

npm run lint

3. Build Distribution Archive

npm run build

The packaged .zip extension will be generated inside the dist/ directory.


🔄 CI/CD Workflows

1. Continuous Integration (ci.yml)

  • Runs on every push and PR to main / master.
  • Validates manifest.json and runs web-ext lint.
  • Validates test build packaging.

2. Release & GHCR Publish (release.yml)

  • Triggers on version tag push (e.g. git tag v3.0.0 && git push origin v3.0.0) or manual workflow dispatch.
  • Builds the WebExtension .zip distribution archive.
  • Creates a GitHub Release with downloadable assets.
  • Builds and publishes the OCI/Docker container package to GitHub Container Registry (ghcr.io/mcavdar/right-click).

About

A lightweight WebExtension that adds customizable actions to both your right-click context menu and an interactive floating selection toolbar. Supports URL templates, browser speech synthesis, and custom Kokoro TTS servers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages