Fix withCredentials on synchronous XHRs.
This commit is contained in:
parent
89a7bf5cbc
commit
388c8b9d1a
@ -46,7 +46,14 @@ $.ajax = (url, callbacks, opts={}) ->
|
||||
r.setRequestHeader key, val
|
||||
$.extend r, callbacks
|
||||
$.extend r.upload, upCallbacks
|
||||
r.withCredentials = cred
|
||||
try
|
||||
# Firefox throws an error if you try
|
||||
# to set this on a synchronous XHR.
|
||||
# Only cookies from the remote domain
|
||||
# are used in a request withCredentials.
|
||||
r.withCredentials = cred
|
||||
catch err
|
||||
# do nothing
|
||||
r.send form
|
||||
r
|
||||
$.cache = do ->
|
||||
|
||||
@ -131,7 +131,7 @@ Unread =
|
||||
Unread.db.set
|
||||
boardID: Unread.thread.board.ID
|
||||
threadID: Unread.thread.ID
|
||||
val: Unread.lastReadPost
|
||||
val: Unread.lastReadPost
|
||||
|
||||
setLine: (force) ->
|
||||
return unless d.hidden or force is true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user