Reload the iframe on connection error.
This commit is contained in:
parent
593329b41e
commit
966b84ea71
@ -1191,15 +1191,20 @@
|
||||
|
||||
qr = {
|
||||
init: function() {
|
||||
var iframe;
|
||||
if (!$('form[name=post]')) return;
|
||||
g.callbacks.push(function(root) {
|
||||
return $.on($('.quotejs + .quotejs', root), 'click', qr.quote);
|
||||
});
|
||||
$.add(d.body, $.el('iframe', {
|
||||
iframe = $.el('iframe', {
|
||||
id: 'iframe',
|
||||
hidden: true,
|
||||
src: 'http://sys.4chan.org/post'
|
||||
}));
|
||||
});
|
||||
$.on(iframe, 'error', function() {
|
||||
return this.src = this.src;
|
||||
});
|
||||
$.add(d.body, iframe);
|
||||
if (conf['Persistent QR']) {
|
||||
qr.dialog();
|
||||
if (conf['Auto Hide QR']) qr.hide();
|
||||
|
||||
@ -861,10 +861,12 @@ qr =
|
||||
return unless $ 'form[name=post]'
|
||||
g.callbacks.push (root) ->
|
||||
$.on $('.quotejs + .quotejs', root), 'click', qr.quote
|
||||
$.add d.body, $.el 'iframe',
|
||||
iframe = $.el 'iframe',
|
||||
id: 'iframe'
|
||||
hidden: true
|
||||
src: 'http://sys.4chan.org/post'
|
||||
$.on iframe, 'error', -> @src = @src
|
||||
$.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