-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcftiw.js
732 lines (723 loc) · 24.9 KB
/
cftiw.js
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
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
async function fetchCloudflareTraceData() {
try {
const response = await fetch("/cdn-cgi/trace");
if (!response.ok) throw new Error("Failed to fetch Cloudflare trace data");
const text = await response.text();
return Object.fromEntries(
text
.trim()
.split("\n")
.map((line) => line.split("="))
);
} catch (error) {
console.error("Unexpected FFCTD error: ", error);
}
}
async function display() {
const elements = document.querySelectorAll(".cloudflare-trace-info");
if (!elements.length) return;
const iataCode = navigator.language.includes("zh")
? {
AMS: "荷兰阿姆斯特丹",
AMM: "约旦安曼",
ADL: "澳大利亚阿德莱德",
QWJ: "巴西阿美利卡纳",
ACC: "加纳阿克拉",
AMD: "印度艾哈迈达巴德",
IAD: "美国阿什本",
AKL: "新西兰奥克兰",
ATH: "希腊雅典",
ARI: "智利阿里卡",
ALG: "阿尔及利亚阿尔及尔",
ALA: "哈萨克斯坦阿拉木图",
LLK: "阿塞拜疆阿斯塔拉",
ATL: "美国亚特兰大",
BNE: "澳大利亚布里斯班",
BCN: "西班牙巴塞罗那",
BGW: "伊拉克巴格达",
ASU: "巴拉圭亚松森",
AAE: "阿尔及利亚安纳巴",
BEG: "塞尔维亚贝尔格莱德",
GYD: "阿塞拜疆巴库",
BLR: "印度班加罗尔",
TNR: "马达加斯加塔那那利佛",
CBR: "澳大利亚堪培拉",
BEL: "巴西贝伦",
TXL: "德国柏林",
BKK: "泰国曼谷",
BOS: "美国波士顿",
CPT: "南非开普敦",
CNF: "巴西贝洛奥里藏特",
BSR: "伊拉克巴士拉",
CHC: "新西兰基督城",
BEY: "黎巴嫩贝鲁特",
BUF: "美国布法罗",
BWN: "文莱斯里巴加湾市",
BNU: "巴西布卢梅瑙",
GUM: "关岛哈加特纳",
BTS: "斯洛伐克布拉迪斯拉发",
BRU: "比利时布鲁塞尔",
YYC: "加拿大卡尔加里",
BOG: "哥伦比亚波哥大",
DKR: "塞内加尔达喀尔",
DMM: "沙特阿拉伯达曼",
MEL: "澳大利亚墨尔本",
DOH: "卡塔尔多哈",
OTP: "罗马尼亚布加勒斯特",
CLT: "美国夏洛特",
DAR: "坦桑尼亚达累斯萨拉姆",
BSB: "巴西巴西利亚",
BBI: "印度布巴内斯瓦尔",
ORD: "美国芝加哥",
EZE: "阿根廷布宜诺斯艾利斯",
DXB: "阿联酋迪拜",
JIB: "吉布提市",
BUD: "匈牙利布达佩斯",
CEB: "菲律宾宿务",
NOU: "新喀里多尼亚努美阿",
PER: "澳大利亚珀斯",
DUR: "南非德班",
KIV: "摩尔多瓦基希讷乌",
CMH: "美国哥伦布",
CFC: "巴西卡萨多尔",
EBL: "伊拉克埃尔比勒",
IXC: "印度昌迪加尔",
DFW: "美国达拉斯",
SYD: "澳大利亚悉尼",
CPH: "丹麦哥本哈根",
VCP: "巴西坎皮纳斯",
CGD: "中国常德",
HFA: "以色列海法",
GBE: "博茨瓦纳哈博罗内",
MAA: "印度钦奈",
DEN: "美国丹佛",
ORK: "爱尔兰科克",
HRE: "津巴布韦哈拉雷",
JED: "沙特阿拉伯吉达",
PPT: "法属波利尼西亚塔希提",
JNB: "南非约翰内斯堡",
KWI: "科威特科威特城",
DUB: "爱尔兰都柏林",
DTW: "美国底特律",
COR: "阿根廷科尔多瓦",
SUV: "斐济苏瓦",
DUS: "德国杜塞尔多夫",
BAH: "巴林麦纳麦",
KGL: "卢旺达基加利",
CGP: "孟加拉国吉大港",
HNL: "美国檀香山",
CGB: "巴西库亚巴",
HBA: "澳大利亚霍巴特",
MCT: "阿曼马斯喀特",
CMB: "斯里兰卡科伦坡",
IAH: "美国休斯顿",
EDI: "英国爱丁堡",
LOS: "尼日利亚拉各斯",
CWB: "巴西库里提巴",
FRA: "德国法兰克福",
LAD: "安哥拉罗安达",
IND: "美国印第安纳波利斯",
DAC: "孟加拉国达卡",
FLN: "巴西弗洛里亚诺波利斯",
NJF: "伊拉克纳杰夫",
JAX: "美国杰克逊维尔",
GVA: "瑞士日内瓦",
FOR: "巴西福塔莱萨",
MPM: "莫桑比克马普托",
FUO: "中国佛山",
XNH: "伊拉克纳西里耶",
MBA: "肯尼亚蒙巴萨",
MCI: "美国堪萨斯城",
ZDM: "拉马拉",
GOT: "瑞典哥德堡",
GEO: "圭亚那乔治敦",
FUK: "日本福冈",
HAM: "德国汉堡",
LAS: "美国拉斯维加斯",
RUH: "沙特阿拉伯利雅得",
NBO: "肯尼亚内罗毕",
GYN: "巴西戈亚尼亚",
FOC: "中国福州",
LAX: "美国洛杉矶",
CAN: "中国广州",
HEL: "芬兰赫尔辛基",
GUA: "危地马拉危地马拉城",
ISU: "伊拉克苏莱曼尼亚",
ORN: "阿尔及利亚奥兰",
MFE: "美国麦卡伦",
IST: "土耳其伊斯坦布尔",
TLV: "以色列特拉维夫",
GYE: "厄瓜多尔瓜亚基尔",
HAK: "中国澄迈",
OUA: "布基纳法索瓦加杜古",
MRU: "毛里求斯路易港",
MEM: "美国孟菲斯",
HAN: "越南河内",
ITJ: "巴西伊塔雅伊",
ADB: "土耳其伊兹密尔",
KBP: "乌克兰基辅",
MEX: "墨西哥墨西哥城",
RUN: "法国留尼汪",
SJW: "中国衡水",
JOI: "巴西若因维利",
MIA: "美国迈阿密",
LIS: "葡萄牙里斯本",
SGN: "越南胡志明市",
TUN: "突尼斯突尼斯",
JDO: "巴西北茹阿泽鲁",
LHR: "英国伦敦",
HKG: "中国香港",
LIM: "秘鲁利马",
MSP: "美国明尼阿波利斯",
FIH: "刚果民主共和国金沙萨",
LUX: "卢森堡卢森堡市",
MGM: "美国蒙哥马利",
HYD: "印度海得拉巴",
MAO: "巴西马瑙斯",
CAI: "埃及开罗",
MAD: "西班牙马德里",
MDE: "哥伦比亚麦德林",
YUL: "加拿大蒙特利尔",
ISB: "巴基斯坦伊斯兰堡",
WDH: "纳米比亚温得和克",
MAN: "英国曼彻斯特",
CGK: "印度尼西亚雅加达",
NQN: "阿根廷内乌肯",
BNA: "美国纳什维尔",
ASK: "科特迪瓦亚穆苏克罗",
EWR: "美国纽瓦克",
MRS: "法国马赛",
PTY: "巴拿马巴拿马城",
JSR: "孟加拉国杰索尔",
ABJ: "科特迪瓦阿比让",
MXP: "意大利米兰",
TNA: "中国淄博",
ORF: "美国诺福克",
PBM: "苏里南帕拉马里博",
EBB: "乌干达坎帕拉",
OMA: "美国奥马哈",
POA: "巴西阿雷格里港",
MSQ: "白俄罗斯明斯克",
DME: "俄罗斯莫斯科",
JHB: "马来西亚新山",
YOW: "加拿大渥太华",
UIO: "厄瓜多尔基多",
MUC: "德国慕尼黑",
PHL: "美国费城",
KNU: "印度坎普尔",
PHX: "美国菲尼克斯",
LCA: "塞浦路斯尼科西亚",
KHH: "中国台湾高雄",
REC: "巴西累西腓",
OSL: "挪威奥斯陆",
PIT: "美国匹兹堡",
KHI: "巴基斯坦卡拉奇",
RAO: "巴西里贝朗普雷图",
GIG: "巴西里约热内卢",
PDX: "美国波特兰",
KTM: "尼泊尔加德满都",
PMO: "意大利巴勒莫",
CDG: "法国巴黎",
QRO: "墨西哥克雷塔罗",
PRG: "捷克共和国布拉格",
RIC: "美国里士满",
CCU: "印度加尔各答",
SJO: "哥斯达黎加圣何塞",
SCL: "智利圣地亚哥",
KEF: "冰岛雷克雅未克",
SMF: "美国萨克拉门托",
KJA: "俄罗斯克拉斯诺亚尔斯克",
KUL: "马来西亚吉隆坡",
SLC: "美国盐湖城",
RIX: "拉脱维亚里加",
SDQ: "多米尼加共和国圣多明各",
FCO: "意大利罗马",
SAN: "美国圣迭戈",
LHE: "巴基斯坦拉合尔",
SJP: "巴西圣若泽杜里奥普雷图",
SJC: "美国圣何塞",
LED: "俄罗斯圣彼得堡",
PKX: "中国廊坊",
SJK: "巴西圣若泽杜斯坎普斯",
GRU: "巴西圣保罗",
SOF: "保加利亚索非亚",
YXE: "加拿大萨斯卡通",
LHW: "中国兰州",
SEA: "美国西雅图",
ARN: "瑞典斯德哥尔摩",
SOD: "巴西索罗卡巴",
MFM: "中国澳门",
FSD: "南达科他州苏福尔斯",
STR: "德国斯图加特",
STL: "美国圣路易斯",
TLL: "爱沙尼亚塔林",
MLE: "马尔代夫马累",
TGU: "洪都拉斯特古西加尔巴",
TLH: "美国塔拉哈西",
TBS: "格鲁吉亚第比利斯",
MDL: "缅甸曼德勒",
NVT: "巴西廷博",
MNL: "菲律宾马尼拉",
SKG: "希腊塞萨洛尼基",
UDI: "巴西乌贝兰迪亚",
YYZ: "加拿大多伦多",
BOM: "印度孟买",
TIA: "阿尔巴尼亚地拉那",
VIX: "巴西维多利亚",
YVR: "加拿大温哥华",
NAG: "印度那格浦尔",
KLD: "俄罗斯联邦特维尔",
VIE: "奥地利维也纳",
YWG: "加拿大温尼伯",
OKA: "日本那霸",
CAW: "巴西坎波斯多斯戈伊塔卡泽斯",
DEL: "印度新德里",
VNO: "立陶宛维尔纽斯",
SFO: "美国旧金山",
XAP: "巴西沙佩科",
WAW: "波兰华沙",
KIX: "日本大阪",
KIN: "牙买加金斯敦",
BGI: "巴巴多斯布里奇敦",
SVX: "俄罗斯叶卡捷琳堡",
PAT: "印度巴特那",
BGR: "美国班戈",
GND: "格林纳达圣乔治",
ZAG: "克罗地亚萨格勒布",
PNH: "柬埔寨金边",
AUS: "美国奥斯汀",
STI: "多米尼加共和国圣地亚哥德洛斯卡巴耶罗斯",
ZRH: "瑞士苏黎世",
TAO: "中国青岛",
ABQ: "美国阿尔伯克基",
LPB: "玻利维亚拉巴斯",
ICN: "韩国首尔",
LYS: "法国里昂",
GDL: "墨西哥瓜达拉哈拉",
SHA: "中国上海",
BOD: "法国波尔多",
SAT: "美国圣安东尼奥",
SJU: "波多黎各圣胡安",
SIN: "新加坡",
CLE: "美国克利夫兰",
BAQ: "哥伦比亚巴兰基亚",
SKP: "北马其顿斯科普里",
URT: "泰国素叻他尼",
RDU: "美国达勒姆",
PMW: "巴西帕尔马斯",
TPE: "中国台北",
OKC: "美国俄克拉荷马城",
ARU: "巴西阿拉萨图巴",
TAS: "乌兹别克斯坦塔什干",
TPA: "美国坦帕",
POS: "特立尼达和多巴哥西班牙港",
ANC: "美国安克雷奇",
SSA: "巴西萨尔瓦多",
TSN: "中国天津",
YHZ: "加拿大哈利法克斯",
NRT: "日本东京",
ULN: "蒙古乌兰巴托",
VTE: "老挝万象",
KHN: "中国南昌",
RGN: "缅甸仰光",
EVN: "亚美尼亚埃里温",
JOG: "印度尼西亚日惹",
ZGN: "中国中山",
CGY: "菲律宾卡加延德奥罗",
WHU: "中国芜湖",
HYN: "中国台州",
COK: "印度科钦",
DPS: "印度尼西亚登巴萨",
CNN: "印度坎努尔",
CLO: "哥伦比亚卡利",
SZX: "中国深圳",
KWE: "中国贵阳",
HGH: "中国绍兴",
CZX: "中国常州",
KMG: "中国昆明",
CNX: "泰国清迈",
CGO: "中国郑州",
TYN: "中国阳泉",
CSX: "中国长沙",
DLC: "中国大连",
BHY: "中国北海",
CKG: "中国重庆",
HFE: "中国淮南",
XFN: "中国襄阳",
XNN: "中国西宁",
DAD: "越南岘港",
JXG: "中国嘉兴",
CRK: "菲律宾塔拉克市",
PBH: "不丹廷布",
XIY: "中国宝鸡",
CTU: "中国成都",
NQZ: "哈萨克斯坦阿斯塔纳",
NNG: "中国南宁",
KCH: "马来西亚古晋",
AKX: "哈萨克斯坦阿克托别",
LOCAL: "本地网络",
}
: {
AMS: "Amsterdam, Netherlands",
AMM: "Amman, Jordan",
ADL: "Adelaide, Australia",
QWJ: "Americana, Brazil",
ACC: "Accra, Ghana",
AMD: "Ahmedabad, India",
IAD: "Ashburn, United States",
AKL: "Auckland, New Zealand",
ATH: "Athens, Greece",
ARI: "Arica, Chile",
ALG: "Algiers, Algeria",
ALA: "Almaty, Kazakhstan",
LLK: "Astara, Azerbaijan",
ATL: "Atlanta, United States",
BNE: "Brisbane, Australia",
BCN: "Barcelona, Spain",
BGW: "Baghdad, Iraq",
ASU: "Asunción, Paraguay",
AAE: "Annaba, Algeria",
BEG: "Belgrade, Serbia",
GYD: "Baku, Azerbaijan",
BLR: "Bangalore, India",
TNR: "Antananarivo, Madagascar",
CBR: "Canberra, Australia",
BEL: "Belém, Brazil",
TXL: "Berlin, Germany",
BKK: "Bangkok, Thailand",
BOS: "Boston, United States",
CPT: "Cape Town, South Africa",
CNF: "Belo Horizonte, Brazil",
BSR: "Basra, Iraq",
CHC: "Christchurch, New Zealand",
BEY: "Beirut, Lebanon",
BUF: "Buffalo, United States",
BWN: "Bandar Seri Begawan, Brunei",
BNU: "Blumenau, Brazil",
GUM: "Hagatna, Guam",
BTS: "Bratislava, Slovakia",
BRU: "Brussels, Belgium",
YYC: "Calgary, Canada",
BOG: "Bogotá, Colombia",
DKR: "Dakar, Senegal",
DMM: "Dammam, Saudi Arabia",
MEL: "Melbourne, Australia",
DOH: "Doha, Qatar",
OTP: "Bucharest, Romania",
CLT: "Charlotte, United States",
DAR: "Dar es Salaam, Tanzania",
BSB: "Brasilia, Brazil",
BBI: "Bhubaneswar, India",
ORD: "Chicago, United States",
EZE: "Buenos Aires, Argentina",
DXB: "Dubai, United Arab Emirates",
JIB: "Djibouti City",
BUD: "Budapest, Hungary",
CEB: "Cebu, Philippines",
NOU: "Noumea, New Caledonia",
PER: "Perth, Australia",
DUR: "Durban, South Africa",
KIV: "Chișinău, Moldova",
CMH: "Columbus, United States",
CFC: "Cacador, Brazil",
EBL: "Erbil, Iraq",
IXC: "Chandigarh, India",
DFW: "Dallas, United States",
SYD: "Sydney, Australia",
CPH: "Copenhagen, Denmark",
VCP: "Campinas, Brazil",
CGD: "Changde, China",
HFA: "Haifa, Israel",
GBE: "Gaborone, Botswana",
MAA: "Chennai, India",
DEN: "Denver, United States",
ORK: "Cork, Ireland",
HRE: "Harare, Zimbabwe",
JED: "Jeddah, Saudi Arabia",
PPT: "Tahiti, French Polynesia",
JNB: "Johannesburg, South Africa",
KWI: "Kuwait City, Kuwait",
DUB: "Dublin, Ireland",
DTW: "Detroit, United States",
COR: "Córdoba, Argentina",
SUV: "Suva, Fiji",
DUS: "Düsseldorf, Germany",
BAH: "Manama, Bahrain",
KGL: "Kigali, Rwanda",
CGP: "Chittagong, Bangladesh",
HNL: "Honolulu, United States",
CGB: "Cuiaba, Brazil",
HBA: "Hobart, Australia",
MCT: "Muscat, Oman",
CMB: "Colombo, Sri Lanka",
IAH: "Houston, United States",
EDI: "Edinburgh, United Kingdom",
LOS: "Lagos, Nigeria",
CWB: "Curitiba, Brazil",
FRA: "Frankfurt, Germany",
LAD: "Luanda, Angola",
IND: "Indianapolis, United States",
DAC: "Dhaka, Bangladesh",
FLN: "Florianopolis, Brazil",
NJF: "Najaf, Iraq",
JAX: "Jacksonville, United States",
GVA: "Geneva, Switzerland",
FOR: "Fortaleza, Brazil",
MPM: "Maputo, Mozambique",
FUO: "Foshan, China",
XNH: "Nasiriyah, Iraq",
MBA: "Mombasa, Kenya",
MCI: "Kansas City, United States",
ZDM: "Ramallah",
GOT: "Gothenburg, Sweden",
GEO: "Georgetown, Guyana",
FUK: "Fukuoka, Japan",
HAM: "Hamburg, Germany",
LAS: "Las Vegas, United States",
RUH: "Riyadh, Saudi Arabia",
NBO: "Nairobi, Kenya",
GYN: "Goiania, Brazil",
FOC: "Fuzhou, China",
LAX: "Los Angeles, United States",
CAN: "Guangzhou, China",
HEL: "Helsinki, Finland",
GUA: "Guatemala City, Guatemala",
ISU: "Sulaymaniyah, Iraq",
ORN: "Oran, Algeria",
MFE: "McAllen, United States",
IST: "Istanbul, Turkey",
TLV: "Tel Aviv, Israel",
GYE: "Guayaquil, Ecuador",
HAK: "Chengmai, China",
OUA: "Ouagadougou, Burkina Faso",
MRU: "Port Louis, Mauritius",
MEM: "Memphis, United States",
HAN: "Hanoi, Vietnam",
ITJ: "Itajai, Brazil",
ADB: "Izmir, Turkey",
KBP: "Kyiv, Ukraine",
MEX: "Mexico City, Mexico",
RUN: "Réunion, France",
SJW: "Hengshui, China",
JOI: "Joinville, Brazil",
MIA: "Miami, United States",
LIS: "Lisbon, Portugal",
SGN: "Ho Chi Minh City, Vietnam",
TUN: "Tunis, Tunisia",
JDO: "Juazeiro do Norte, Brazil",
LHR: "London, United Kingdom",
HKG: "Hong Kong",
LIM: "Lima, Peru",
MSP: "Minneapolis, United States",
FIH: "Kinshasa, DR Congo",
LUX: "Luxembourg City, Luxembourg",
MGM: "Montgomery, United States",
HYD: "Hyderabad, India",
MAO: "Manaus, Brazil",
CAI: "Cairo, Egypt",
MAD: "Madrid, Spain",
MDE: "Medellín, Colombia",
YUL: "Montréal, Canada",
ISB: "Islamabad, Pakistan",
WDH: "Windhoek, Namibia",
MAN: "Manchester, United Kingdom",
CGK: "Jakarta, Indonesia",
NQN: "Neuquen, Argentina",
BNA: "Nashville, United States",
ASK: "Yamoussoukro, Ivory Coast",
EWR: "Newark, United States",
MRS: "Marseille, France",
PTY: "Panama City, Panama",
JSR: "Jashore, Bangladesh",
ABJ: "Abidjan, Ivory Coast",
MXP: "Milan, Italy",
TNA: "Zibo, China",
ORF: "Norfolk, United States",
PBM: "Paramaribo, Suriname",
EBB: "Kampala, Uganda",
OMA: "Omaha, United States",
POA: "Porto Alegre, Brazil",
MSQ: "Minsk, Belarus",
DME: "Moscow, Russia",
JHB: "Johor Bahru, Malaysia",
YOW: "Ottawa, Canada",
UIO: "Quito, Ecuador",
MUC: "Munich, Germany",
PHL: "Philadelphia, United States",
KNU: "Kanpur, India",
PHX: "Phoenix, United States",
LCA: "Nicosia, Cyprus",
KHH: "Kaohsiung City, Taiwan",
REC: "Recife, Brazil",
OSL: "Oslo, Norway",
PIT: "Pittsburgh, United States",
KHI: "Karachi, Pakistan",
RAO: "Ribeirao Preto, Brazil",
GIG: "Rio de Janeiro, Brazil",
PDX: "Portland, United States",
KTM: "Kathmandu, Nepal",
PMO: "Palermo, Italy",
CDG: "Paris, France",
QRO: "Queretaro, Mexico",
PRG: "Prague, Czech Republic",
RIC: "Richmond, United States",
CCU: "Kolkata, India",
SJO: "San José, Costa Rica",
SCL: "Santiago, Chile",
KEF: "Reykjavík, Iceland",
SMF: "Sacramento, United States",
KJA: "Krasnoyarsk, Russia",
KUL: "Kuala Lumpur, Malaysia",
SLC: "Salt Lake City, United States",
RIX: "Riga, Latvia",
SDQ: "Santo Domingo, Dominican Republic",
FCO: "Rome, Italy",
SAN: "San Diego, United States",
LHE: "Lahore, Pakistan",
SJP: "São José do Rio Preto, Brazil",
SJC: "San Jose, United States",
LED: "Saint Petersburg, Russia",
PKX: "Langfang, China",
SJK: "São José dos Campos, Brazil",
GRU: "São Paulo, Brazil",
SOF: "Sofia, Bulgaria",
YXE: "Saskatoon, Canada",
LHW: "Lanzhou, China",
SEA: "Seattle, United States",
ARN: "Stockholm, Sweden",
SOD: "Sorocaba, Brazil",
MFM: "Macau",
FSD: "Sioux Falls, South Dakota",
STR: "Stuttgart, Germany",
STL: "St. Louis, United States",
TLL: "Tallinn, Estonia",
MLE: "Male, Maldives",
TGU: "Tegucigalpa, Honduras",
TLH: "Tallahassee, United States",
TBS: "Tbilisi, Georgia",
MDL: "Mandalay, Myanmar",
NVT: "Timbo, Brazil",
MNL: "Manila, Philippines",
SKG: "Thessaloniki, Greece",
UDI: "Uberlandia, Brazil",
YYZ: "Toronto, Canada",
BOM: "Mumbai, India",
TIA: "Tirana, Albania",
VIX: "Vitoria, Brazil",
YVR: "Vancouver, Canada",
NAG: "Nagpur, India",
KLD: "Tver, Russian Federation",
VIE: "Vienna, Austria",
YWG: "Winnipeg, Canada",
OKA: "Naha, Japan",
CAW: "Campos dos Goytacazes, Brazil",
DEL: "New Delhi, India",
VNO: "Vilnius, Lithuania",
SFO: "San Francisco, United States",
XAP: "Chapeco, Brazil",
WAW: "Warsaw, Poland",
KIX: "Osaka, Japan",
KIN: "Kingston, Jamaica",
BGI: "Bridgetown, Barbados",
SVX: "Yekaterinburg, Russia",
PAT: "Patna, India",
BGR: "Bangor, United States",
GND: "St. George's, Grenada",
ZAG: "Zagreb, Croatia",
PNH: "Phnom Penh, Cambodia",
AUS: "Austin, United States",
STI: "Santiago de los Caballeros, Dominican Republic",
ZRH: "Zürich, Switzerland",
TAO: "Qingdao, China",
ABQ: "Albuquerque, United States",
LPB: "La Paz, Bolivia",
ICN: "Seoul, South Korea",
LYS: "Lyon, France",
GDL: "Guadalajara, Mexico",
SHA: "Shanghai, China",
BOD: "Bordeaux, France",
SAT: "San Antonio, United States",
SJU: "San Juan, Puerto Rico",
SIN: "Singapore",
CLE: "Cleveland, United States",
BAQ: "Barranquilla, Colombia",
SKP: "Skopje, North Macedonia",
URT: "Surat Thani, Thailand",
RDU: "Durham, United States",
PMW: "Palmas, Brazil",
TPE: "Taipei",
OKC: "Oklahoma City, United States",
ARU: "Aracatuba, Brazil",
TAS: "Tashkent, Uzbekistan",
TPA: "Tampa, United States",
POS: "Port of Spain, Trinidad and Tobago",
ANC: "Anchorage, United States",
SSA: "Salvador, Brazil",
TSN: "Tianjin, China",
YHZ: "Halifax, Canada",
NRT: "Tokyo, Japan",
ULN: "Ulaanbaatar, Mongolia",
VTE: "Vientiane, Laos",
KHN: "Nanchang, China",
RGN: "Yangon, Myanmar",
EVN: "Yerevan, Armenia",
JOG: "Yogyakarta, Indonesia",
ZGN: "Zhongshan, China",
CGY: "Cagayan de Oro, Philippines",
WHU: "Wuhu, China",
HYN: "Taizhou, China",
COK: "Kochi, India",
DPS: "Denpasar, Indonesia",
CNN: "Kannur, India",
CLO: "Cali, Colombia",
SZX: "Shenzhen, China",
KWE: "Guiyang, China",
HGH: "Shaoxing, China",
CZX: "Changzhou, China",
KMG: "Kunming, China",
CNX: "Chiang Mai, Thailand",
CGO: "Zhengzhou, China",
TYN: "Yangquan, China",
CSX: "Changsha, China",
DLC: "Dalian, China",
BHY: "Beihai, China",
CKG: "Chongqing, China",
HFE: "Huainan, China",
XFN: "Xiangyang, China",
XNN: "Xining, China",
DAD: "Da Nang, Vietnam",
JXG: "Jiaxing, China",
CRK: "Tarlac City, Philippines",
PBH: "Thimphu, Bhutan",
XIY: "Baoji, China",
CTU: "Chengdu, China",
NQZ: "Astana, Kazakhstan",
NNG: "Nanning, China",
KCH: "Kuching, Malaysia",
AKX: "Aktobe, Kazakhstan",
LOCAL: "LOCAL",
};
try {
const data = await fetchCloudflareTraceData();
const iataPromises = Array.from(elements).map(async (info) => {
const hideIp = info.hasAttribute("data-hide-ip");
const hideLoc = info.hasAttribute("data-hide-loc");
let template = info.getAttribute("data-template");
if (template) {
Object.entries(data).forEach(([key, value]) => {
template = template.replace(new RegExp(`\\$\\{${key}\\}`, "g"), value || "");
});
} else {
template = `[${data.colo}]\${iata}${!hideIp ? ` · ${data.ip}` : ""}${!hideLoc ? ` · ${data.loc}` : ""}`;
}
if (template.includes("${iata}")) {
template = template.replace("${iata}", iataCode[data.colo.substring(0, 3)] || navigator.language.includes("zh") ? "未知" : "Unknown");
}
info.innerHTML = template.trim();
});
await Promise.all(iataPromises);
} catch (error) {
console.error("Unexpected DISPLAY error: ", error);
}
}
document.addEventListener("DOMContentLoaded", display);