function Gabber() { this.iframe_ = null; } Gabber.prototype = { init: function() { var self = this; var url = 'http://mail.google.com/a/google.com/?' + 'search=inbox&view=tl&start=0=&init=1&zx=' + Math.random(); $.get('proxy.php?url=' + encodeURIComponent(url), function(data, textStatus) { self.debug(data); }); }, onData: function(data) { this.debug(data); }, debug: function(s) { var d = document.getElementById('debug'); d.value += s + '\n'; } };