don't hide media cards whose title matches a guard keyword substring

Cette révision appartient à :
2026-09-19 18:27:11 +02:00
Parent 720328412c
révision ce42fff915
+6
Voir le fichier
@@ -614,6 +614,12 @@
Array.from( Array.from(
root.querySelectorAll('button, a, [role="button"], [role="menuitem"]') root.querySelectorAll('button, a, [role="button"], [role="menuitem"]')
).forEach(function (node) { ).forEach(function (node) {
if (node.closest(".card")) {
// Never hide anything inside a media card: a movie/show title or
// poster link is not navigation, and titles like "Spider-Man: Far
// From Home" can accidentally contain a keyword like "home".
return;
}
if (shouldHideNode(node, keywords)) { if (shouldHideNode(node, keywords)) {
node.setAttribute(hiddenAttr, "1"); node.setAttribute(hiddenAttr, "1");
} }