forked from Rabrennie/anything.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (92 loc) · 3.83 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
90
91
92
93
94
95
96
97
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Δ.js Playground</title>
<script type="text/javascript" src="dist/anything.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/codemirror.min.css"
/>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/addon/hint/show-hint.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/mode/javascript/javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/addon/lint/javascript-lint.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/addon/hint/show-hint.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/addon/hint/javascript-hint.min.js"></script>
<script>
var anything = Δ;
var old_log = console.log;
console.log = function(){
document.getElementById('opt').innerHTML += '<br/>'+arguments[0];
old_log.apply(this, arguments)
}
var old_error = console.error;
console.error = function(){
document.getElementById('opt').innerHTML += '<br/><span color="red">'+arguments[0]+'</span>';
old_error.apply(this, arguments)
}
var old_info = console.info;
console.info = function(){
document.getElementById('opt').innerHTML += '<br/><span color="#666">'+arguments[0]+'</span>';
old_info.apply(this, arguments)
}
var RunThisBitch = function(){
document.getElementById('opt').innerHTML = '';
eval(myCodeMirror.getValue());
}
var dOpt = function(){}
</script>
</head>
<body>
<h1>Δ.js is a library that contains anything you want (<a href="https://github.com/Rabrennie/anything.js">GitHub</a>)</h1>
<p>Try it bellow. (with mothafucking autocomplete!!)</p>
<textarea class="editor" id="Edit">
Δ.doTheThing();
Δ.greetHannah();
console.log(Δ.flipText("anything!"));
var horribleDev = Δ.shunDev();
horribleDev.addPhrase('Your highschool computer science teacher called, he wants his code back');
</textarea>
<script>
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById('Edit'), {lineNumbers: true,
extraKeys: {"Ctrl-Space": "autocomplete", "Ctrl-Enter": RunThisBitch},
mode: {name: "javascript", globalVars: true},
});
var orig = CodeMirror.hint.javascript;
myCodeMirror.on("keyup", function (cm, event) {
if (!cm.state.completionActive && event.keyCode == 190) {
CodeMirror.commands.autocomplete(cm, null, {completeSingle: false});
}
});
</script>
<button style="width: 100%;height:3em;" onclick="RunThisBitch();">LET'S RUN THIS BITCH!!</button>
<div id="opt" style="width: 100%; height: 300px; background: #333; color:#fff; overflow-y: auto;"></div>
Welcome to Δ.js
<br/> This is Δ.js
<br/> Welcome
<br/> This is Δ.js
<br/> Welcome to Δ.js
<br/> You can do anything at Δ.js
<br/> Anything at all
<br/> The only limit is yourself
<br/> Welcome to Δ.js
<br/> Welcome to Δ.js
<br/> This is Δ.js
<br/> Welcome to Δ.js
<br/> This is Δ.js, Welcome
<br/> Yes, this is Δ.js
<br/> This is Δ.js and welcome to you who have come to Δ.js
<br/> Anything is possible at Δ.js
<br/> You can to anything Δ.js
<br/> The infinite is possible at Δ.js
<br/> The unattainable is unknown at Δ.js
<br/> Welcome to Δ.js
<br/> This is Δ.js
<br/> Welcome to Δ.js
<br/> Welcome
<br/> This is Δ.js
<br/> Welcome to Δ.js
<br/> Welcome to Δ.js
<br/>
</body>
</html>