Skip to content

Commit 526ff4b

Browse files
committed
(bugfix): Sponsored ads showing in Search Results
1 parent 279aa62 commit 526ff4b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Fuck YouTube Ads wo Lubricant.user.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,14 @@
15291529
reverse: false,
15301530
};
15311531
if (page_type_ === "yt_search") {
1532-
tmp_ytInitialData_rule = common_ytInitialData_rule;
1532+
tmp_ytInitialData_rule = [
1533+
...common_ytInitialData_rule,
1534+
"abs:contents[*][*].videoRenderer=- /.isAd",
1535+
"abs:contents[*][*].gridVideoRenderer=- /.isAd",
1536+
"abs:contents[*][*].videoWithContextRenderer=- /.isAd",
1537+
"abs:results[*].videoRenderer=- /.isAd",
1538+
"abs:results[*].gridVideoRenderer=- /.isAd",
1539+
];
15331540
return_obj.ytInitialData_rule = tmp_ytInitialData_rule;
15341541
return return_obj;
15351542
}
@@ -1542,7 +1549,14 @@
15421549
}
15431550

15441551
if (page_type_ === "mobile_yt_search") {
1545-
tmp_ytInitialData_rule = common_ytInitialData_rule;
1552+
tmp_ytInitialData_rule = [
1553+
...common_ytInitialData_rule,
1554+
"abs:contents[*][*].videoRenderer=- /.isAd",
1555+
"abs:contents[*][*].gridVideoRenderer=- /.isAd",
1556+
"abs:contents[*][*].videoWithContextRenderer=- /.isAd",
1557+
"abs:results[*].videoRenderer=- /.isAd",
1558+
"abs:results[*].gridVideoRenderer=- /.isAd",
1559+
];
15461560
return_obj.ytInitialData_rule = tmp_ytInitialData_rule;
15471561
return return_obj;
15481562
}

0 commit comments

Comments
 (0)