forked from hasinhayder/javascript-text-expander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (89 loc) · 2.91 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 lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Text Expander</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cutestrap/1.3.1/css/cutestrap.min.css">
<style>
section.wrapper{
padding-top: 1em;
padding-bottom: 1em;
}
body {
filter: hue-rotate(30deg);
}
</style>
</head>
<body>
<header class="wrapper-large ta-center">
<h1>Text Expander</h1>
</header>
<section class="wrapper">
<label class="textfield">
<textarea name="inpText" id="inpText" cols="90" rows="8"></textarea>
<span class="textfield__label">Type something</span>
</label>
</section>
<section class="wrapper">
<h3>Type any of these words:</h3>
<div class="keys">omg</div>
<h3>And then press
<code>space</code> or any of these:
<b>
<i>,</i>
<i>.</i>
<i>!</i>
<i>?</i>
</b>
</h3>
<p>For example, type this sentence manually(don't copy-paste):
<br/>
<i>"My gd computer's os is windows and fyfi I thought it was a bfd!"</i>
</p>
</section>
<footer class="wrapper-large ta-center">
<em>Originally Created by
<a href="https://github.com/hasinhayder">Hasin Hayder</a>,</em>
and <a href="https://github.com/fa7ad">This Guy</a> revamped the UI 😅
</footer>
<script type="text/javascript" src="textexpander.js"></script>
<script type="text/javascript">
var dictionary = {
"os": "operating system",
"wtf": "what the fuck",
"lol": "laughing out loud",
"roflmao": "rolling on the floor laughing my ass off",
"stfu": "shut the fuck up",
"ms": "micro-fucking-soft",
"windows": "a complete fucking crap",
"fu": "fuck you",
"omg": "oh my god",
"gtfo": "get the fuck out",
"bfd": "big fucking deal",
"fyfi": "for your fucking information",
"fyi": "for your information",
"gn": "good night",
"gd": "goddamn",
"ftw": "fuck the world", //or for the win? he he
"idk": "I dont know",
"ikr": "i know right",
"idgaf": "I don't give a fuck",
"fml": "fuck my life",
"dilligaf": "do I look like I give a fuck",
"rtfm": "read the fucking manual",
"asafp": "as soon as fucking possible",
"fyvm": "fuck you very much",
"nfg": "not fucking good",
"rofl": "rolling on the floor laughing",
"lmao": "laughing my ass off"
};
textExpander([document.querySelector("#inpText")], dictionary);
var abbrs = Object.keys(dictionary).map(function (data) {
return "<code>" + data + "</code>";
}).join(", ");
document.querySelector('.keys').innerHTML = abbrs
</script>
</body>
</html>