Fix #171.
This commit is contained in:
parent
f1eca3da2e
commit
32878d7e2f
@ -1200,7 +1200,7 @@
|
||||
|
||||
qr = {
|
||||
init: function() {
|
||||
var h1, iframe;
|
||||
var h1, iframe, loadChecking;
|
||||
if (!$.id('recaptcha_challenge_field_holder')) return;
|
||||
$('form[name=post]').hidden = true;
|
||||
h1 = $.el('h1', {
|
||||
@ -1219,14 +1219,16 @@
|
||||
$.on(iframe, 'error', function() {
|
||||
return this.src = this.src;
|
||||
});
|
||||
$.on(iframe, 'load', function() {
|
||||
var _this = this;
|
||||
if (!(qr.status.ready || this.src === 'about:blank')) {
|
||||
this.src = 'about:blank';
|
||||
loadChecking = function(iframe) {
|
||||
if (!qr.status.ready) {
|
||||
iframe.src = 'about:blank';
|
||||
return setTimeout((function() {
|
||||
return _this.src = 'http://sys.4chan.org/post';
|
||||
return iframe.src = 'http://sys.4chan.org/post';
|
||||
}), 250);
|
||||
}
|
||||
};
|
||||
$.on(iframe, 'load', function() {
|
||||
if (this.src !== 'about:blank') return setTimeout(loadChecking, 250, this);
|
||||
});
|
||||
$.add(d.body, iframe);
|
||||
if (conf['Persistent QR']) {
|
||||
|
||||
@ -869,17 +869,20 @@ qr =
|
||||
$.add $('.postarea'), h1
|
||||
g.callbacks.push (root) ->
|
||||
$.on $('.quotejs + .quotejs', root), 'click', qr.quote
|
||||
|
||||
iframe = $.el 'iframe',
|
||||
id: 'iframe'
|
||||
hidden: true
|
||||
src: 'http://sys.4chan.org/post'
|
||||
$.on iframe, 'error', -> @src = @src
|
||||
# Greasemonkey ghetto fix
|
||||
$.on iframe, 'load', ->
|
||||
unless qr.status.ready or @src is 'about:blank'
|
||||
@src = 'about:blank'
|
||||
setTimeout (=> @src = 'http://sys.4chan.org/post'), 250
|
||||
loadChecking = (iframe) ->
|
||||
unless qr.status.ready
|
||||
iframe.src = 'about:blank'
|
||||
setTimeout (-> iframe.src = 'http://sys.4chan.org/post'), 250
|
||||
$.on iframe, 'load', -> unless @src is 'about:blank' then setTimeout loadChecking, 250, @
|
||||
$.add d.body, iframe
|
||||
|
||||
if conf['Persistent QR']
|
||||
qr.dialog()
|
||||
qr.hide() if conf['Auto Hide QR']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user