Repository navigation
Scan the whole page instead of guessed compose selectors - #9
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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