Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix(chrome-ext): bypass spellcheck suppression on Gmail (#4653)
Elijah Potter1c0d331fd353
diff --git a/packages/chrome-plugin/src/contentScript/index.ts b/packages/chrome-plugin/src/contentScript/index.tsindex b70a48647..54a494686 100644--- a/packages/chrome-plugin/src/contentScript/index.ts+++ b/packages/chrome-plugin/src/contentScript/index.ts@@ -170,11 +170,14 @@ function scan() {// editor, so treat it the same way we treat Lexical editors: don't skip it purely because// spellcheck is disabled.const isQuillEditor = element.classList.contains('ql-editor');+ // Allow Gmail compose fields even when Gmail disables browser spellcheck.+ const isGmail = window.location.hostname === 'mail.google.com';if (element.matches('[role="combobox"]') ||element.getAttribute('data-enable-grammarly') === 'false' ||(element.getAttribute('spellcheck') === 'false' &&+ !isGmail &&!isLexicalEditor &&!isQuillEditor &&element.getAttribute('data-language') !== 'markdown')diff --git a/packages/web/src/routes/+page.svelte b/packages/web/src/routes/+page.svelteindex bf5ea57e7..15ad97ae2 100644--- a/packages/web/src/routes/+page.svelte+++ b/packages/web/src/routes/+page.svelte@@ -141,10 +141,6 @@ const faqs = [q: "What Do I Do If My Question Isn’t Here?",a: 'You can join our Discord and ask your questions there or you can start a discussion over at GitHub.',},- {- q: "Why Isn’t Harper Working in Gmail?",- a: 'Harper will not run in Gmail unless the built-in grammar checker is disabled. If you wish to use Harper in Gmail, please disable the built-in grammar checker.',- },];let liveFxVer = '';