This extension is maintained by MyOutDesk
This extension auto populates the CC, BCC fields within gmail based on user-supplied rules.
Load unpacked extension point it to the dist
folder
npm install
npm run dev
Gmail is a mess UI wise, so this is the approach we took:
- Extension runs on page and attaches a MutationObserver to scan for DOM changes that add a new form with the class
bAs
- When we see that form show up, we know that a new compose or reply has been initiated
- Locate, by examining random UI hints (using aria-label, for instance) the parents of TO, CC, and BCC within that new form
- Find existing "cards" (aka recipients in any field) which already exist in those fields. This is because they are clickable, hover-able, etc.
- Attach mutation observers to watch for new inputs \ new cards which may show up in the
To
field - Populate the CC, BCC based on the existing "To" field, or populate when a recipient is added
Hopefully this provides a long-lasting solution without much pain. You can review the entire code here
You can build this extension by running:
npm run build
Submit a PR.
The Mostly MIT License (MIT). Please see License File for more information.