Expand the functionality of copy/paste in Chrome. CopyPaste+ captures your copied text and gives you a history with favorites and usage counts, available right from the toolbar popup.
- Automatic capture of copied/cut text from pages and editable fields
- Popup history with sections:
- Favorites (star items you care about)
- Most Used (by copy count)
- Recent Items (chronological)
- Click any item in the popup to copy it back to the clipboard
- Star toggle (☆/★) to mark favorites
- Clear non-favorites action to prune your history quickly
- Persistent storage using chrome.storage.local
- Clone this repository
- Install dependencies
npm install
- Build the extension
npm run build
- Load into Chrome
- Open
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked" and select the repository root directory
- Open
- Copy text as you normally do (keyboard shortcuts or menu) on regular web pages
- Click the CopyPaste+ toolbar icon to open the popup
- Click an item to copy it to your clipboard
- Click the star on an item to favorite/unfavorite it
- Use "Clear non-favorites" to keep only starred items
Notes and limitations:
- Chrome restricts extension behavior on certain pages (e.g.,
chrome://pages, the Chrome Web Store, some PDF viewers, new tab, and other special URLs). Copy capture and/or popup copy may not function there. - Copies can only be directly detected from a page or this extentsion, so copies from other extensions or from the url will not be detected.
- Clipboard behavior varies by page and context. The popup uses multiple strategies to write to the clipboard; if one path fails in a given context, another is attempted.
Requirements:
- Node.js LTS
- npm
Commands:
- Install deps:
npm install - Build:
npm run build
Project structure (high level):
manifest.json— Chrome MV3 manifestbackground.ts— background service workercontent.ts— content script (listens to copy/cut)popup.tsx,popup.html,popup.css— popup UI (React)dist/— compiled JS bundles (generated)webpack.config.js— build configuration
Tips:
- Background/service worker logs:
chrome://extensions→ your extension → "Service worker" → Inspect - Content script logs: open DevTools on a target page’s frame (not on restricted pages)
- If you modify sources, run
npm run buildand reload the extension
storage— store copy history and item metadataclipboardWrite,clipboardRead— improve clipboard interactions from allowed contextsactiveTab,scripting— inject a small copy routine into the active tab as a fallback when direct popup clipboard writes are not availablehost_permissions: <all_urls>— allow content script to observe copy events across pages you visit
Privacy: CopyPaste+ does not send your data anywhere. All history is stored locally via chrome.storage.local and never leaves your machine.
- I don’t see any captured copies
- Ensure you’re testing on a normal HTTP/HTTPS page (not
chrome://*or the Web Store) - Open the page console and look for content script logs
- Reload the extension in
chrome://extensionsand refresh the page
- Ensure you’re testing on a normal HTTP/HTTPS page (not
- Clicking an item doesn’t copy
- Some page contexts can block clipboard access. The popup tries direct write first, then falls back to injecting a copy routine into the active tab. Make sure a normal tab is active and focused
- Check background logs in the Service Worker console for errors
- Moji-bake stars (e.g.,
☆)- Ensure
<meta charset="utf-8">is present inpopup.html(it is in this repo)
- Ensure
- Error in Chrome developer settings and nothing gets added from the clipbaord anymore
- Reload the extentsion and make sure you are on a refreshed tab. If your tab is from before the extentsion's most recent change you made, the incorrect script will be injected and it won't work.
Contributions are welcome!
- Open an issue for bugs and feature requests
- Fork, create a feature branch, and submit a pull request
- Keep PRs focused and include a brief description and testing notes
- Don’t commit build artifacts (
dist/) or dependencies (node_modules/). The repo includes a.gitignorethat ignores these
Ideas and TODOs:
- Make UI look better
- Search/filter in the popup
- Keyboard shortcuts
- Enable copying on pages that don't allow it
This project is open source. See the LICENSE file for details.