fix: isInNonChatArea too aggressive — blocking reveal on chat content

The class-based selectors ([class*="header"], [class*="Header"],
[class*="nav-"], etc.) were matching Claude.ai's chat content area
elements, preventing reveal from running on any response text.

Narrowed to only structural elements: nav, aside, [role="navigation"],
[role="complementary"], [data-sidebar]. Removed HEADER/FOOTER from
SKIP_REVEAL_TAGS since sites use these tags inside chat layouts.

https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
This commit is contained in:
Claude
2026-03-29 17:50:25 +00:00
parent 433e5a7736
commit fe684047a8
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Silent Send", "name": "Silent Send",
"version": "0.9.16", "version": "0.9.17",
"description": "Intercepts personal info and substitutes it with user-defined replacements before sending to AI services.", "description": "Intercepts personal info and substitutes it with user-defined replacements before sending to AI services.",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Silent Send", "name": "Silent Send",
"version": "0.9.16", "version": "0.9.17",
"description": "Intercepts personal info and substitutes it with user-defined replacements before sending to AI services.", "description": "Intercepts personal info and substitutes it with user-defined replacements before sending to AI services.",
"permissions": [ "permissions": [
"storage", "storage",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "silent-send", "name": "silent-send",
"version": "0.9.16", "version": "0.9.17",
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"description": "Browser extension that substitutes personal data before sending to AI services", "description": "Browser extension that substitutes personal data before sending to AI services",
+3 -3
View File
@@ -1629,13 +1629,13 @@
// Elements to skip when revealing (inputs, scripts, styles, extension UI) // Elements to skip when revealing (inputs, scripts, styles, extension UI)
const SKIP_REVEAL_TAGS = new Set([ const SKIP_REVEAL_TAGS = new Set([
'SCRIPT', 'STYLE', 'NOSCRIPT', 'IFRAME', 'INPUT', 'TEXTAREA', 'SELECT', 'SCRIPT', 'STYLE', 'NOSCRIPT', 'IFRAME', 'INPUT', 'TEXTAREA', 'SELECT',
'NAV', 'ASIDE', 'HEADER', 'FOOTER',
]); ]);
// Skip reveal in navigation, sidebars, headers, and other non-chat UI // Skip reveal in navigation and sidebars — but NOT broadly by class name,
// as sites like Claude.ai use "header" in class names for chat content areas
function isInNonChatArea(el) { function isInNonChatArea(el) {
if (!el) return false; if (!el) return false;
return !!el.closest('nav, aside, header, footer, [role="navigation"], [role="banner"], [role="complementary"], [data-sidebar], [class*="sidebar"], [class*="Sidebar"], [class*="nav-"], [class*="Nav"], [class*="menu"], [class*="Menu"], [class*="header"], [class*="Header"]'); return !!el.closest('nav, aside, [role="navigation"], [role="complementary"], [data-sidebar]');
} }
// Reveal ALL text on the page + apply highlights // Reveal ALL text on the page + apply highlights
+1 -1
View File
@@ -629,7 +629,7 @@
</section> </section>
<footer> <footer>
<p>Silent Send v0.9.16</p> <p>Silent Send v0.9.17</p>
<p style="font-size:11px;color:#9ca3af;margin-top:6px;max-width:600px"> <p style="font-size:11px;color:#9ca3af;margin-top:6px;max-width:600px">
Silent Send is a convenience tool, not a security guarantee. Third-party sites may change how they send data at any time, which can cause missed substitutions without warning. You are responsible for verifying your data before sending. See the <a href="https://github.com/outis1one/silent-send/blob/main/LICENSE" target="_blank" style="color:#6b7280">LICENSE</a> for full terms. Silent Send is a convenience tool, not a security guarantee. Third-party sites may change how they send data at any time, which can cause missed substitutions without warning. You are responsible for verifying your data before sending. See the <a href="https://github.com/outis1one/silent-send/blob/main/LICENSE" target="_blank" style="color:#6b7280">LICENSE</a> for full terms.
</p> </p>