-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.html
84 lines (84 loc) · 2.66 KB
/
boot.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
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
83
84
<!DOCTYPE html>
<html style='cursor:none !important;'>
<head>
<meta charset="utf-8">
<title>BOOT</title>
<link rel="icon" href="assets/favicon.png">
<link href="css/jquery.terminal.min.css" rel="stylesheet"/>
</head>
<body style="overflow:hidden;">
</body>
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery.terminal.min.js"></script>
<script src="js/jquery.mousewheel-min.js"></script>
<script src="js/boot.js" charset="utf-8"></script>
<script type="text/javascript">
$(function() {
document.body.requestPointerLock();
var anim = false;
function typed(finish_typing) {
return function(term, message, delay, finish) {
anim = true;
var prompt = term.get_prompt();
var c = 0;
if (message.length > 0) {
term.set_prompt('');
var interval = setInterval(function() {
term.insert(message[c++]);
if (c == message.length) {
clearInterval(interval);
// execute in next interval
setTimeout(function() {
// swap command with prompt
finish_typing(term, message, prompt);
anim = false
finish && finish();
}, delay);
}
}, delay);
}
};
}
var typed_prompt = typed(function(term, message, prompt) {
// swap command with prompt
term.set_command('');
term.set_prompt(message + ' ');
});
var typed_message = typed(function(term, message, prompt) {
term.set_command('');
term.echo(message)
});
$('body').terminal(function(cmd, term) {
term.echo("lol");
}, {
name: 'xxx',
greetings: null,
width: 1000,
height: 300,
onInit: function(term) {
typed_message(term, bootText[0], 1, function() {
term.echo(bootText[1]);
typed_message(term, bootText[2], 1, function(){
term.echo(bootText[3]);
typed_message(term, bootText[4], 1, function(){
term.echo(bootText[5]);
term.echo(bootText[6] + "\n\n")
typed_message(term, bootText[7], 100, function(){
setTimeout(function(){
window.location.href = 'system-loader.html'
},1500)
})
})
})
});
},
keydown: function(e) {
//disable keyboard when animating
if (anim) {
return false;
}
}
});
});
</script>
</html>