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