pokerogue/src/debug.js

13 lines
359 B
JavaScript
Raw Normal View History

2024-03-25 20:10:43 +00:00
export function getData() {
const dataStr = localStorage.getItem('data');
if (!dataStr)
return null;
2023-11-13 04:47:04 +00:00
return JSON.parse(atob(dataStr), (k, v) => k.endsWith('Attr') ? BigInt(v) : v);
}
2024-03-25 20:10:43 +00:00
export function getSession() {
const sessionStr = localStorage.getItem('sessionData');
if (!sessionStr)
return null;
return JSON.parse(atob(sessionStr));
}