mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-03-31 06:58:37 +00:00
Fixed anilist logout issue
This commit is contained in:
parent
4650ea99da
commit
3f5a8a2529
2 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "0.6.1",
|
||||
"version": "0.6.2",
|
||||
"author": "ThaUnknown_",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue