-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwalloftext.html
176 lines (166 loc) · 8.86 KB
/
walloftext.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
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
<!--
// Javascript code built with the help of some research through
// the internet. Website (table) layout and design by SimonOrJ.
// If you want to use or share this code, please don't forget to
// credit me. ~SimonOrJ
// (c) Simon Chuu, 2015-2017
-->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="An Easy-to-use tool to generate a big wall of text!">
<meta name="keywords" content="wall of text, spam, random, words, common words">
<meta name="viewport" content="width=device-width; initial-scale=1">
<link rel="stylesheet" type="text/css" href="res/css/main.css">
<title>Wall of Text Generator • by SimonOrJ</title>
<style>
table{
width:100%;
}
th{
text-align:right;
vertical-align:top;
width:12em;
}
@media (max-width: 480px) {
th{
display:block;
text-align:left;
width:100%;
}
td{
display:block;
}
}
input{
background-color:rgba(100,144,125,.1);
border:0;
font-size:1em;
color: #fff;
width:100%;
padding:0em;
margin:0em;
vertical-align:top;
}
input[type="submit"] {
color:blue;
}
input[type="submit"]:active {
color:red;
}
#wall p{
text-indent:3em;
}
</style>
</head>
<body onLoad="loading()"><div id="wall"><noscript><h1>Javascript is dead!</h1><small>← <a href="javascript:getForm()">Back one page</a></small><p>This website requires javascript to generate random content every time you refresh this page! If you cannot enable javascript, here is the sample content. Would they do say with would well from, will think take in would just would with if a make. Use can year other into my them take then also not if, over use. This like, have when we first, after well its an, work us well work no new, as from, that how an year make know. Be his want these my, with some, two but also give I way make him when when get how she of, two which, with what use he your who on who who and how two these up after see two see I some any this, in two your way in an I want, first out make up there take not even to, which about our but I, his would time even way new like in than, also my up take like. Time two into when not that, make, which any by your well person, will, up want who come give want us now good go I year him there, some on, which you look know or, with at, could person our if other if out them these what year of, only for day but or on see can other, he with then as us not them back over I, in, their, as at out. Then then its, one work him no take this at these know us its way her the so this, time who when your, person you, then two most use would day at him so now day, no not give new any they they than, than this the what be, make day one, not.</p><p>Also will use his come, can so one have work like time do you for, first but at think how over good will one say how what would, use person if way, a him take its out, their, two go back he other by, or there one when think of because by time some by this work like by, we, look one you, get, over give that they of, it. After, what no do say to, can, up they she take, as want or take, us as their two any he work into day, two any. Good into but from him say come but, its than, as go and good say, see most time and time not give then as because that good only, other by, when by about, could your come year. Only even me this or so come, all be some he want after they on one, how his get see get she, but day you of which the your, him see, she, I at, person even two, for day at no or know also. Then in, or if will now this will take now use on into even, their to two also they in these at it be its so some out then only some there make out use who, well also than could an when other get like with now that back if all come can. Be but only some say with these two the an now one could one at his make as of by of these then.</p><p>Any well way to two for out day, will, any when even, new year see its good think our for. He, or an have, well a him will by if it good, look, would be my. Know have there. Just not new like.</p></noscript></div>
<div id="form" style="display:none"><h1>Fill the form below to generate a wall of text!</h1>
<form name="MakeWall" action="javascript:makeWall(document.getElementById('webTitle').value, document.getElementById('wallLen').value, document.getElementById('artWriter').value)">
<table>
<tr><th><label for="webTitle">Headline:</label></th><td><input type="text" name="webTitle" id="webTitle" placeholder="Optional" value="Improving Your Sentence Structure"></td></tr>
<tr><th><label for="wallLen">Number of random words:</label></th><td><input type="number" name="wallLen" id="wallLen" placeholder="Required" value="3000" max="2000000" required autofocus></td></tr>
<tr><th><label for="artWriter">Text Author to display:</label></th><td><input type="text" name="artWriter" id="artWriter" placeholder="Optional"></td></tr>
<tr><th></th><td><input type="submit" value="Loading..." id="subt" disabled></td></tr>
</table>
</form>
<p id="fmDn"></p></div>
<p>Wall of Text Generator Version 1.1. <small>Updated May 2, 2015.</small><br>© SimonOrJ, 2015. All Rights Reserved.<br><a href="javascript:scroll(0,0)">Back to Top</a></p>
<script>
(function(){
"use strict";
const wall = document.getElementById("wall");
const form = document.getElementById("form");
const fmdn = document.getElementById("fmDn");
const subt = document.getElementById("subt");
var words = ["the","be","to","of","and","a","in","that","have","I","it","for","not","on","with","he","as","you","do","at","this","but","his","by","from","they","we","say","her","she","or","an","will","my","one","all","would","there","their","what","so","up","out","if","about","who","get","which","go","me","when","make","can","like","time","no","just","him","know","take","person","into","year","your","good","some","could","them","see","other","than","then","now","look","only","come","its","over","think","also","back","after","use","two","how","our","work","first","well","way","even","new","want","because","any","these","give","day","most","us"];
var rffl = 0;
function getForm() {
wall.style.display = "none";
subt.removeAttribute("disabled");
subt.removeAttribute("style")
subt.setAttribute("value","Create the wall!")
form.removeAttribute("style");
document.title = "Wall of Text Generator \u2022 by SimonOrJ";
fmdn.innerHTML = "Click on the author's name to reach this form again. <small>To share, click on the \"Creat the wall!\" button and copy/paste the altered URL.</small>";
if(rffl) window.history.replaceState('','','walloftext.html');
rffl = 0;
}
window.getForm = getForm;
function makeWall(wTtl,wLen,aWtr) {
subt.disabled = true;
subt.setAttribute("value","Generating...");
subt.style.fontWeight = "bold";
fmdn.innerHTML = "Generation will take some time depending on your device's specs.";
setTimeout(function() {
var text, GET = "?len="+wLen;
if(wTtl) {
document.title = wTtl+" \u2022 by SimonOrJ";
text = "<h1>"+wTtl+"</h1>";
GET += "&head="+encodeURIComponent(wTtl);
}
else text = "";
text += "<small>";
if(aWtr) {
text += "by";
GET += "&wtr="+encodeURIComponent(aWtr);
}
else {
text += "\u2190";
aWtr = "Back one page";
}
text += ' <a href="javascript:getForm()">'+aWtr+"</a></small><p>";
var endFlag=1;
for( var i=0; i < wLen; i++ ) {
var add = words[Math.floor(Math.random() * words.length)];
if(endFlag==1) add = add.charAt(0).toUpperCase()+add.slice(1);
var n = Math.random()*1000
endFlag=0;
if(n<150) {
if(n<20) {
endFlag=1;
add += ". ";
if(n<3) add += "</p><p>"
}
else {
add += ","
}
}
text += add+" "
}
text += "</p>"
document.getElementById("wall").innerHTML = text;
form.style.display = "none";
wall.removeAttribute("style");
if(!rffl) window.history.replaceState('','',GET);
rffl = 1;}, 16)
console.log("Generating "+wLen+" words from a selection of "+words.length+" common words. (c) SimonOrJ, 2015")
}
window.makeWall = makeWall;
function loading() {
var parms = location.search.substr(1).split("&");
if(parms == 0) getForm()
else {
var tmp, uri = {};
for (var i = 0; i < parms.length; i++) {
tmp = parms[i].split("=");
uri[tmp[0]] = decodeURIComponent(tmp[1]);
}
if(uri["len"]) {
console.log("Pre-generation detected.")
wall.innerHTML = "<b>Loading...</b> Please wait.";
wall.removeAttribute("display");
makeWall(uri["head"],uri["len"],uri["wtr"]);
document.getElementById("wallLen").value = uri["len"];
if(uri["head"]) document.getElementById("webTitle").value = uri["head"];
else document.getElementById("webTitle").value = "";
if(uri["wtr"]) document.getElementById("artWriter").value = uri["wtr"];
}
else getForm()
}
}
window.loading = loading;
}())
</script>
</body>
</html>