0
votes

I haven't looked into it very much but am struggling to find relevant information on the topic. I basically want to create a browser that applies a filter to a webpage by changing colors in a webpage. My guess is that I will have to change the html once loaded or something, would this work? Do I have other options?

PS. I don't just want to make every color darker, I would more like to invert the colors.

Edit: If any you were wondering, I am talking about the XAML browser component that can be used in a Windows Phone application.

2

2 Answers

1
votes

I think the simplest way to do that is to inject some Javascript into your page once it has loaded.

To do that, you need to set the IsScriptEnabled to true on your WebBrowser control and then subscribe to the Navigated event.

When that event occurs you can inject some JS codeby using the WebBrowser.InvokeScript method.

Here is an example of JS code that darken the page : JavaScript: Invert color on all elements of a page

-1
votes

If you are talking about in a PC internet browser, you can find an add-on to execute Javascript automatically, such as Greasemonkey for Firefox. If you are talking about Windows Phone's Internet Explorer, I don't really know what you could do there, as I don't think they allow add-ons.