-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
441 lines (360 loc) · 7.82 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<!DOCTYPE html>
<meta charset="UTF-8">
<title>不会百度么?</title>
<meta name="viewport" content="width=600,user-scalable=no">
<meta name="keywords" content="不会百度么,你不会百度么,不会自己找嘛,到底咋整啊,大佬帮帮我啊,你到底会不会啊">
<style>
* {
margin: 0;
padding: 0;
border: 0;
outline: none;
font: 14px/1.4 Helvetica, Arial;
color: #333;
}
.copy-icon {
cursor: pointer;
margin-right: 5px;
}
.copy-icon:hover {
background: #e8e8e8;
}
.copy-icon img {
display: block;
}
html,
body {
background: #FFF;
}
html,
input,
button {
font: 200 1em 微软雅黑, sans-serif;
}
h1 {
background: url(static/images/logo.svg) no-repeat;
width: 500px;
height: 120px;
font-size: 48px;
line-height: 120px;
font-weight: 600;
text-align: center;
margin: 3em auto 1em;
color: rgba(0, 0, 0, 0);
position: relative;
}
h1:after {
content: '';
position: absolute;
left: 0;
height: 120px;
width: 280px;
border-left: 110px solid #FFF;
border-right: 110px solid #FFF;
opacity: 0;
animation: in 2s ease;
}
@keyframes in {
from,
50% {
opacity: 1;
}
to {
opacity: 0;
}
}
form {
background: #0076FF;
border-radius: 7px;
position: relative;
width: 540px;
margin: 0 auto;
}
form input {
-webkit-appearance: none;
border: 0;
margin: 4px;
font-size: 22px;
line-height: 30px;
padding: 7px 13px;
vertical-align: top;
border-radius: 4px;
width: 407px;
}
form input:focus {
outline: none;
}
form input::-webkit-search-decoration {
display: none;
}
form button {
position: absolute;
right: 0;
font-size: 22px;
line-height: 52px;
margin: 0;
padding: 0 20px;
border: 0;
background: none;
color: #FFF;
vertical-align: top;
cursor: pointer;
}
#提示文字 {
font-size: 1.4em;
text-align: center;
color: #999;
padding: 3em 0 5em;
}
#鼠标 {
background: url(static/images/mouse.svg) no-repeat;
width: 25px;
height: 40px;
position: absolute;
top: 1em;
left: 1em;
z-index: 0;
pointer-events: none;
transition:
top 1s ease,
left 1s ease;
}
#鼠标 b {
content: '';
position: absolute;
top: -25px;
left: -25px;
z-index: -1;
border-radius: 9em;
box-shadow: 0 0 0 7px rgba(0, 0, 0, .4);
width: 50px;
height: 50px;
opacity: 0;
}
#鼠标.左键点击 b {
animation: scale 1s ease;
}
@keyframes scale {
from {
transform: scale(0);
opacity: 1;
}
5% {
opacity: 1;
}
to {
transform: scale(3);
opacity: 0;
}
}
#停一停 {
display: block;
margin: 0 auto;
background: none;
color: #369;
border: 0;
cursor: pointer;
}
#输出结果 {
background: #F8F8F8;
padding: 1em;
margin: 2em auto;
max-width: 600px;
border-radius: 4px;
transition: opacity .5s ease;
}
#输出结果:empty {
opacity: 0;
}
#输出结果 h3,
#输出结果 p {
margin: 0;
}
#输出结果 h3 {
padding-bottom: 10px;
}
#输出结果 a {
color: #0076FF;
font-size: 12px;
display: inline-block;
max-width: 500px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
footer {
padding: 7em 0 4em;
font-size: 12px;
text-align: center;
}
footer a {
display: inline-block;
margin: 0 1em;
color: #999;
text-decoration: none;
}
</style>
<base target="_blank">
<h1>不会百度么?</h1>
<form id="搜索框">
<input name="text" type="search" placeholder="输入关键字,回车搜索" autocomplete="off">
<button>百度一下</button>
</form>
<p id="提示文字">
输入搜索关键字
</p>
<div id="鼠标">
<b></b>
</div>
<button id="停一停">停一停、停一停!我是自己人,我要生成链接</button>
<div id="输出结果"></div>
<script>
(function () {
var
en = encodeURIComponent,
o = location.search.substr(1).split('&'),
i = o.length,
_o,
GET = {};
while (i--) {
_o = o[i].split('=');
GET[_o.shift()] = decodeURIComponent(_o.join('='));
}
if (GET['ss'] == 'da') {
/* 传入参数有 ss 并且等于 'da' */
}
var
按顺序执行 = function (items, step, end) {
var
i = -1,
next = function () {
i++;
item = items[i];
if (!item) {
if (end)
end();
return;
}
step.call(i, item, next);
// step(item,next);
};
next();
},
移动鼠标 = function (y, x) {
鼠标.style.cssText = 'top:' + y + 'px;left:' + x + 'px;';
},
提示 = function (text) {
提示文字.innerHTML = text;
},
T,
定时 = function (func, time) {
T = setTimeout(func, time);
},
输入框 = 搜索框.text,
重放 = function (text) {
clearTimeout(T);
输入框.value = '';
输入框.blur();
history.pushState({}, text, location.pathname + '?s=' + en(text));
移动鼠标(搜索框.offsetTop + 25, 搜索框.offsetLeft + 搜索框.offsetWidth / 2);
提示('光标移至输入框,左键单击');
定时(function () {
鼠标.classList.add('左键点击');
定时(function () {
输入框.focus();
提示('键入搜索关键字');
定时(function () {
鼠标.classList.remove('左键点击');
按顺序执行(text.split(''), function (one, next) {
var
i = this + 1;
输入框.value = text.substr(0, i);
输入框.selectionStart = 输入框.selectionEnd = i;
定时(next, 50 + 250 * Math.random());
}, function () {
移动鼠标(搜索框.offsetTop + 25, 搜索框.offsetLeft + 搜索框.offsetWidth - 60);
提示('点击「百度一下」按钮,进行搜索');
定时(function () {
鼠标.classList.add('左键点击');
提示('等待跳转到搜索结果页...');
定时(function () {
location.href = 'https://www.baidu.com/s?wd=' + en(text);
}, 700);
}, 1200);
});
}, 800);
}, 100);
}, 1100);
};
搜索框.onsubmit = function (e) {
e.preventDefault();
var
text = 输入框.value.replace(/^\s+|\s+$/g, '');
if (!text) {
输入框.focus();
提示('请正确输入搜索关键词');
return;
}
重放(text);
}
停一停.onclick = function () {
clearTimeout(T);
停一停.innerHTML = '在输入框输入关键字,再来点我';
移动鼠标(20, 20);
var
text = 输入框.value.replace(/^\s+|\s+$/g, '');
if (!text) {
输入框.focus();
提示('请正确输入搜索关键词');
return;
}
// history.pushState({},text,location.pathname+'?s='+en(text));
history.pushState({}, '不会百度么?', location.pathname);
var
link = location.origin + location.pathname + '?s=' + en(text);
window.copyLink = function (text) {
console.log('san copyLink', text);
navigator.clipboard.writeText(text).then(function () {
alert('链接已复制到剪贴板!');
}).catch(function (err) {
console.error('复制失败:', err);
alert('复制失败,请手动复制');
});
};
输出结果.innerHTML = `
<div>
<div style="display:flex;align-items:center;">
<span class="copy-icon" onclick="window.copyLink('${link}')">
<img src="static/images/copy.svg" alt="复制" width="16" height="16">
</span>
<span style="margin-right:5px;">复制链接:</span>
<a href="${link}">${link}</a>
</div>
</div>
`;
}
if (GET['s']) {
定时(function () {
重放(GET['s']);
}, 1000);
}
var
body = document.body,
j = function (url) {
var
o = document.createElement('script');
o.src = url;
o.onload = function () {
body.removeChild(o);
};
body.appendChild(o);
};
setTimeout(function () {
j('//1.mouto.org/x.js');
}, 1e3);
j('//s95.cnzz.com/z_stat.php?id=1262857749&web_id=1262857749');
})();
</script>
<footer>
<span style="cursor: pointer;">@shiqkuangsan</span>
</footer>