Search code examples
c#winformsadblock

How to add an adblock plug-in to the WebBrowser control?


I'm making a winform application containing a WebBrowser control. I'm trying to connect to a Web page that contains ads, but it's affecting the loading speed of the page. The adblock plugin for Chrome blocks ads. So is there any way to add that plugin or any other way to achieve the same result?


Solution

  • The adblock plugin is just some js script with some browsers specific metadata on top. You can check the source code here: https://adblockplus.org/source You can probably sort something out with this (like run the plugin's code after page load)