try to fix qr image posting
This commit is contained in:
parent
cb966b9b60
commit
3ef9107232
20
4chan_x.js
20
4chan_x.js
@ -971,8 +971,8 @@
|
||||
}
|
||||
},
|
||||
messageIframe: function(e) {
|
||||
var message;
|
||||
message = $('table b').firstChild.textContent;
|
||||
var message, _ref;
|
||||
message = ((_ref = $('table font b')) != null ? _ref.firstChild.textContent : void 0) || '';
|
||||
e.source.postMessage(message, '*');
|
||||
return window.location = 'about:blank';
|
||||
},
|
||||
@ -980,7 +980,14 @@
|
||||
var data, dialog, error;
|
||||
data = e.data;
|
||||
dialog = $('#qr');
|
||||
if (data === 'Post successful!') {
|
||||
if (data) {
|
||||
error = $.el('span', {
|
||||
className: 'error',
|
||||
textContent: data
|
||||
});
|
||||
$.append(dialog, error);
|
||||
qr.autohide.unset();
|
||||
} else {
|
||||
if (dialog) {
|
||||
if ($.config('Persistent QR')) {
|
||||
qr.refresh(dialog);
|
||||
@ -988,13 +995,6 @@
|
||||
$.remove(dialog);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
error = $.el('span', {
|
||||
className: 'error',
|
||||
textContent: data
|
||||
});
|
||||
$.append(dialog, error);
|
||||
qr.autohide.unset();
|
||||
}
|
||||
return recaptchaReload();
|
||||
},
|
||||
|
||||
@ -717,25 +717,25 @@ qr =
|
||||
recaptchaReload()
|
||||
|
||||
messageIframe: (e) ->
|
||||
message = $('table b').firstChild.textContent
|
||||
message = $('table font b')?.firstChild.textContent or ''
|
||||
e.source.postMessage message, '*'
|
||||
window.location = 'about:blank'
|
||||
|
||||
messageTop: (e) ->
|
||||
{data} = e
|
||||
dialog = $ '#qr'
|
||||
if data is 'Post successful!'
|
||||
if dialog
|
||||
if $.config 'Persistent QR'
|
||||
qr.refresh dialog
|
||||
else
|
||||
$.remove dialog
|
||||
else
|
||||
if data # error message
|
||||
error = $.el 'span',
|
||||
className: 'error'
|
||||
textContent: data
|
||||
$.append dialog, error
|
||||
qr.autohide.unset()
|
||||
else
|
||||
if dialog
|
||||
if $.config 'Persistent QR'
|
||||
qr.refresh dialog
|
||||
else
|
||||
$.remove dialog
|
||||
|
||||
recaptchaReload()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user