]> cat aescling's git repositories - mastodon.git/commit
Fix timeline markers in Firefox (regression from #13887) (#13889)
authorThibG <thib@sitedethib.com>
Fri, 29 May 2020 17:25:57 +0000 (19:25 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 17:25:57 +0000 (19:25 +0200)
commitcc650bc023e00d07c5796b7602d86597bb437f45
tree8b0e9c0a4fdf6facf846f85f913cc0c8901b68ce
parent5aff2a6957e861162d67c4610277e9bb2a6f8186
Fix timeline markers in Firefox (regression from #13887) (#13889)

Unfortunately, Firefox does not support the `keepalive` parameter
I used in the previous PR. However it supports the `navigator.sendBeacon`
API that allows that kind of things, but does not allow setting headers.

Therefore, this PR replaces it with a `sendBeacon` call that passes the
bearer token in the POST data.

Doorkeeper will then handle the auth token out of the box, as long as
it is passed as form data. Passing the query as JSON does not work.
app/javascript/mastodon/actions/markers.js