Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/chrome-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Chrome CI

on:
push:
pull_request:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm test

- name: Check syntax
run: npm run check:syntax

- name: Check manifest
run: npm run check:manifest

- name: Build Chrome package
run: npm run build:chrome

e2e:
runs-on: ubuntu-latest
needs: validate
steps:
- name: Check out repository
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium

- name: Run extension e2e tests
run: npm run test:e2e
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,19 @@ Network Trash Folder
Temporary Items
.apdisk

web-ext-artifacts
web-ext-artifacts
dist/
.omx/
node_modules/
test-results/
# AI Context
.cobridge

# .traerules
.traerules

# .cursorrules
.cursorrules

# GitHub Copilot Instructions
.github/copilot-instructions.md
94 changes: 88 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,100 @@
# Copy Text with Alt-Click

Easy and fast copy tool.
Easy and fast copy tool for Chrome MV3.

## Features

- Copy text from page elements with a configurable modifier key
- Hover preview overlay while holding the modifier
- Smart copy formatting for links and images
- Domain blacklist that disables both preview and copy behavior
- Quick popup controls for the current site
- Full tabbed settings center for General, Sites, Feedback, Language, and History
- User-selectable UI language override with English and Vietnamese
- Copy history panel with quick re-copy and delete actions
- Search and filter controls for local copy history
- Local analytics dashboard for copy, shortcut, block, domain, and selection activity
- Keyboard shortcut mode for hovered or focused targets
- Safe mode to skip rich-text editors and editable app surfaces
- Developer smart actions for JSON, SQL, JWT, timestamps, case transforms, and Base64

## Download

