I need to inject a piece of JavaScript code into current page on my browser, either from an external .exe
or from C++ code via XPCOM call. I suppose if I write an addon/extension and use a C++ .dll
to call its code via XPCOM, the .dll
is loaded into the browser process, so it should be possible to access current page elements from it.
Of course I'm not asking this for some nasty hacking purposes, I just need a way to inject a JavaScript into the page without exposing its code.