Skip to content

Aiur/gmail-from

Repository files navigation

Gmail: Mail From Sender

Chrome extension that adds an easy button to show email from the sender. It scopes the search to the current view (E.g., in:inbox when in inbox view). This is useful for "batch processing" of emails from a sender in my inbox.

This extension was primarily authored with Claude.

It's build on InboxSDK that adds three ways to see all mail from a sender, scoped to the view you're currently in (inbox, a label, spam, an existing search, ...):

  1. Thread-row hover icon — a person-search icon appears on each row in list views, alongside Gmail's archive/delete hover icons.
  2. Sender-name icon (list rows) — the same icon, always visible, to the left of the sender's name on each row.
  3. Sender-name icon (open conversation) — the same icon after the sender's name in each message header.

Clicking any of them runs a search like in:inbox from:sender@example.com. The scope comes from the current URL hash:

View Added qualifier
Inbox in:inbox
Label label:<name>
Category tab (Social, ...) category:<name>
Starred / Important is:starred / is:important
Sent / Drafts / Spam / Trash / Snoozed in:sent etc.
An existing search keeps the query, replaces any from:/to: terms
All Mail no qualifier

Direction follows what's displayed: in Sent, list icons search to: the listed recipient; in a conversation, the icon on a message you sent searches to: its recipient. A from: search drops an in:sent scope (sent mail is all from you, so it would match nothing). On a collapsed message you sent, the recipient isn't in the DOM yet — the tooltip says so, and clicking expands the message; click again to search. "Sent by you" means the sender is one of your addresses: the primary one, plus send-as aliases harvested from the From choices whenever a compose view opens (cached in localStorage per account — open a compose once after installing to teach it your aliases).

Build & install

npm install
npm run build   # or: npm start (rebuild on change), npm run build-prod (minified)

Then in Chrome/Edge: chrome://extensions (edge://extensions) → enable Developer modeLoad unpacked → select the dist/ directory. Reload Gmail.

After code changes, rebuild, hit ⟳ on the extension, and refresh Gmail.

App ID

The InboxSDK app ID (free, from register.inboxsdk.com) is set as APP_ID at the top of src/content.js.

Layout

Follows InboxSDK/hello-world: webpack bundles @inboxsdk/core into the content script and emits the SDK's pageWorld.js and background.js (the MV3 service worker that injects pageWorld.js into the page's main world) alongside it.

  • src/content.js — the actual feature (all placements + context-scoped search)
  • static/manifest.json and content.css, copied into dist/ as-is
  • webpack.common.js / webpack.dev.js / webpack.prod.js

Known limitations

  • The sender-name icons are placed with a MutationObserver looking for td.gF span[email] (conversation headers — the selector InboxSDK's own getSender() uses) and td div.yW span[email] (list rows — the element the SDK's thread-row code uses) — if Gmail changes that markup the icons silently disappear (the hover icon is fully API-backed and unaffected).
  • On rows grouping several senders ("Alice, Bob 3"), the row icon sits before the first name and searches for the first sender; likewise, a sent message with several recipients searches only the first.

About

Easily find emails from a sender in the same view

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors