Revert "actually work in chrome"

This reverts commit 9b3a1191585427a002358acf612810c4334ee5a5.
This commit is contained in:
James Campos 2011-08-15 22:13:33 -07:00
parent 9b57b62ed7
commit d6bed73c32
2 changed files with 7 additions and 22 deletions

View File

@ -1218,21 +1218,17 @@
};
qr = {
init: function() {
var data, iframe;
var iframe;
g.callbacks.push(qr.node);
$.bind(window, 'message', qr.message);
$.bind($('#recaptcha_challenge_field_holder'), 'DOMNodeInserted', qr.captchaNode);
qr.captchaTime = Date.now();
iframe = $.el('iframe', {
name: 'iframe',
hidden: true,
id: 'iframe',
src: 'http://sys.4chan.org/post'
});
data = $.el('span', {
hidden: true,
id: 'data'
});
$.append(d.body, iframe, data);
$.append(d.body, iframe);
return $('#recaptcha_response_field').id = '';
},
attach: function() {
@ -1453,11 +1449,7 @@
data[el.name] = el.value;
}
}
$('#data').textContent = JSON.stringify(data);
return $.globalEval(function() {
data = document.getElementById('data').textContent;
return document.getElementById('iframe').contentWindow.postMessage(data, '*');
});
return $('iframe').contentWindow.postMessage(JSON.stringify(data), '*');
},
foo: function() {
var body, data, href, node, textContent, _ref;

View File

@ -972,13 +972,10 @@ qr =
qr.captchaTime = Date.now()
iframe = $.el 'iframe',
name: 'iframe'
hidden: true
id: 'iframe'
src: 'http://sys.4chan.org/post'
data = $.el 'span',
hidden: true
id: 'data'
$.append d.body, iframe, data
$.append d.body, iframe
#hack - nuke id so it doesn't grab focus when reloading
$('#recaptcha_response_field').id = ''
@ -1191,11 +1188,7 @@ qr =
for el in $$ '[name]', qr.el when el.value
data[el.name] = el.value
$('#data').textContent = JSON.stringify data
$.globalEval ->
data = document.getElementById('data').textContent
document.getElementById('iframe').contentWindow.postMessage data, '*'
$('iframe').contentWindow.postMessage JSON.stringify(data), '*'
foo: ->
body = $.el 'body',