-
Notifications
You must be signed in to change notification settings - Fork 78
/
linux-redirect.html
103 lines (92 loc) · 3.41 KB
/
linux-redirect.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
<html>
<head>
<title>网页里的电脑博物馆</title>
<meta name="description" content="云端的计算机博物馆,在网页模拟器中重现电脑发展史">
<meta name="keywords" content="电脑, 计算机, 博物馆, 网页, 浏览器, 模拟器, 游戏, 历史">
<link rel="stylesheet" href="https://lib.baomitu.com/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="base.css" />
<script src="https://lib.baomitu.com/jquery/3.3.1/jquery.min.js"></script>
<script src="baidu-stat.js"></script>
<meta charset="UTF-8">
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' />
</head>
<body>
<nav style="position: relative; z-index: 2; width:100%">
<ul>
<li>
<a href="index.html">目录</a>
</li>
<li>
<a href="http://www.famicn.com">游戏机</a>
</li>
<li>
<a href="https://pengan1987.github.io/">专栏</a>
</li>
<li>
<a href="https://github.com/pengan1987/computer-museum-dnbwg">Github</a>
</li>
<li>
<a href="labs.html">实验室</a>
</li>
<li>
<a href="special.html">专题展览</a>
</li>
</ul>
</nav>
<div class="feature-wrapper pt-5 pb-5 mt-0 mt-lg-0">
<div class="container">
<div class="row" id="machine-list">
<div id="base-cell" class="col-sm-12 col-md-12">
<h2>千禧年的中文Linux - 准备服务</h2>
<p>
虚拟机正在启动,请稍等1~10秒钟准备时间……
</p>
<p id="error-notice" style="display:none">虚拟机启动失败,请稍刷新本页或后再试。</a></p>
<p id="ready-notice" style="display:none">您的虚拟机已经准备好,<a id="ready-link" target="_self" href="#">点击这里</a>启动远程桌面
</p>
</div>
</div>
</div>
</div>
<div style="display: none;">
<img src="title.png">
</div>
<script>
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
var vmlinks = {
happylinux: 'happylinux-linux-fkwnbqqncr.cn-hangzhou.fcapp.run',
cle: 'cle-linux-wfxckrrpci.cn-hangzhou.fcapp.run',
bluepoint: 'bluepoint-linux-hmgtpswazh.cn-hangzhou.fcapp.run',
xteam: 'xteam-linux-zrgrflrccm.cn-hangzhou.fcapp.run',
redflag: 'redflag-linux-svfodavexv.cn-hangzhou.fcapp.run',
turbolinux: 'turbolinux-linux-riexbqqncn.cn-hangzhou.fcapp.run'
}
var vmname = getParameterByName('vm');
var vmlink = vmlinks[vmname];
if (vmlink) {
var vncLink = `/novnc/vnc.html?host=${vmlink}&encrypt=1&path=&port=443&autoconnect=1`;
var vncVerify = `//${vmlink}/ready.json`;
$.ajaxSetup({ cache: false });
var jqxhr = $.ajax(vncVerify)
.done(function () {
$("#ready-link").attr("href", vncLink);
$("#ready-notice").show();
})
.fail(function () {
$("#error-notice").show();
});
} else {
$("#error-notice").show();
}
</script>
</body>
</html>