Skip to content

Scan the whole page instead of guessed compose selectors - #9

Merged
EnesYilmazcode merged 1 commit into
mainfrom
fix/scan-whole-page
Aug 9, 2026
Merged

EnesYilmazcode merged 1 commit into
mainfrom
fix/scan-whole-page

Conversation

@EnesYilmazcode

Copy link
Copy Markdown
Owner

fix: scan the whole page instead of guessed compose selectors

Every scan was scoped to div[g_editable="true"] and three other guesses at
Gmail's internal class names. That put an assumption on the critical path: if
the compose root did not match, nothing was ever examined and the extension
silently did nothing, with no way to tell that apart from not being installed.

It never needed to be that fragile. #mt-signature and data-signature-template
are Mailsuite's own labels and appear on nothing else, so if one is in the page
it is theirs. Scanning from document.body deletes the whole failure mode.

Side effect, documented: this also hides the signature on Mailtrack mail you
receive. Purely visual, in your own browser, and it changes nothing about what
anyone actually sent.

Also handles Gmail's id rewriting. Gmail turns id="mt-signature" into
id="m_-1234...mt-signature" when it renders or quotes a message, which is why
Mailsuite ships its own un-prefixing helper. Matching on contains covers it.

Two console lines added, because the last round could not distinguish "not
working" from "not loaded" without reading Chrome's Preferences file off disk:

[MailSuiteFree] active on mail.google.com
[MailSuiteFree] removed 1 signature block(s)

16 tests, all passing. Version to 0.2.0.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_013rTepGiDUe15iPn6XqmKjy

Every scan was scoped to div[g_editable="true"] and three other guesses at
Gmail's internal class names. That put an assumption on the critical path: if
the compose root did not match, nothing was ever examined and the extension
silently did nothing, with no way to tell that apart from not being installed.

It never needed to be that fragile. #mt-signature and data-signature-template
are Mailsuite's own labels and appear on nothing else, so if one is in the page
it is theirs. Scanning from document.body deletes the whole failure mode.

Side effect, documented: this also hides the signature on Mailtrack mail you
receive. Purely visual, in your own browser, and it changes nothing about what
anyone actually sent.

Also handles Gmail's id rewriting. Gmail turns id="mt-signature" into
id="m_-1234...mt-signature" when it renders or quotes a message, which is why
Mailsuite ships its own un-prefixing helper. Matching on contains covers it.

Two console lines added, because the last round could not distinguish "not
working" from "not loaded" without reading Chrome's Preferences file off disk:

  [MailSuiteFree] active on mail.google.com
  [MailSuiteFree] removed 1 signature block(s)

16 tests, all passing. Version to 0.2.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rTepGiDUe15iPn6XqmKjy
@EnesYilmazcode
EnesYilmazcode merged commit 4c956c4 into main Aug 9, 2026
1 check passed
@EnesYilmazcode
EnesYilmazcode deleted the fix/scan-whole-page branch August 9, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant