From bf02d70e4126425f20c87ccc3bea1eb9a1db21ef Mon Sep 17 00:00:00 2001 From: throwaway96 <68320646+throwaway96@users.noreply.github.com> Date: Wed, 27 Mar 2024 00:31:22 -0400 Subject: [PATCH] adblock.js: block adSlots in JSON.parse() Thanks to reisxd for the suggestion. --- src/adblock.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/adblock.js b/src/adblock.js index 75ff6a73..ed259ed1 100644 --- a/src/adblock.js +++ b/src/adblock.js @@ -22,6 +22,10 @@ JSON.parse = function () { r.adPlacements = []; } + if (Array.isArray(r.adSlots)) { + r.adSlots = []; + } + // remove ads from home const homeSectionListRenderer = r?.contents?.tvBrowseRenderer?.content?.tvSurfaceContentRenderer?.content