autodetection of newgrounds.com login
This commit is contained in:
parent
5610401840
commit
a415f4158a
1 changed files with 8 additions and 0 deletions
|
@ -66,6 +66,14 @@ func load_saved_session() -> bool:
|
|||
if err != OK:
|
||||
session = EMPTY_SESSION
|
||||
session.id = ini.get_value("ngio", "session_id", "")
|
||||
#const url = new URL(location.href);
|
||||
#this.session_id = url.searchParams.get('ngio_session_id');
|
||||
if OS.has_feature('JavaScript'):
|
||||
var sp_session = JavaScript.eval("""
|
||||
new URL(window.location.href).searchParams.get('ngio_session_id')
|
||||
""")
|
||||
if sp_session != null:
|
||||
session.id = sp_session
|
||||
# check session is valid
|
||||
var response = yield(request_execute("App.checkSession"), "completed")
|
||||
if has_result(response):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue