mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-21 00:22:08 +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",
|
"name": "Miru",
|
||||||
"version": "0.6.1",
|
"version": "0.6.2",
|
||||||
"author": "ThaUnknown_",
|
"author": "ThaUnknown_",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,12 @@
|
||||||
location.reload()
|
location.reload()
|
||||||
} else {
|
} else {
|
||||||
location.href = 'https://anilist.co/api/v2/oauth/authorize?client_id=4254&response_type=token'
|
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',
|
icon: 'login',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue