$pastemonkey('#recaptcha_div').livequery(function(){
var self = this;
$pastemonkey.getScript('http://notapi.recaptcha.net/js/recaptcha_ajax.js', function(){
setTimeout(function(){
if (typeof Recaptcha != 'undefined') {
Recaptcha.create("6LfncwAAAAAAAIxurXazJ0zspoEwBpeVUfNr87Hr", self);
} else {
$pastemonkey.unblockUI();
};
}, '5000');
});
});
Above is a workaround that I tried, that still always fails, the reason is the URL above is wrong, so the getScript should fail, however it never fails, so the unblockUI is never called, this freezes up my UI.
A suggestion to fix this is to pass in a timeout and a fail callback into the getScript function, something like:
.getScript('url',timeoutVal,successCallback,failCallback)
If the script is not recived within the timeoutVal, fire the failCallback otherwise successCallback