fix(browser-extension): issue #783
This commit is contained in:
parent
ce77c75351
commit
5d33d44084
@ -260,29 +260,27 @@ function match(element, skipMatch) {
|
|||||||
|
|
||||||
const hasAttributes = !!element.getAttributeNames().filter((x) => x !== 'data-nosnippet').length;
|
const hasAttributes = !!element.getAttributeNames().filter((x) => x !== 'data-nosnippet').length;
|
||||||
|
|
||||||
if (hasAttributes) {
|
if (!hasAttributes && !tagName.includes('-')) {
|
||||||
// 2023-06-10: fix #113 temporarily
|
|
||||||
if (element.classList.contains('chat-line__message')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2024-08-03: fix #701 temporarily
|
|
||||||
if (element.classList.contains('sellos')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const isDialog = tagName === 'DIALOG' && element.getAttribute('open') === 'true';
|
|
||||||
const isFakeDialog = tagName === 'DIV' && element.className.includes('cmp');
|
|
||||||
|
|
||||||
return (
|
|
||||||
(isDialog || isFakeDialog || isInViewport(element)) &&
|
|
||||||
(skipMatch || element.matches(tokens.selectors))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
forceClean(element);
|
forceClean(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
// 2023-06-10: fix #113 temporarily
|
||||||
|
if (element.classList.contains('chat-line__message')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2024-08-03: fix #701 temporarily
|
||||||
|
if (element.classList.contains('sellos')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDialog = tagName === 'DIALOG' && element.getAttribute('open') === 'true';
|
||||||
|
const isFakeDialog = tagName === 'DIV' && element.className.includes('cmp');
|
||||||
|
|
||||||
|
return (
|
||||||
|
(isDialog || isFakeDialog || isInViewport(element)) &&
|
||||||
|
(skipMatch || element.matches(tokens.selectors))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user