stylus/sync/dropbox-auth-receiver.js
2019-03-17 21:32:08 -03:00

12 lines
381 B
JavaScript

/* global chromeLocal */
'use strict';
window.onload = () => {
const params = new URLSearchParams(new URL(location.href).hash.substr(1));
/* it uses browser direct here because it supports just firefox yet */
chromeLocal.setValue('dropbox_access_token', params.get('access_token'))
.then(() => {
window.location.href = window.location.origin + '/manage.html';
});
}