Try to get some better errors out of QR.req.onerror

This commit is contained in:
Zixaphir 2014-01-19 15:18:57 -07:00
parent ed28e05f72
commit 3d0dd62556
4 changed files with 18 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -411,9 +411,10 @@ th {
position: fixed;
display: <%= flex %>;
top: 0;
padding: 1px;
z-index: 16;
<%= flex %>-direction: row;
max-height: 1.3em;
max-height: 1.4em;
overflow: visible;
}
.shortcut {
@ -737,7 +738,7 @@ th {
position: fixed;
}
.fourchan-banner-at-sidebar-top .boardBanner {
top: 16px;
top: 18px;
}
.fourchan-banner-at-sidebar-bottom .boardBanner {
bottom: 270px;

View File

@ -615,13 +615,15 @@ QR =
responseType: 'document'
withCredentials: true
onload: QR.response
onerror: ->
# Connection error, or
# www.4chan.org/banned
onerror: (err, url, line) ->
# Connection error, or www.4chan.org/banned
delete QR.req
post.unlock()
QR.cooldown.auto = false
QR.status()
console.log err
console.log url
console.log line
QR.error $.el 'span',
innerHTML: """
Connection error. You may have been <a href=//www.4chan.org/banned target=_blank>banned</a>.