Block site ads and annoyances
Hi, is there a plugin or another way in Hero to blocks ads (based on public lists of URLs) and cosmetic annoyances (e.g. cookie banners etc.) via automatic URL filtering and CSS injection, like done by Ghostery Adblocker[1] for Puppeteer?
I suppose Adblocker's standalone JS lib can be use to match a resource URL and somehow reject/abort requests before they're made, but I can't find a way or event in Hero (or a Tab) to hook into and reject/abort requests dynamically (i.e. without presetting with blockedResourceUrls or interceptedResources).
[1] https://github.com/ghostery/adblocker
@VoidMonk What is the use case for that in an automation/scraping tool?
You can install uBlock as a chrome extension like this: https://github.com/ulixee/hero/issues/266#issuecomment-3517172601 I imagine that you can pretty easily add your own filters to that as well.