* [Add-ons for Firefox](https://addons.mozilla.org/ja/firefox/addon/copy-text-without-selecting/ "Copy Text with Alt-Click :: Add-ons for Firefox")
* [Chrome Web Store](https://chrome.google.com/webstore/detail/copy-text-with-alt-click/obhagoegpnbklgknnmbglghkfdidegkl?authuser=0&hl=en "Copy text with Alt-Click - Chrome Web Store")
- [Chrome Web Store](https://chrome.google.com/webstore/detail/copy-text-with-alt-click/obhagoegpnbklgknnmbglghkfdidegkl?authuser=0&hl=en "Copy text with Alt-Click - Chrome Web Store")

## Description

If you install this add-on, you do not need to select a text.
What is needed, just "Alt key & Click" on the text! That's all!
Install the extension, hold the configured modifier key, and click the target text.

The clicked text is copied immediately without manual selection in the common case.

## Architecture

- `src/background/` contains the MV3 startup, registration, shortcut, and local history-maintenance source modules
- `src/content/` contains content-script source for hover preview, extraction, copy behavior, history, and analytics
- `src/popup/` contains quick-control popup source modules
- `src/options/` contains settings and history-management source modules
- `src/shared/` contains shared settings, history, analytics, i18n, and runtime-safe Chrome API helpers
- `dist/chrome/` is the generated unpacked extension artifact

## Settings

- **Copy modifier**: `Alt`, `Ctrl`, or `Shift`
- **Hover preview**: toggles the dashed target overlay
- **Skip editable apps**: avoids contenteditable editors and rich text surfaces
- **Feedback duration**: controls how long copy feedback remains visible
- **Excluded domains**: one hostname per line, matched against the host and its subdomains
- **Extension language**: `Auto`, `English`, or `Vietnamese`
- **Copy history size**: controls how many recent copied items remain available
- **History search/filter**: filter by source, mode, and domain from the options page
- **Local analytics**: summary cards and top domains, stored locally only
- **Keyboard shortcut mode**: lets browser shortcuts trigger copy without requiring a click

## Development Target

- The repository is maintained for **Chrome MV3**
- `manifest.json` is the only supported shipping manifest
- Authored JavaScript source lives under `src/`
- Load unpacked from `dist/chrome/`, not from the repository root

## Development

Run the fast contract checks:

```bash
npm run validate
```

Run the browser automation smoke suite:

```bash
npm run test:e2e
```

Create a release zip:

```bash
npm run pack:chrome
```

## Manual Test Fixtures

The repo includes fixture pages and a checklist for manual browser verification:

- `fixtures/basic-copy.html`
- `fixtures/editable-surfaces.html`
- `fixtures/keyboard-shortcut.html`
- `fixtures/selection-copy.html`
- `fixtures/table-copy.html`
- `docs/browser-manual-test-checklist.md`

Serve the fixtures over HTTP before testing:

```bash
python -m http.server 4173
```

This alone, the text of the point you click will be copied.
The build output is written to `dist/chrome/` and the packaged archive is written to `dist/`.

![Screenshot](https://addons.mozilla.org/user-media/previews/full/193/193185.png?modified=1622132342)

Expand Down
98 changes: 97 additions & 1 deletion _locales/am/messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,101 @@
{
"copy": {
"message": "&ቅዳ"
},
"meta_key": {
"message": "Copy operation"
},
"meta_key_help": {
"message": "Append mode uses Shift together with your chosen copy modifier."
},
"excluded_domains_label": {
"message": "Excluded domains"
},
"excluded_domains_help": {
"message": "Enter one domain per line. Excluded domains disable both hover previews and copy actions. Example: figma.com blocks figma.com and all of its subdomains."
},
"preview_enabled_label": {
"message": "Hover preview"
},
"preview_enabled_help": {
"message": "Show the dashed outline overlay while holding the copy modifier."
},
"avoid_editable_label": {
"message": "Skip editable apps"
},
"avoid_editable_help": {
"message": "Avoid contenteditable editors and rich text surfaces where copy gestures might be disruptive."
},
"toast_duration_label": {
"message": "Feedback duration"
},
"toast_duration_help": {
"message": "Controls how long the floating feedback remains visible."
},
"save_status_saved": {
"message": "Saved"
},
"settings_eyebrow": {
"message": "Settings"
},
"settings_title": {
"message": "Copy text with Alt-Click"
},
"settings_intro": {
"message": "Configure how copy gestures, hover previews, and safe-mode protections behave across websites."
},
"popup_eyebrow": {
"message": "Quick controls"
},
"popup_title": {
"message": "Copy text with Alt-Click"
},
"popup_subtitle": {
"message": "Tweak the current site and the most-used interaction settings without opening the full options page."
},
"popup_site_label": {
"message": "Current site"
},
"popup_modifier_label": {
"message": "Copy modifier"
},
"popup_preview_label": {
"message": "Hover preview"
},
"popup_preview_hint": {
"message": "Show the target overlay while the modifier key is held."
},
"popup_safe_label": {
"message": "Skip editable apps"
},
"popup_safe_hint": {
"message": "Avoid copying inside contenteditable editors and rich text surfaces."
},
"popup_duration_label": {
"message": "Feedback duration"
},
"popup_append_hint": {
"message": "Append mode stays available with Shift + modifier + Click."
},
"popup_site_active": {
"message": "Active"
},
"popup_site_excluded": {
"message": "Excluded"
},
"popup_site_unsupported": {
"message": "Unsupported"
},
"popup_site_unknown": {
"message": "This page is not scriptable"
},
"popup_toggle_include": {
"message": "Allow this site"
},
"popup_toggle_exclude": {
"message": "Exclude this site"
},
"open_options": {
"message": "Open full settings"
}
}
}
98 changes: 97 additions & 1 deletion _locales/ar/messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,101 @@
{
"copy": {
"message": "&نسخ"
},
"meta_key": {
"message": "Copy operation"
},
"meta_key_help": {
"message": "Append mode uses Shift together with your chosen copy modifier."
},
"excluded_domains_label": {
"message": "Excluded domains"
},
"excluded_domains_help": {
"message": "Enter one domain per line. Excluded domains disable both hover previews and copy actions. Example: figma.com blocks figma.com and all of its subdomains."
},
"preview_enabled_label": {
"message": "Hover preview"
},
"preview_enabled_help": {
"message": "Show the dashed outline overlay while holding the copy modifier."
},
"avoid_editable_label": {
"message": "Skip editable apps"
},
"avoid_editable_help": {
"message": "Avoid contenteditable editors and rich text surfaces where copy gestures might be disruptive."
},
"toast_duration_label": {
"message": "Feedback duration"
},
"toast_duration_help": {
"message": "Controls how long the floating feedback remains visible."
},
"save_status_saved": {
"message": "Saved"
},
"settings_eyebrow": {
"message": "Settings"
},
"settings_title": {
"message": "Copy text with Alt-Click"
},
"settings_intro": {
"message": "Configure how copy gestures, hover previews, and safe-mode protections behave across websites."
},
"popup_eyebrow": {
"message": "Quick controls"
},
"popup_title": {
"message": "Copy text with Alt-Click"
},
"popup_subtitle": {
"message": "Tweak the current site and the most-used interaction settings without opening the full options page."
},
"popup_site_label": {
"message": "Current site"
},
"popup_modifier_label": {
"message": "Copy modifier"
},
"popup_preview_label": {
"message": "Hover preview"
},
"popup_preview_hint": {
"message": "Show the target overlay while the modifier key is held."
},
"popup_safe_label": {
"message": "Skip editable apps"
},
"popup_safe_hint": {
"message": "Avoid copying inside contenteditable editors and rich text surfaces."
},
"popup_duration_label": {
"message": "Feedback duration"
},
"popup_append_hint": {
"message": "Append mode stays available with Shift + modifier + Click."
},
"popup_site_active": {
"message": "Active"
},
"popup_site_excluded": {
"message": "Excluded"
},
"popup_site_unsupported": {
"message": "Unsupported"
},
"popup_site_unknown": {
"message": "This page is not scriptable"
},
"popup_toggle_include": {
"message": "Allow this site"
},
"popup_toggle_exclude": {
"message": "Exclude this site"
},
"open_options": {
"message": "Open full settings"
}
}
}
Loading