title: Injecting JS into browser outside of the process / via XPCOM
body: <p>I need to inject a piece of JavaScript code into current page on my browser, either from an external <code>.exe</code> or from C++ code via XPCOM call. I suppose if I write an addon/extension and use a C++ <code>.dll</code> to call its code via XPCOM, the <code>.dll</code> is loaded into the browser process, so it should be possible to access current page elements from it.</p>
  
  <p>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.</p>