-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
75 lines (75 loc) · 3.6 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
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Codepad (Working Title)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="EN" />
<meta name="keywords" content="Codepad (Working Title)" />
<link rel="stylesheet" href="styles/main.css" />
<link rel="stylesheet" href="styles/codemirror.css" />
<link rel="stylesheet" href="styles/default.css" />
<script type="text/JavaScript" src="scripts/preLoad.js"></script>
</head>
<body>
<form id="frm" method="get" action="#">
<input type="hidden" id="{{user}}" />
<input
id="submit"
type="submit"
value="GO"
style="opacity:0;filter:alpha(opacity=0);position:absolute;bottom:95%;right:25%;z-index:16;"
/>
<input
type="text"
id="fname"
name="fileID"
onclick="JavaScript:this.select();set_opacity(document.getElementById('submit'), 0.8);"
onfocus="javascript:set_opacity(this, 1);this.hasFocus=true;"
onmouseover="javascript:set_opacity(this, 1);set_opacity(document.getElementById('submit'), 0.8);"
onblur="javascript:set_opacity(this, 0.4);this.hasFocus=false;set_opacity(document.getElementById('submit'), 0);"
onmouseout="javascript:if(!this.hasFocus) { set_opacity(this, 0.4);set_opacity(document.getElementById('submit'), 0); }"
value="{{fileID}}"
onchange="javascript:window.location='/?fileID='+this.value;"
autocorrect="off"
/>
<div class="area" >
<textarea id="{{fileID}}" class="box" >{{ data }}</textarea>
</div>
</form>
<script src="scripts/mimes.js"></script>
<script src="scripts/codemirror-compressed.js"></script>
<script src="/MobWrite/static/compressed_form.js"></script>
<script src="scripts/mobwrite_codemirror.js"></script>
<script type="text/javascript">
boxID = "{{fileID}}";
document.title = window.title = boxID + " on Codepad (Working Title)";
var box = document.getElementById(boxID);
var myCodeMirror = CodeMirror.fromTextArea(box, {
value : "",
mode : get_mime_mode(boxID),
theme : "default",
lineNumbers : true,
matchBrackets : true,
gutter : true,
fixedGutter : true,
tabMode : 'shift',
indentUnit : 2
});
myCodeMirror.id = boxID;
myCodeMirror.setValue(box.value === "{{data}}" ? "" : box.value);
editor = myCodeMirror.getScrollerElement();
wrapper = myCodeMirror.getWrapperElement();
editor.style.height = "100%";
editor.style.width = "100%";
wrapper.style.height = "100%";
wrapper.style.width = "100%";
editor.style.lineHeight = "161%";
editor.style.font = "Georgia, Courier New, Consolas";
editor.style.fontSize = "120%";
myCodeMirror.refresh();
myCodeMirror.focus();
mobwrite.syncGateway = '/MobWrite/scripts/q.py';
mobwrite.share(myCodeMirror);
</script>
</body>
</html>