There's a proxy that attaches JS to a frame. It needs to be proxied to bypass the same origin js limitations. Another way you could take would be to make a browser extension.
I used a similar technique in http://wikify.antimatter15.com/server/proxy?http://optimizel...
source code: http://code.google.com/p/wikify/source/browse/trunk/appengin...