don't hide media cards whose title matches a guard keyword substring
Cette révision appartient à :
@@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
Référencer dans un nouveau ticket
Bloquer un utilisateur