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