-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest.html
82 lines (66 loc) · 2.91 KB
/
test.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
<!doctype html>
<html>
<head>
<meta charset='utf-8' />
<title>Inlet.js</title>
<link rel="stylesheet" href="lib/CodeMirror3/lib/codemirror.css">
<link rel="stylesheet" href="lib/CodeMirror3/theme/monokai.css">
<link rel="stylesheet" href="inlet.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="lib/index.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link href='http://fonts.googleapis.com/css?family=Alegreya:900italic' rel='stylesheet' type='text/css'>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-39184669-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>
</head>
<body>
<a href="https://github.com/enjalot/Inlet"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<div id="header">
<h1 id="title">Inlet</h1>
</div>
<div id="description">
Manual Testing Page.
<span id="example">42 === The answer to life, the universe and everything.</div>
</div>
<div id='editor'>
</div>
<script src="lib/CodeMirror3/lib/codemirror.js"></script>
<script src="lib/CodeMirror3/mode/javascript/javascript.js"></script>
<script src="inlet.js"></script>
<textarea id="test-code" style="display:none;">
//Test cases;
var theAnswer = 42;
var x = {a:100,b:100};
var color = "#fff";
var color1 = "#ffffff", color2 = "#000000";
var string = "a color #fff and another #000";
var colorHSL = "hsl(133,100%,91%)", color2 = "hsl(255,100%,20%)";
var stringHSL = "a color hsl(133,100%,91%) and another hsl(255,100%,20%)";</textarea>
<script>
var editor = CodeMirror(document.getElementById("editor"),{
value: document.getElementById("test-code").value,
mode: "javascript",
theme: "monokai",
lineNumbers: true,
});
editor.on("change", changeFunction)
function changeFunction() {
//let's affect the page when the code changes!
eval(editor.getValue());
var example = document.getElementById("example");
example.innerHTML = theAnswer + " === The answer to life, the universe and everything.";
//example.style.left = x+"px";
//example.style.top = y+"px";
document.body.style['background-color'] = color;
};
changeFunction();
var inlet = Inlet(editor);
</script>
<!--<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>-->
</body>