-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.js
80 lines (78 loc) · 3.27 KB
/
boot.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
jQuery(function($) {
function progress(percent, width) {
var size = Math.round(width*percent/100);
var left = '', taken = '', i;
for (i=size; i--;) {
taken += '=';
}
if (taken.length > 0) {
taken = taken.replace(/=$/, '>');
}
for (i=width-size; i--;) {
left += ' ';
}
return '[' + taken + left + '] ' + percent + '%';
}
var animation = false;
var timer;
var prompt;
var string;
$('body').terminal(function(command, term) {
var cmd = $.terminal.parse_command(command);
if (cmd.name == 'boot') {
term.echo("Loading Dependencies...");
var i = 0, size = 250;
prompt = term.get_prompt();
string = progress(0, size);
term.set_prompt(progress);
animation = true;
(function loop() {
string = progress(i++, size);
term.set_prompt(string);
if (i < 100) {
timer = setTimeout(loop, 150);
} else {
term.echo(progress(i, size) + ' [[b;green;]OK]')
.set_prompt(prompt);
animation = false
term.echo("[[b;green;]ALL 250 Dependencies Loaded!]");
term.echo("Checking APKS...");
setTimeout(() => {
term.error("MISSING 1 APK(BioTerm.apk)!");
setTimeout(() => {
term.error("CANNOT CONVERT WINDOWS EXE TO ANDROID APK! Skipping APK.");
setTimeout(() => {
term.echo("Gathering Data from android device...");
setTimeout(() => {
term.error("GATHER FAILED! Because Developer of program disabled it! Skipping Step!");
setTimeout(() => {
term.echo("[[b;red;]Faild to launch: CRAM OS Desktop] Searching for application [[b;green;]App Found: SP3PLAYER!]");
setTimeout(() => {
term.echo("Launching Program: [[b;green;]SP3PLAYER.]");
setTimeout(() => {
document.location.assign("App/load.html");
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}
})();
}
}, {
keydown: function(e, term) {
if (animation) {
if (e.which == 68 && e.ctrlKey) { // CTRL+D
clearTimeout(timer);
animation = false;
term.echo(string + ' [[b;red;]FAIL]')
.set_prompt(prompt);
}
return false;
}
},
greetings: greetings.innerHTML,
});
});