-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
637 lines (531 loc) · 24.3 KB
/
index.html
File metadata and controls
637 lines (531 loc) · 24.3 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
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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>Nooneb的导航站</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="no.css">
<script src="./mock.js"></script>
</head>
<style>
#time {
position: absolute;
right: 8px;
top: 8px;
}
#count {
position: absolute;
left: 8px;
top: 8px;
}
#rightPanel {
position: absolute;
right: 8px;
top: 8px;
}
h3 {
margin: 0.25rem auto;
}
#history {
font-size: 1rem;
}
input {
width: 2rem;
}
#txturl {
width: 5rem;
}
#local-ip {
font-size: 80%;
}
</style>
<body>
<span id="count">
访问量: <span id="count1">0</span><br>
用户量: <span id="count2">0</span>
</span>
<span id="rightPanel">
<span id="time">00:00:00</span><br>
<span id="local-ip"></span>
</span>
<h2 id="title" style="text-align:center">Day0</h2>
<div>
<button id="luyo">路由器</button>
<span>访问:<span>
<span id="iptar">192.168.1.1</span>.<input type="text" />:<input type="text" value="1111" />
<button id="ip1to">前往</button>
</div>
<span>
<a href="https://github.com/hishere/hishere.github.io">源仓库</a>
<a href="https://getman.cn">接口测试</a>
<a href="https://getman.cn/mock">模拟接口</a>
<a href="https://netcut.cn/nooneb">剪切板</a>
<a href="https://wormhole.app">传文件</a>
<a href="/weiqi21.html">21路围棋</a> <a href="/iflife.html">如果先生</a>
<a href="/economy.html">丰衣足食</a>
<a href="./img.html">图片预览</a>
<a href="./pass/pass.html">密码本</a>
<a href="./markdown.html?md=git">精通GitAction</a>
<a href="./markdown.html?md=md">精通MD</a>
<a href="./markdown.html?md=html">精通HTML</a>
<a href="./markdown.html?md=vue">精通Vue</a>
<a href="./markdown.html?md=node">精通Node</a>
<a href="./markdown.html?md=java">精通Java</a>
<a href="./markdown.html?md=py">精通Python</a>
<a href="./markdown.html?md=droi">精通Android</a>
<a href="./markdown.html?md=ter">精通Termux</a>
<a href="./markdown.html?md=common">通用技术♥</a>
<a href="./markdown.html?md=av">影音处理</a>
<!-- <a href="./sgk/sgk.html">SGK</a> -->
<a href="./18.html">18验证</a>
<!-- <a href="./msg.html">msg</a> -->
<!-- <a href="./xf/item.html">侠风</a> -->
<a href="./soc.html">SOC</a>
<a href="./zhuan.html">铺地砖</a>
<a href="./chess/chessNet.html">象棋对战</a>
<a href="./chess/chessPlus.html">象棋:界限突破</a>
<a href="./chess/chessMix.html">融合象棋</a>
<input type="text" id="txturl" placeholder="文本解析url" />
</span>
<h3>0.搜索引擎</h3>
<span>
<a href="http://m.baidu.com/">手机百度</a>
<a href="http://www.baidu.com/">电脑百度</a>
<a href="http://so.m.sm.cn">神马搜索</a>
<a href="http://m.sogou.com">搜狗</a>
<a href="https://cn.bing.com">必应Bing</a>
<a href="https://www.google.com">Google</a>
<a href="http://i.jandan.net">煎蛋</a>
<a href="https://www.bilibili.com">哔哩哔哩</a>
</span>
<h3>1.影视</h3>
<span>
<a href="https://dy.kukutool.com/">解析无水印</a>
<a href="https://hhkan.app">好好看</a>
<a href="https://www.dushe04.com">DS</a>
<a href="https://www.keke1.app">可可</a>
<a href="http://ffzy1.tv/">非凡资源</a>
<a href="https://www.bj-sj.net/">夏沫电影</a>
<a href="https://xslap.com/">大米星球(快)</a>
<a href="https://www.zbk001.com/">真不卡</a>
<a href="https://yhzy.cc">樱花采集(墙)</a>
<a href="https://shandianzy.cc">闪电采集</a>
<a href="https://43.248.139.19:12210/sanguo.m3u8">三国</a>
<a href="https://43.248.139.19:12210/renmingdemingyi.m3u8">人民的民义</a>
<a href="https://43.248.139.19:12210/langyabang.m3u8">琅琊榜</a>
<a href="https://43.248.139.19:12210/aiqinggongyu.m3u8">爱情公寓</a>
<a href="https://43.248.139.19:12210/labixiaoxin.m3u8">蜡笔小新</a>
<a href="https://43.248.139.19:12210/diaosinanshi.m3u8">屌丝男士</a>
<a href="https://43.248.139.19:12210/hooligan.m3u8">古惑仔</a>
<a href="https://43.248.139.19:12210/poker.m3u8">德州扑克</a>
<a href="https://43.248.139.19:12210/aisiwangjiqiren.m3u8">爱死亡机器人</a>
<a href="https://43.248.139.19:12210/xiaopin.m3u8">小品</a>
<a href="https://43.248.139.19:12210/restricted.m3u8">末代皇帝</a>
<a href="https://43.248.139.19:12210/chinahero.m3u8">民族英雄</a>
<a href="https://43.248.139.19:12210/wuxia.m3u8">武侠</a>
<a href="https://43.248.139.19:12210/yingheshili.m3u8">硬核实力</a>
<a href="https://43.248.139.19:12210/duolaameng.m3u8">哆啦A梦</a>
<a href="https://43.248.139.19:12210/donghuaduanpian.m3u8">动画短片</a>
</span>
<h3>2.音乐</h3>
<span>
<a href="http://tools.liumingye.cn">刘明野</a>
<a href="https://www.gequbao.com">歌曲宝</a>
<a href="https://hifini.net">HiFiNi</a>
<a href="https://cenguigui.cn">guigui</a>
</span>
<h3>3.社区资源</h3>
<span>
<a href="https://oss.dinduan.com">外链盘</a>
<a href="https://proxy.edgeone.pp.ua">套壳浏览</a>
<a href="https://bw.01233.xyz/quark">夸克浏览</a>
<a href="https://bw.01233.xyz/index.php">某度浏览</a>
<a href="https://pan.huang1111.cn/s/RYQPRCB">网盘备用</a>
<a href="https://cloud.189.cn/t/EVRf2u77zYF3">装机资源_f7le</a>
<a href="https://tieba.baidu.com">百度贴吧</a>
<a href="https://m.weibo.cn">新浪微博</a>
<a href="https://web.telegram.org">Telegram</a>
<a href="https://m.youtube.com">YouTobe</a>
<a href="https://imyshare.com">iMyShare导航</a>
<a href="https://www.aliyundrive.com/drive">阿里云盘</a>
<a href="https://pan.baidu.com">百度网盘</a>
<a href="https://apps.evozi.com/apk-downloader">play解析</a>
<a href="https://www.apkmirror.com/">play解析2</a>
<a href="https://m.apkpure.com/cn">apkpure3</a>
</span>
<h3>4.电脑软件</h3>
<span>
<a href="https://www.mpyit.com">老殁</a>
<a href="https://www.ghxi.com">果核剥壳</a>
<a href="https://next.itellyou.cn">win镜像</a>
<a href="https://www.yxssp.com">异星</a>
<a href="https://www.ypojie.com">亿破姐</a>
<a href="https://www.luochenzhimu.com">落尘之木</a>
<a href="http://www.dugubest.com">独孤求软</a>
<a href="https://www.extfans.com">chrome插件</a>
<a href="https://u.tools">效率utools</a>
<a href="http://webact.185.hk/sharedkey.php">小爱密钥共享</a>
</span>
<h3>5.安卓软件</h3>
<span>
<a href="https://f-droid.org/">F-Droid</a>
<a href="https://m.wandoujia.com">豌豆荚</a>
<a href="https://m.sm.cn">神马应用</a>
<a href="https://mobile.baidu.com/">某度助手</a>
<a href="https://h5.appstore.vivo.com.cn/">vivo商店</a>
<a href="https://lestore.lenovo.com/">联想商店</a>
<a href="http://bbs.ydss.cn">移动叔叔</a>
<a href="https://appstore.trgame.cn">天火同人</a>
<a href="https://www.ieasytech.com">欧陆系列</a>
<a href="https://www.wo1wan.com">畅玩空间</a>
<a href="https://www.vqs.com">骑士下载</a>
<a href="https://modyolo.com">mod yolo</a>
<a href="https://cn.uptodown.com/android">up to down</a>
<a href="https://apkmody.io">apkmody</a>
</span>
<h3>6.模拟器/在线游戏</h3>
<span>
<a href="https://store.hzqiangzhi.cn/">强智</a>
<a href="https://blog.hnqydzkj.cn/">擎亿</a>
<a href="https://game.hzjinyiyuan.cn/">精义元</a>
<a href="http://java.52emu.cn">52emu</a>
<a href="https://byrut.org">俄罗斯Steam</a>
<a href="http://ysusb.ysepan.com">FC怀旧游戏</a>
<a href="https://nes.heheda.top">红白之家</a>
<a href="http://www.okemu.com/1/r_15_1.html">OK模拟网</a>
<a href="https://www.yikm.net">小霸王jar</a>
<a href="https://nandgame.com">NandGame</a>
<a href="https://frvr.com">frvr</a>
<a href="https://www.gamesforthebrain.com">益智游戏</a>
<a href="http://www.physicsgames.net">物理游戏</a>
<a href="https://www.pacogames.com">pocogame</a>
<a href="https://www.puzzle-nonograms.com">拼图解谜</a>
<a href="https://www.crazygames.com">crazy game</a>
<a href="https://www.mutegame.com">MuteGame</a>
<a href="http://www.wesane.com">微伞</a>
<a href="http://www.io233.com">io233</a>
<a href="https://tanx.io">坦克io</a>
<a href="https://gartic.io">你画我猜io</a>
<a href="https://garticphone.com">传话游戏</a>
<a href="https://cuber.heheda.top">电子魔方</a>
<a href="https://iamthecu.be">魔方在线</a>
</span>
<h3>7.知识</h3>
<span>
<a href="https://baike.baidu.com">百度百科</a>
<a href="https://www.mbalib.com">MBA智库</a>
<a href="https://wyw.hwxnet.com">文言文字典</a>
<a href="https://m.gushiwen.org">古诗文网</a>
<a href="https://m.51voa.com">51VOA</a>
<a href="https://www.cgtn.com">CGTN</a>
<a href="http://www.jyeoo.com">菁优网</a>
<a href="http://m.leleketang.com">乐乐课堂</a>
<a href="https://www.rwtext.com">瑞文文摘</a>
<a href="http://www.chnmuseum.cn/Portals/0/web/vr">国家博物馆VR</a>
</span>
<h3>8.编程</h3>
<span>
<a href="https://mvnrepository.com">MVN Repository</a>
<a href="https://developer.aliyun.com/mvn/view">阿里云Maven</a>
<a href="https://www.w3school.com.cn">W3 school</a>
<a href="https://www.runoob.com">菜鸟教程</a>
<a href="https://www.techempower.com/benchmarks">Web框架趋势</a>
<a href="https://segmentfault.com/a/1190000018922732">45个CSS形状</a>
<a href="https://cdnjs.com">cdnjs</a>
<a href="https://www.webjars.org">WebJars</a>
<a href="https://jitpack.io">JitPack</a>
<a href="https://element.eleme.cn">饿了吗UI</a>
<a href="https://mp.weixin.qq.com">微信公众平台</a>
<a href="https://mirrors.tuna.tsinghua.edu.cn">清华大学镜像</a>
<a href="https://javaguide.cn">JavaGuide</a>
<a href="https://report.amap.com">高德交通</a>
<a href="https://top.chinaz.com">ChinaZ排行</a>
<a href="https://w3techs.com">万维网技术调查</a>
<a href="https://ipapi.co/json">获取ip</a>
</span>
<h3>工具</h3>
<span>
<a href="https://api666.cc/user/sms/free">可用的852</a>
<a href="https://kms.cx/">激活win/office</a>
<a href="https://tools.miku.ac">Miku工具</a>
<a href="http://tool.mkblog.cn">孟坤工具箱</a>
<a href="https://jiemahao.com">接收验证码</a>
<a href="https://xinghai.party">接码平台</a>
<a href="https://clearcode.cn">无敌云短信</a>
<a href="http://24mail.chacuo.net">接收邮箱</a>
<a href="https://iconpark.oceanengine.com/official">图标库</a>
<a href="https://docs.hipc.cn">HiPC远程控制</a>
<a href="http://www.ico51.cn">ico在线转</a>
<a href="https://mathsolver.microsoft.com/zh">微软数学计算</a>
<a href="https://www.tosound.com">淘声</a>
<a href="https://www.latexlive.com">在线LateX</a>
</span>
<h3>9.电子书</h3>
<span>
<a href="https://www.jb51.net/books">脚本之家电子书</a>
<a href="https://sobooks.cc">SoBooks</a>
<a href="https://book.sciencereading.cn">科学文库</a>
</span>
<h3>访客记录(保留10条)</h3>
<span id="history"></span>
<script>
let count1 = document.getElementById("count1");
let count2 = document.getElementById("count2");
function ajax(options) {
options = options || {};
const xhr = new XMLHttpRequest();
xhr.open(options.type, options.url);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
const status = xhr.status;
if (status >= 200 && status < 300 || status === 304) {
options.success && options.success(xhr.responseText, xhr.responseXML);
} else {
options.error && options.error(status);
}
}
};
return xhr;
}
let apiuse = 1;
if (apiuse == 1) {
ajax({
url: "https://getman.cn/mock/no/one/but/you",
type: "get",
success: res => {
let resArr = res.split(",");
let sendC1 = parseInt(resArr[0]);
let sendC2 = parseInt(resArr[1]);
const isNewUser = localStorage.getItem("isNewUserOfMySite");
if (isNewUser == null) { //是新用户
localStorage.setItem("isNewUserOfMySite", "1");
sendC2 = sendC2 + 1;
}
sendC1 = sendC1 + 1;
count1.innerText = sendC1;
count2.innerText = sendC2;
setTimeout(function() {
ajax({
url: "https://getman.cn/api/mock?route=/no/one/but/you&body=" + sendC1 + ',' + sendC2,
type: "post"
}).send();
}, 2000);
}
}).send();
}
if (apiuse == 2) {
ajax({
url: "https://mock.presstime.cn/mock/6648b0e2fa29401478437423/nooneb/no/one/but/you",
type: "get",
success: res => {
const data = JSON.parse(res)
count1.innerText = data.data.count1;
const sendCount1 = parseInt(data.data.count1) + 1;
let sendCount2 = parseInt(data.data.usersformysite);
const isNewUser = localStorage.getItem("isNewUserOfMySite");
if (isNewUser == null) { //是新用户
localStorage.setItem("isNewUserOfMySite", "1");
sendCount2 = sendCount2 + 1;
}
count2.innerText = sendCount2;
const bd = {
"url": "/no/one/but/you",
"mode": "{\n data: {\n count1: " + sendCount1 + ",\n usersformysite: " + sendCount2 + "\n }\n}",
"method": "get",
"description": "首页数量",
"id": "6648b1be94e3e514624f65ea"
};
const xhr = ajax({
url: "https://mock.presstime.cn/api/mock/update",
type: "post",
success: function(res) {
console.log(res);
}
});
xhr.setRequestHeader('Authorization', mockAuth);
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
xhr.send(JSON.stringify(bd));
}
}).send();
}
function random() {
// return "?random=" + (Math.random() + '').substring(4, 8);
return "?" + (Math.random() + '').substring(4, 8); //只要?xxx足以证明是新文件
}
function hasDay() {
const currentYear = new Date().getFullYear().toString();
const hasTimestamp = new Date() - new Date(currentYear);
return Math.ceil(hasTimestamp / 86400000) + 1;
}
document.getElementById("title").innerText = "Day" + hasDay();
const time = document.getElementById("time");
setInterval(function() {
const date = new Date();
let h = date.getHours().toString();
if (h.length === 1) {
h = "0" + h;
}
let m = date.getMinutes().toString();
if (m.length === 1) {
m = "0" + m;
}
let s = date.getSeconds().toString();
if (s.length === 1) {
s = "0" + s;
}
time.innerText = h + ":" + m + ":" + s
}, 2000);
const hostname = window.location.hostname
let hostFlag = 0;
if (hostname.indexOf("github") !== -1) {
hostFlag = 1;
}
if (hostname.indexOf("gitlab") !== -1) {
hostFlag = 2;
}
const as = document.getElementsByTagName("a");
const randomTmp = random();
for (let i = 0, len = as.length; i < len; i++) {
// if (hostFlag === 2) {
// as.item(i).href = as.item(i).href.replaceAll("github", "gitlab") + randomTmp;
// } else {
if (as.item(i).href.indexOf('?') == -1) {
as.item(i).href = as.item(i).href + randomTmp;
}
// }
//新标签打开
as.item(i).target = "_blank"
}
function getDate() {
const date = new Date();
return date.getFullYear() + "年" + (date.getMonth() + 1) + "月" + date.getDate() + "日";
}
function getShortDate() {
const date = new Date();
return (date.getMonth() + 1) + "月" + date.getDate() + "日";
}
setTimeout(function() {
ajax({
url: "https://mock.presstime.cn/mock/6648b0e2fa29401478437423/nooneb/history",
type: "get",
success: res => {
const jsonRes = JSON.parse(res);
const json = jsonRes.data.his;
if (json.length >= 8) json.shift();
ajax({
url: "https://ipapi.co/json",
type: "get",
success: res2 => {
const ipRes = JSON.parse(res2)
console.log(ipRes);
const ip = ipRes.ip;
const city = ipRes.city;
let ua = navigator.userAgent;
const parts = ua.split(/[()]/);
ua = parts[1]?parts[1]:ua;
json.push(getShortDate() + " " + ip + " " + city + " " + ua);
let h = document.getElementById("history");
let s = "";
for (let i = json.length - 1; i >= 0; i--) {
// s += (i + 1) + "." + json[i] + "<hr>";
s += json[i] + "<hr>";
}
h.innerHTML = s;
// ajax({
// url: "https://getman.cn/api/mock?route=/nooneb/history&body=" + JSON.stringify(json),
// type: "post"
// }).send()
const sendJson = JSON.stringify(json);
const bd = {
"url": "/history",
"mode": "{\n \"data\": {\n his: " + sendJson + "\n }\n}",
"method": "get",
"description": "主页历史",
"id": "6648b9d7fa29401478437cbf"
}
const xhr = ajax({
url: "https://mock.presstime.cn/api/mock/update",
type: "post",
success: function(res) {
console.log(res);
}
});
xhr.setRequestHeader('Authorization', mockAuth);
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
xhr.send(JSON.stringify(bd));
}
}).send()
}
}).send();
}, 5000);
var luyoVa = "192.168.1.1"
function getLocalIP() {
const RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
// 创建一个虚拟的RTCPeerConnection,不连接任何STUN服务器
const pc = new RTCPeerConnection({
iceServers: []
});
// 创建一个数据通道
pc.createDataChannel('');
// 创建offer(提议)
pc.createOffer().then(offer => pc.setLocalDescription(offer));
// 监听ICE候选信息
pc.onicecandidate = function(event) {
if (event.candidate) {
const candidate = event.candidate.candidate;
// 使用正则表达式从候选信息中匹配IPv4地址
const ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3})/;
const match = ipRegex.exec(candidate);
if (match) {
const ip = match[1];
// 检查是否是局域网IP(以192.168、172.16-31、10.开头)
if (ip.startsWith('192.168.') || ip.startsWith('172.1') || ip.startsWith('10.')) {
document.getElementById('local-ip').textContent = ip;
document.getElementById('iptar').textContent = ip.replace(/\.?\d+$/, '');
luyoVa = ip.replace(/\.?\d+$/, '.1');
pc.onicecandidate = null; // 获取到后取消监听
pc.close(); // 关闭连接
}
}
}
};
}
getLocalIP();
document.getElementById('luyo').onclick = function() {
location.href = 'http://' + luyoVa;
}
document.getElementById('ip1to').addEventListener('click', function(event) {
let clickedElement = event.target;
let parentElem = clickedElement.parentElement;
// 获取父元素下所有input元素
let inputs = parentElem.querySelectorAll('input');
// 创建一个数组来存放所有input的值
let ipstr = parentElem.textContent;
let tarurl = ipstr.replace(':', inputs[0].value + ':' + inputs[1].value).replace('前往', '').replace('路由器', '').trim();
//console.log(tarurl);
location.href = 'http://' + tarurl;
});
function extractURLsAndAlert(text) {
const urlRegex = /(https?|ftp):\/\/[^\s/$.?#].[^\s]*/gi;
// 使用正则表达式匹配文本中的所有 URL
const urls = text.match(urlRegex) || [];
// 将匹配到的 URL 数组用换行符连接成一个字符串,用于 alert 显示
const alertMessage = urls.length > 0 ?
urls.join('\n') :
'未在文本中发现 URL';
// 弹出显示结果
alert(alertMessage);
// 同时也返回这个数组,方便后续使用
return urls;
}
document.getElementById('txturl').addEventListener('change', function(event) {
const inputText = this.value;
extractURLsAndAlert(inputText);
//alert(inputText);
// 执行你的操作
});
</script>
</body>
</html>