forked from pmotschmann/Evolve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
save.html
40 lines (40 loc) · 1.29 KB
/
save.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE HTML>
<html>
<head>
<title>Evolve Save String</title>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<link rel="icon" href="evolved.ico" type="images/x-icon">
<script src="lib/lz-string.min.js"></script>
<style>
#save {
width: 90%;
height: 20rem;
}
</style>
</head>
<body>
<textarea id="save"></textarea>
<script>
let global_data = window.localStorage.getItem('evolved') || false;
if (global_data) {
let saveState = JSON.parse(LZString.decompressFromUTF16(global_data));
if (saveState){
document.getElementById('save').innerHTML = LZString.compressToBase64(JSON.stringify(saveState));
}
else {
document.getElementById('save').innerHTML = 'Corrupted save data detected';
}
}
else {
document.getElementById('save').innerHTML = 'No Save data detected';
}
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CPC46V71CB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-CPC46V71CB');
</script>
</body>
</html>