Keep in mind that I have no idea what the limitations of a browser plugin are, but if one can:
1) parse the raw source code that's sent down from the server, including comments
2) manipulate the DOM
3) open an outgoing connection
Then you could do, well, anything. Embed Ruby into pages, for example. The reason you can do that is because the Ruby interpreter doesn't have to be a part of your browser plugin. All you have to do is convince users to download your C++ app that DOES contain a Ruby interpreter and runs in the background, then your plugin communicates with that via a socket. Your app then issues commands back to your plugin (you can think of those commands as assembly instructions) which manipulate the DOM or whatever else a plugin can do.
Good luck with that.