-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
262 lines (241 loc) · 5.81 KB
/
main.html
File metadata and controls
262 lines (241 loc) · 5.81 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!--
BoxScan by Jake Stringer, 2015
Scans a textbox for user-defined "codewords" and replaces them with user-defined "defenitions"
-->
<html>
<style type="text/css">
html
{
cursor: default;
}
h1.title
{
font-size: 80px;
font-family: "Verdana";
font-weight: bolder;
color: #E6E6E6;
text-shadow: 15px 15px 15px #3D5086;
-webkit-transition: text-shadow 1s;
}
h1.title:hover
{
font-size: 80px;
font-family: "Verdana";
color: #EBEBEB;
cursor: pointer;
text-shadow: 0px 0px 90px #1947D1;
-webkit-transition: text-shadow 1s;
}
body
{
background-image: url("bg.png");
color: #E6E6E6;
}
.main
{
font-size: 31px;
font-family: "Verdana";
font-weight: bold;
text-align: left;
}
textarea
{
width: 570px;
height: 50px;
font-weight: bold;
font-size: 20px;
border-radius: 10px;
background-color : #FFF1FC;
opacity: 0.4;
resize: none;
-webkit-transition: height 0.25s, width 0.25s;
}
textarea:focus
{
width: 1100px;
height: 310px;
border-radius: 10px;
background-color : #FFFFFF;
opacity: 0.8;
-webkit-transition: height 0.25s, width 0.25s;
}
h1
{
font-family: "Verdana";
font-size: 33px;
}
::-webkit-input-placeholder
{
color: #1FDCF2;
text-align: justify;
font-size: 31px;
opacity: 0.7;
letter-spacing: -2px;
}
h2
{
font-family: "Verdana";
font-size: 31px;
opacity: 0.9;
}
a.submitButton
{
font-size: 200%;
font-weight: bold;
font-family: "Verdana";
border-radius: 5px;
border-width: 5px;
cursor: pointer;
background-color: #6B6B6B;
-webkit-transition: background-color 1s;
color: lightgray;
}
a.submitButton:hover
{
font-weight: bolder;
font-family: "Verdana";
background-color: #065CAD;
-webkit-transition: background-color 1s;
}
.img
{
float: right;
width: 400px;
height: 340px;
-webkit-transition: width 1s;
}
.img:hover
{
width: 450px;
-webkit-transition: width 1s;
}
a.tips
{
color: #FFFFFF;
font-size: 30px;
-webkit-transition: font-size 0.25s ease-out;
font-family: "Verdana";
}
a.tips:hover
{
text-decoration: underline;
color: #ACFFFF;
font-size: 33px;
-webkit-transition: font-size 1s ease-out;
}
ul.main
{
font-size: 20px;
color: #F080C0;
list-style: square inside url("bg2.png");
}
ul.side
{
font-size: 20px;
color: #F080C0;
list-style: square inside url("bg2.png");
text-indent: 40px;
}
a:visited
{
color: #FFFFFF;
font-size: 20px;
font-family: "Verdana";
}
</style>
<script type="text/javascript">
function getBoxText()
{
var boxText = document.getElementById("textBox").value // Get what's in the TextBox.
console.log(boxText);
var mapping = {};
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Add new keywords with the following syntax: mapping["keyword"] = "definition"; (Make sure there is a ";" at the end!)
mapping["gdc"] = "good domestic clean";
mapping["cwi"] = "consistent with inventory";
mapping["pc"] = "poorly cleaned";
mapping["adc"] = "average domestic clean";
mapping["pdc"] = "poor domestic clean";
mapping["nc"] = "not cleaned";
mapping["inv"] = "inventory";
mapping["ap"] = "apartment";
mapping["Ap"] = "Apartment";
mapping["cv"] = "carpets vacuumed";
mapping["tile"] = "Tiles swept and cleaned";
mapping["lam"] = "Laminate swept and cleaned";
//Rooms
mapping["b1"] = "Bedroom one";
mapping["b2"] = "Bedroom two";
mapping["b3"] = "Bedroom three";
mapping["b4"] = "Bedroom four";
mapping["b5"] = "Bedroom five";
mapping["b6"] = "Bedroom six";
mapping["b7"] = "Bedroom seven";
mapping["b8"] = "Bedroom eight";
// End of edit section
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
var newString = (function(map, oldString) {
Object.keys(mapping).forEach(function(key) {
oldString = oldString.replace(new RegExp('\\b' + key + '\\b', 'g'), map[key]);
});
return oldString;
}(mapping, document.getElementById('textBox').value));
output.innerHTML = newString;
console.log(newString)
}
function main()
{
getBoxText();
document.getElementById("output").select();
}
function info()
{
location.replace("info.html");
}
function jake()
{
location.reload()
}
</script>
<head>
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
<img src="icon.png" class="img" title="Quit hoverin' and get workin'">
<h1 align="middle" class="title" onclick="info()" id="top">Welcome to BoxScan <u>2.1</u></h1>
<h2 align="middle">A lightweight app by Jake Stringer 2015</h2>
<title>BoxScan by Jake Stringer</title>
</head>
<body>
<div align="middle">
<a onclick="main()" class="submitButton">Submit</a>
<a onclick="jake()" class="submitButton">Clear</a>
<br>
<br>
<textarea placeholder="Begin writing here..." id="textBox" onkeydown="getBoxText()"></textarea>
<br>
<br>
<!-- <button onclick="getBoxText()">Submit</button> -->
<br>
<h1>Text will automatically be changed in the box below.</h1>
<a class="tips" href="tips.html">How to get the most out of BoxScan....</a>
<a class="tips" href="https://github.com/JakesCode/BoxScan">....BoxScan on <b>GitHub!</b></a>
<br>
<br>
<textarea id="output" placeholder="....and completed text will appear here."></textarea>
<br>
<h1><u>Easier!</u></h1>
<ul class="main">
<li>With user-defined presets, every experience with <b>BoxScan</b> is your own.</li>
<li>Easy to edit <i>Javascript Syntax</i> inside.</li>
</ul>
<ul class="side">
<li>Click <a href="info.html#codewords">"Welcome to BoxScan"</a> (at the top of the page) to be told more about the <b>syntax</b>.</li>
</ul>
<ul class="main">
<li>Simple to use - <i>type</i>, <i>click submit</i>, then <i>CTRL+X</i>.</li>
</ul>
</div>
</body>
</html>