So I just made this little extension for Chrome.
There were some pretty convoluted to gymnastics I had to go through to get the console on the page and get it to execute the JS I wanted it to execute. Pretty much the only hook you have it an onClick (from what I can tell). They've got it locked down TIGHT.
This needs a LOT of experimentation done, but it looks like you can use it to define functions on the page through the console and call those functions. However, the functions do NOT persist. So, you can do:
and "execute js" and an alert will come up and say "test".
But you can't do:
and "execute js" and then:
and "execute js" and expect an alert to pop up.
I'm sure there are many sound reasons for this from a security standpoint, but it's annoying as hell to try and program for. It would be great if I could fix this and I have a few ideas as to how I can do that...
The main reason I'm making this is basically as a prototype/POC for the Status-bar Calculator port from FF since I'm going to have to do some very similar things to get the Calculator to show up in the bottom right hand corner (like this does).