forked from LiXizhi/ParaCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloadworld.html
73 lines (69 loc) · 2.48 KB
/
loadworld.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>redirect to paracraft world</title>
</head>
<script>
function getRequests() {
var s1 = location.search.substring(1, location.search.length).split('&'),
r = {}, s2, i;
for (i = 0; i < s1.length; i += 1) {
s2 = s1[i].split('=');
r[decodeURIComponent(s2[0]).toLowerCase()] = decodeURIComponent(s2[1]);
}
return r;
};
function LoadWorld(){
var QueryString = getRequests();
if(QueryString["world"]){
var url = "paracraft://cmd/loadworld " + QueryString["world"];
document.getElementById('myframe').src = url;
document.getElementById('url').innerHTML = url;
}
}
</script>
<body onload="LoadWorld()">
<h3>Load World with Paracraft</h3>
<div id="url"></div>
<p>
<iframe id="myframe" width="800px" height="300px">
loadworld.html?world=111.zip
</iframe>
</p>
<div style="clear:both"></div>
<div style="float:left;min-width:380px;padding:5px;margin:5px;border :2px solid black;">
<b>中文: 如果世界没有自动加载</b>
<p>
请点击<a href="http://www.paracraft.cn/">这里</a>下载并安装paracraft客户端.
</p>
<b>手工激活paracraft网络协议</b>
<p>
在paracraft中输入命令: <b>/registerurlprotocol</b>
</p>
</div>
<div style="float:left;min-width:380px;padding:5px;margin:5px;border :2px solid black;">
<b>English: If world does not load automatically</b>
<p>
please click <a href="http://www.paracraft.cn/">here</a> to download and install the software.
</p>
<b>manually activate paracraft network protocol </b>
<p>
In paracraft, enter command: <b>/registerurlprotocol</b>
</p>
</div>
<div style="clear:both"></div>
<h3>Usage</h3>
<p>
loadworld.html?world=[world_filename.zip]
</p>
<h3>Examples</h3>
<p>
<a href="?world=https://github.com/LiXizhi/HourOfCode/archive/master.zip">loadworld.html?world=https://github.com/LiXizhi/HourOfCode/archive/master.zip</a>
</p>
<h3>View Source Code</h3>
<p>
<a href="https://github.com/LiXizhi/ParaCraft/blob/gh-pages/loadworld.html">source code</a>
</p>
</body>
</html>