Skip to content

Commit

Permalink
adblock.js: block adSlots in JSON.parse()
Browse files Browse the repository at this point in the history
Thanks to reisxd for the suggestion.
  • Loading branch information
throwaway96 committed Mar 29, 2024
1 parent cdd89de commit bf02d70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/adblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf02d70

Please sign in to comment.