This repository has been archived by the owner on Feb 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
/
api.html
52 lines (48 loc) · 2.23 KB
/
api.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
<!DOCTYPE html>
<html>
<head>
<title>Ragnarok Online in the Browser powered by roBrowser</title>
<script type="text/javascript">
var ROConfig = {};
addEventListener('message', function()
{
return function OnMessage( event )
{
removeEventListener( 'message', OnMessage, false );
ROConfig.grfList = event.data.grfList || null;
ROConfig.servers = event.data.servers || 'data/clientinfo.xml';
ROConfig.remoteClient = event.data.remoteClient || '';
ROConfig.packetver = event.data.packetver || 'auto';
ROConfig.charBlockSize = event.data.charBlockSize || 0;
ROConfig.clientHash = event.data.clientHash || null;
ROConfig.development = event.data.development || false;
ROConfig.API = event.data.api || false;
ROConfig.socketProxy = event.data.socketProxy || null;
ROConfig.packetKeys = event.data.packetKeys || false;
ROConfig.saveFiles = event.data.saveFiles || false;
ROConfig.skipServerList = event.data.skipServerList || false;
ROConfig.skipIntro = event.data.skipIntro || false;
ROConfig.autoLogin = event.data.autoLogin || [];
ROConfig.version = event.data.version || '';
ROConfig.BGMFileExtension = event.data.BGMFileExtension || ['mp3'];
ROConfig.plugins = event.data.plugins || {};
if (ROConfig.development) {
var script = document.createElement('script');
script.src = 'src/Vendors/require.js?' + ROConfig.version;
script.type = 'text/javascript';
script.setAttribute('data-main', 'src/App/' + event.data.application + '.js?' + ROConfig.version);
document.getElementsByTagName('head')[0].appendChild(script);
event.source.postMessage('ready', '*' );
}
else {
var app = document.createElement('script');
app.type = 'text/javascript';
app.src = event.data.application + '.js?' + ROConfig.version;
document.getElementsByTagName('head')[0].appendChild(app);
event.source.postMessage('ready', '*' );
}
};
}(), false);
</script>
</head>
</html>