This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
forked from dkwingsmt/haha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
278 lines (254 loc) · 10.2 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
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="蛤蛤体生成器 : " />
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>蛤蛤体生成器</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/dkwingsmt/haha">View on GitHub</a>
<h1 id="project_title">蛤蛤体生成器</h1>
<h2 id="project_tagline">水表在屋外,最近没网购,不需社区温暖,谢谢。</h2>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<table style="width:768px">
<tr>
<th style="width:50%;">
<!--<h3>请依次填入以下信息……</h3>-->
<form name="info_form">
<p>标题:
<input type="text" name="i_from" value="" style="width:100px;" />
怒斥
<input type="text" name="i_to" value="" style="width:100px;" />
</p>
<p>正文</p>
<ol>
<li>
<input type="text" name="i_affair" value="" style="width:150px;" />
好不好啊?
</li><li>
<input type="text" name="i_who" value="" style="width:150px;" />
也支持吗?
</li><li>
会不会给人感觉是
<input type="text" name="i_qinding" value="" style="width:120px;" />
呀?
</li><li>
我不是要
<input type="text" name="i_qinding2" value="" style="width:70px;" />
</li><li>
按照
<input type="text" name="i_accord1" value="" style="width:100px;" />
,按照
<input type="text" name="i_accord2" value="" style="width:100px;" />
</li><li>
<input type="text" name="i_west" value="" style="width:80px;" />
哪个
<input type="text" name="i_westcountry" value="" style="width:80px;" />
我没
<input type="text" name="i_went" value="" style="width:60px;" />
过
</li><li>
<input type="text" name="i_usa" value="" style="width:80px;" />
的
<input type="text" name="i_wallace" value="" style="width:80px;" />
比你们高到哪里去
</li><li>
比
<input type="text" name="i_faster" value="" style="width:100px;" />
跑得快
</li><li>
我今天作为一个
<input type="text" name="i_zhangzhe" value="" style="width:120px;" />
</li><li>
<input type="text" name="i_hk" value="" style="width:100px;" />
现在是
<input type="text" name="i_iden" value="" style="width:130px;" />
</li><li>
<input type="text" name="i_affair2" value="" style="width:80px;" />
也要按照
<input type="text" name="i_law" value="" style="width:80px;" />
</li><li>
我们的
<input type="text" name="i_decision" value="" style="width:100px;" />
也是很重要的
</li><li>
我不是<input type="text" name="i_job" value="" style="width:100px;" />工作者
</li>
</ol>
<input type="button" name="button" value="生成" onclick="generate()" style="width:100px;" />
</form>
</th>
<th style="width:49%">
<textarea name="result" id="result" readonly="readonly" style="width:100%; height: 600px;"/>
</textarea>
</th>
</tr>
</table>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">蛤蛤体生成器 maintained by <a href="https://github.com/dkwingsmt">dkwingsmt</a></p>
<p>Inspired by <a href="http://photo.renren.com/photo/302760940/photo-7757506381">张成愈</a></p>
<p>Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
<script>
function get_inputs() {
return document.querySelectorAll("form > p > input, form > ol > li > input");
}
var init_arrays = [];
init_arrays.push({
i_from: "江主席",
i_to: "香港记者",
i_affair: "董先生连任",
i_who: "中央",
i_qinding: "你们内定钦点董先生",
i_qinding2: "钦定",
i_accord1: "香港的基本法",
i_accord2: "选举法",
i_west: "西方",
i_westcountry: "国家",
i_went: "去",
i_usa: "美国",
i_wallace: "华莱士",
i_faster: "西方记者",
i_zhangzhe: "长者",
i_hk: "董先生",
i_iden: "特首",
i_affair2: "连任",
i_law: "香港的法律",
i_decision: "决定权",
i_job: "新闻"
});
/*
init_arrays.push({
i_from: "清华同学",
i_to: "北大同学",
i_affair: "在隔壁建px化工厂",
i_who: "同学们",
i_qinding: "黑北大",
i_qinding2: "黑北大",
i_accord1: "环境保护法",
i_accord2: "拆迁法",
i_west: "全国",
i_westcountry: "大学",
i_went: "去",
i_usa: "复旦大学",
i_wallace: "学生",
i_faster: "黑交大的复旦学生",
i_zhangzhe: "清华学子",
i_hk: "px",
i_iden: "化工业的支柱",
i_affair2: "建化工厂",
i_law: "相关法律法规",
i_decision: "决定权",
i_job: "文化"
});
init_arrays.push({
i_from: "奶茶MM",
i_to: "媒体记者",
i_affair: "和刘先生谈恋爱",
i_who: "家人",
i_qinding: "给京东炒作",
i_qinding2: "炒作",
i_accord1: "广告法",
i_accord2: "公司法",
i_west: "西方",
i_westcountry: "名人",
i_went: "采访",
i_usa: "国际奥委会",
i_wallace: "罗格",
i_faster: "西方的狗仔队",
i_zhangzhe: "晚辈",
i_hk: "刘先生",
i_iden: "京东CEO",
i_affair2: "谈恋爱",
i_law: "中国的相关法律",
i_decision: "恋爱权",
i_job: "新闻"
});
init_arrays.push({
i_from: "童哲",
i_to: "媒体记者",
i_affair: "陈一舟给万门大学注资",
i_who: "志愿者们",
i_qinding: "把志愿者们给出卖了",
i_qinding2: "出卖志愿者",
i_accord1: "合同法",
i_accord2: "公司法",
i_west: "世界上",
i_westcountry: "组织",
i_went: "调查",
i_usa: "AIESEC",
i_wallace: "主席",
i_faster: "人人的五毛党",
i_zhangzhe: "人人下属公司的全职员工",
i_hk: "陈一舟",
i_iden: "人人的CEO",
i_affair2: "注资",
i_law: "中国的相关法律",
i_decision: "决定权",
i_job: "新闻"
});
*/
function initialize(init_array) {
var inputs = get_inputs();
for(var i = 0; i < inputs.length; i++) {
inputs[i].value = init_array[inputs[i].name];
}
generate();
}
function generate() {
var inputs = get_inputs();
var result_text = result;
var template = "";
template += "{{i_to}}:{{i_from}},你觉得{{i_affair}}好不好呀? \n\n";
template += "{{i_from}}:吼啊! \n\n";
template += "{{i_to}}:{{i_who}}也支持吗?\n\n";
template += "{{i_from}}:当然啦! \n\n";
template += "{{i_to}}:那为什么这么早就说要{{i_affair2}},会不会给人感觉是{{i_qinding}}?\n\n";
template += "{{i_from}}:任何事,也要按照{{i_accord1}},按照{{i_accord2}}来进行。";
template += "刚才你问我,我可以回答一句「无可奉告」,但是你们也不高兴,我怎么办?";
template += "我讲的意思不是我要{{i_qinding2}}。";
template += "你问我支持不支持,我说支持。我就明确的告诉你这一点。";
template += "我感觉你们{{i_job}}界还需要学习,你们毕竟还是 too young ,你明白这意思吧?";
template += "我告诉你们我是身经百战了,见得多了,{{i_west}}哪一个{{i_westcountry}}我没有{{i_went}}过?";
template += "你们要知道,{{i_usa}}的{{i_wallace}},比你们不知道要高到哪里去了,我跟他谈笑风生。";
template += "所以说媒体还是要提高自己的知识水平,识得唔识得啊?我为你们感到拙计呀……";
template += "你们有一个好,全世界跑到什么地方,你们比{{i_faster}}跑得还快,";
template += "但是问来问去的问题呀,都 too simple , sometimes naive !懂了没有?\n\n";
template += "{{i_to}}:可是能不能说一下为什么支持{{i_affair}}?\n\n";
template += "{{i_from}}:我很抱歉,我今天是作为一个{{i_zhangzhe}}跟你们讲,";
template += "我不是一个{{i_job}}工作者,但是我见得太多了。我有这个必要告诉你们一些人生的经验……";
template += "中国有一句话叫「闷声大发财」,我就什么话也不说,这是最好的。";
template += "但是我想我见到你们这样热情,一句话不说也不好。";
template += "在宣传上将来如果你们报道上有偏差,你们要负责任。";
template += "我没有说要{{i_qinding}},没有任何这个意思,但你们一定要问我对{{i_hk}}支持不支持,";
template += "他现在是{{i_iden}},我们怎么能不支持{{i_iden}}?\n\n";
template += "{{i_to}}:但是如果说{{i_affair2}}呢?\n\n";
template += "{{i_from}}:{{i_affair2}}也得按照{{i_law}},对不对?";
template += "当然我们的{{i_decision}}也是很重要的。";
template += "到那时候我们会表态的。明白这意思吗?";
template += "你们不要想喜欢弄个大新闻,说现在已经{{i_qinding2}}了,把我批判一番,你们啊,naive!";
template += " I'm angry!你们这样子是不行的!我今天算是得罪了你们一下。";
for (var i = 0; i < inputs.length; i++) {
var regexp = new RegExp("\{\{"+inputs[i].name+"\}\}", "g");
template = template.replace(regexp, inputs[i].value, "g");
}
result_text.value = template;
}
initialize(init_arrays[Math.floor(Math.random() * init_arrays.length)]);
</script>
</body>
</html>