diff --git a/4chan_x.user.js b/4chan_x.user.js index fad9cee6a..1880e357d 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -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(); diff --git a/script.coffee b/script.coffee index fa76a1ea2..b31fae8c3 100644 --- a/script.coffee +++ b/script.coffee @@ -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']