Frage

Is there is a way to integrate the AdBlock Plus (or any similar addon that works on IE) with a C# WebBrowser Control? Here is my case, I have a form, when opened redirects to a specified website, which doesn't belong to me. And I want to remove all the ads from this website for the user of my application.

War es hilfreich?

Lösung

You'll need to load the Browser Helper Object representing the addon into the WebBrowser control. This thread describes the process, although it fits C++ better than C#.

As an aside: I can only imagine this is a bad idea, AdBlock Plus probably assumes it's always running inside of IE. If you manage to load it, it will be running inside of your process instead.

Andere Tipps

You'd have to essentially mimic IE's behaviour in loading addons (doing the same calls, providing the same API, etc.). However you should reconsider this idea, because most content providers don't like you embedding their content into your application, especially if you modify it to remove ads and stuff. What are you even trying to do? If you'd like to provide a feedback form, a support page, a forum or something similar, you should provide these on your own on your own page, instead of embedding third party sites killing ads and probably branding, etc.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top