-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
48 lines (43 loc) · 1.55 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Javascript PC Emulator</title>
<link rel="stylesheet" href="jslinux.css">
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="term.js"></script>
<script type="text/javascript" src="jslinuxwithgui.js"></script>
<script type="text/javascript" src="pseudoworker.js"></script>
<script type="text/javascript">
function megastart() {
var realstart=function() {
var prefix='/jslinux';
var prefix = '/jslinux';
var j1 = new JSLinuxWithGUI(
document.getElementById('terminal1'),
'linux1',
prefix,
"console=ttyS0 root=/dev/hda ro init=/sbin/init notsc=1 hibernate=nocompress resume=/dev/hdb"
);
j1.start();
};
// TODO: webkit only (!)
// TODO: get real size
var size = 20 * 1024 * 1024;
var xxx = function (grantedbytes) {
if (grantedbytes < size) {
throw "size not granted";
}
realstart();
};
if (typeof navigator.webkitPersistentStorage != 'undefined') {
navigator.webkitPersistentStorage.requestQuota(size, xxx);
} else {
webkitStorageInfo.requestQuota(PERSISTENT, size, xxx);
}
}
</script>
</head>
<body onload="megastart()">
<div id="terminal1"></div>
</body>
</html>