-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (77 loc) · 2.93 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
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
85
86
87
88
89
<!DOCTYPE html>
<html style="height: 882px;"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Your Terminal</title>
<link rel="stylesheet" media="all" href="terminal.css">
<!--< <link rel="chrome-application-definition" href="http://www.htmlfivewow.com/demos/terminal/manifest.json"> -->
</head>
<body>
<aside class="help hidden">
<section>
<div>
<span onclick="toggleHelp()" id="close">x</span>
<h2>Keyboard shortcuts</h2>
<div class="shortcuts">
<p><strong><ctrl> + s</strong> : Toggle CRT monitor flicker effect</p>
<p><strong><esc></strong> : toggle this help menu</p>
</div>
</div>
<div>
<h2>What is this?</h2>
<p>A Command-line Web</p>
<p>By: Omid Tajnia <tajnia@gmail.com></p>
</div>
</section>
</aside>
<!--<div class="crt top"></div>-->
<div class="interlace" style="height: 882px;"></div>
<div id="container"><output><div>tajnia.github.io</br> Welcome </div><p> type "help"</p><div></div></output><div id="input-line" class="input-line"><div class="prompt">$></div><div><input class="cmdline" autofocus=""></div></div></div>
<!--<div class="crt bottom"></div>-->
<script type="text/javascript" async="" src="ga.js"></script><script src="terminal.js"></script>
<script>
function toggleHelp() {
document.querySelector('.help').classList.toggle('hidden');
document.body.classList.toggle('dim');
}
(function() {
var term = new Terminal('container');
term.initFS(false, 1024 * 1024);
if (document.location.hash) {
var theme = document.location.hash.substring(1).split('=')[1];
term.setTheme(theme);
} else if (localStorage.theme) {
term.setTheme(localStorage.theme);
}
document.body.addEventListener('keydown', function(e) {
if (e.keyCode == 27) { // Esc
toggleHelp();
e.stopPropagation();
e.preventDefault();
}
}, false);
// Setup the DnD listeners for file drop.
document.body.addEventListener('dragenter', function(e) {
e.stopPropagation();
e.preventDefault();
this.classList.add('dropping');
}, false);
document.body.addEventListener('dragover', function(e) {
e.stopPropagation();
e.preventDefault();
e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.
}, false);
document.body.addEventListener('dragleave', function(e) {
this.classList.remove('dropping');
}, false);
document.body.addEventListener('drop', function(e) {
e.stopPropagation();
e.preventDefault();
this.classList.remove('dropping');
term.addDroppedFiles(e.dataTransfer.files);
term.output('<div>File(s) added!</div>');
}, false);
})();
</script>
</body><script type="text/javascript" id="useragent-switcher">navigator.__defineGetter__("userAgent", function() {return "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"})</script></html>