Merge pull request #54 from outis1one/claude/read-repo-YMu21

fix: narrow isInNonChatArea to stop blocking chat reveal, bump 0.9.17
This commit is contained in:
Outis
2026-03-29 13:50:39 -04:00
committed by GitHub
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -1698,13 +1698,13 @@
// Elements to skip when revealing (inputs, scripts, styles, extension UI, navigation)
const SKIP_REVEAL_TAGS = new Set([
'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) {
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