Fixed anilist logout issue

This commit is contained in:
Muril-o 2022-03-15 18:57:44 -03:00
parent 4650ea99da
commit 3f5a8a2529
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "0.6.1",
"version": "0.6.2",
"author": "ThaUnknown_",
"main": "src/index.js",
"scripts": {

View file

@ -52,6 +52,12 @@
location.reload()
} else {
location.href = 'https://anilist.co/api/v2/oauth/authorize?client_id=4254&response_type=token'
const searchParams = new URLSearchParams(location.href)
if (searchParams.get('access_token')) {
localStorage.setItem('ALtoken', searchParams.get('access_token'))
location.hash = ''
location.reload()
}
}
},
icon: 'login',