From 3b1ad0a173826540bbfb44da0409a1edc376cbd3 Mon Sep 17 00:00:00 2001 From: Lukas Werner Date: Wed, 3 Dec 2025 00:03:49 -0800 Subject: [PATCH] fix: do not under any circumstance send js to llms --- chrome-extension/src/content.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome-extension/src/content.js b/chrome-extension/src/content.js index ba6c7ab..94a618d 100644 --- a/chrome-extension/src/content.js +++ b/chrome-extension/src/content.js @@ -42,10 +42,13 @@ function getTextContent(root) { NodeFilter.SHOW_TEXT, null ); - let node; let textContent = "" while (node = walker.nextNode()) { + try { + let tagName = node.parentElement.tagName; + if (tagName == "SCRIPT" || tagName == "STYLE") { continue; } + } catch (error) { } textContent += node.nodeValue + " "; } return textContent; -- 2.51.2