-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·82 lines (73 loc) · 2.31 KB
/
index.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
function switchitem() {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 ||
bIsUc || bIsAndroid || bIsCE || bIsWM) {
window.location = 'm.html';
} else {
window.location = 'pc.html'
}
};
function start() {
setTimeout(() => {
switchitem()
}, 500);
coveron(1)
}
function load() {
document.getElementById('toloadin').style.top = '-100%'
coveroff()
setTimeout(() => {
var loadin = document.getElementById('tanchuin').value
document.getElementById('tanchuin').value = ''
while (loadin.indexOf(' ') >= 0) {
loadin = loadin.replace(' ', '')
}
if (loadin == '' || loadin == null) {} else {
if (md5check(loadin)) {
if (loadin != '') {
window.localStorage.setItem('localload', loadin)
var a = confirm('已导入,现在进入游戏吗')
if (a) {
start()
}
}
} else {
alert('存档代码无效')
}
}
}, 500);
}
function loadin() {
coveron(0.5)
document.getElementById('toloadin').style.top = '30%'
}
function gitee() {
window.open('https://gitee.com/cherrling/I-Am-Alive')
}
function github() {
window.open('https://github.com/Cherrling/cherrling.github.io')
}
function author(a) {
if (a == 0) {
document.getElementById('author').style.top = '-100%'
coveroff()
}
if (a == 1) {
document.getElementById('author').style.top = '30%'
coveron()
}
}
function record() {
coveron(0.5)
setTimeout(() => {
jumpurl('record')
}, 500);
}