Do not ban/disable the QR on connection error.
This commit is contained in:
parent
6f9b6641de
commit
f1ef6dfd2b
@ -1994,11 +1994,17 @@
|
||||
return QR.response(data.html);
|
||||
case 'status':
|
||||
return QR.status(data);
|
||||
case 'connection error':
|
||||
return QR.error('_', $.el('a', {
|
||||
href: '//www.4chan.org/banned',
|
||||
target: '_blank',
|
||||
textContent: 'Connection error, or you are banned.'
|
||||
}));
|
||||
case 'banned':
|
||||
QR.error('_', $.el('a', {
|
||||
href: '//www.4chan.org/banned',
|
||||
target: '_blank',
|
||||
textContent: 'Connection error, or you are banned.'
|
||||
textContent: 'You are banned.'
|
||||
}));
|
||||
return QR.status({
|
||||
ready: true,
|
||||
@ -2072,7 +2078,7 @@
|
||||
},
|
||||
onerror: function() {
|
||||
return QR.message.send({
|
||||
req: 'banned'
|
||||
req: 'connection error'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@ -1676,11 +1676,16 @@ QR =
|
||||
QR.response data.html
|
||||
when 'status'
|
||||
QR.status data
|
||||
when 'banned'
|
||||
when 'connection error'
|
||||
QR.error '_', $.el 'a',
|
||||
href: '//www.4chan.org/banned'
|
||||
target: '_blank'
|
||||
textContent: 'Connection error, or you are banned.'
|
||||
when 'banned'
|
||||
QR.error '_', $.el 'a',
|
||||
href: '//www.4chan.org/banned'
|
||||
target: '_blank'
|
||||
textContent: 'You are banned.'
|
||||
# Disable iframe reloading
|
||||
QR.status ready: true, banned: true
|
||||
else
|
||||
@ -1742,8 +1747,9 @@ QR =
|
||||
req: 'response'
|
||||
html: @response
|
||||
onerror: ->
|
||||
# Connection error, or
|
||||
# CORS disabled error: redirecting to banned page ;_;
|
||||
QR.message.send req: 'banned'
|
||||
QR.message.send req: 'connection error'
|
||||
opts =
|
||||
form: form
|
||||
type: 'post'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user