Turn obfuscated email text like test (dot) example [at] myserver {dot} com into a clean, copy‑ready email address (test.example@myserver.com) right from the context menu. Below is an example from Firefox.
- Right‑click → Convert & Copy: When you select text and right-click/press keyboard context-menu button, it converts common
dot/atobfuscations (and many variants) to real email address and shows in the context menu. Clicking the real email addres from the context menu copies it to the clipboard. - Robust parsing: Handles wrappers like
[dot],-at-,dot,~point~, mixed cases, multiple separators, Unicode letters, etc. - Zero network: No data leaves the device. There are no analytics, remote calls, or trackers.
- Lightweight & fast: Tiny code footprint with focused, audited replacements.
-
Normalization: Trim, lowercase the control words (
dot,at,point, etc.), and collapse joiners (spaces, dots, dashes) around them. -
Token replacement:
- Replace wrapped/isolated variants of
dot→.andat→@using wrapper‑aware regexes that accept single or repeated wrappers (-,.,~, spaces, and optionally balanced brackets). - Keep valid email characters intact (e.g., underscore, dash, dot in the local part).
- Replace wrapped/isolated variants of
-
Clean‑up: Collapse repeated dots/ats (
.@). -
Validation: Lightweight internal checks to ensure the result is a plausible email.
-
Clipboard:
- Firefox:
navigator.clipboard.writeText()in service worker. - Chromium:
chrome.scripting.executeScriptinjected into the current tab to callnavigator.clipboard.writeText(). If the tab is not a secure context (e.g., HTTP), the code falls back todocument.execCommand('copy').
- Firefox:
50 input-output pairs for formatToEmailAddress (obfuscation variants, Unicode, wrappers, edge cases like leading dots, etc.). Tests both Firefox and Chromium implementation.
- Firefox: 115+ (for
browser.storage.session). - Chrome: 102+ (for
chrome.storage.session).
contextMenus: to add the context‑menu item.storage: cache the text to copy.clipboardWrite: allow writing to the clipboard from privileged contexts.scripting(Chromium only): allow executing script (navigator.clipboard.writeText()) in the event tab, becausenavigator.clipboardAPI is not available to service worker in Chromium.
Copyright (c) 2025 Md Basim Uddin Ahmed
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
