Fix #325.
This commit is contained in:
parent
991c88fc75
commit
4ea4dc863b
@ -2079,6 +2079,13 @@
|
||||
req: 'response',
|
||||
html: this.response
|
||||
});
|
||||
},
|
||||
onerror: function() {
|
||||
return qr.message.send({
|
||||
req: 'status',
|
||||
ready: true,
|
||||
banned: true
|
||||
});
|
||||
}
|
||||
};
|
||||
opts = {
|
||||
@ -2104,17 +2111,7 @@
|
||||
'Content-Type': 'multipart/form-data;boundary=' + boundary
|
||||
};
|
||||
}
|
||||
try {
|
||||
return qr.ajax = $.ajax(url, callbacks, opts);
|
||||
} catch (e) {
|
||||
if (e.name === 'NETWORK_ERR') {
|
||||
return qr.message.send({
|
||||
req: 'status',
|
||||
ready: true,
|
||||
banned: true
|
||||
});
|
||||
}
|
||||
}
|
||||
return qr.ajax = $.ajax(url, callbacks, opts);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1747,6 +1747,9 @@ qr =
|
||||
qr.message.send
|
||||
req: 'response'
|
||||
html: @response
|
||||
onerror: ->
|
||||
# CORS disabled error: redirecting to banned page ;_;
|
||||
qr.message.send req: 'status', ready: true, banned: true
|
||||
opts =
|
||||
form: form
|
||||
type: 'post'
|
||||
@ -1763,12 +1766,7 @@ qr =
|
||||
opts.headers =
|
||||
'Content-Type': 'multipart/form-data;boundary=' + boundary
|
||||
|
||||
try
|
||||
qr.ajax = $.ajax url, callbacks, opts
|
||||
catch e
|
||||
# CORS disabled error: redirecting to banned page ;_;
|
||||
if e.name is 'NETWORK_ERR'
|
||||
qr.message.send req: 'status', ready: true, banned: true
|
||||
qr.ajax = $.ajax url, callbacks, opts
|
||||
|
||||
Options =
|
||||
init: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user