fix(browser-extension): issue #783

This commit is contained in:
wanhose 2024-08-24 09:01:37 +02:00
parent ce77c75351
commit 5d33d44084

View File

@ -260,7 +260,10 @@ function match(element, skipMatch) {
const hasAttributes = !!element.getAttributeNames().filter((x) => x !== 'data-nosnippet').length;
if (hasAttributes) {
if (!hasAttributes && !tagName.includes('-')) {
forceClean(element);
}
// 2023-06-10: fix #113 temporarily
if (element.classList.contains('chat-line__message')) {
return false;
@ -278,11 +281,6 @@ function match(element, skipMatch) {
(isDialog || isFakeDialog || isInViewport(element)) &&
(skipMatch || element.matches(tokens.selectors))
);
} else {
forceClean(element);
}
return false;
}
/**