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

View File

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