forked from MrAntares/roBrowserLegacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.html
77 lines (71 loc) · 3.92 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
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
<!DOCTYPE html>
<html>
<head>
<title>roBrowser</title>
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="HandheldFriendly" content="true" />
<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.calculateHash = event.data.calculateHash || false;
ROConfig.hashFiles = event.data.hashFiles || [];
ROConfig.loadLua = event.data.loadLua || false;
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.enableCashShop = event.data.enableCashShop || false;
ROConfig.clientVersionMode = event.data.clientVersionMode || 'PacketVer';
ROConfig.enableBank = event.data.enableBank || false;
ROConfig.enableMapName = event.data.enableMapName || false;
ROConfig.enableRefineUI = event.data.enableRefineUI || false;
ROConfig.enableDmgSuffix = event.data.enableDmgSuffix || false;
ROConfig.version = event.data.version || '';
ROConfig.registrationweb = event.data.registrationweb || '';
ROConfig.worldMapSettings = event.data.worldMapSettings || { episode: 98, add: [], remove: [] };
ROConfig.BGMFileExtension = event.data.BGMFileExtension || ['mp3'];
ROConfig.plugins = event.data.plugins || {};
ROConfig.ThirdPersonCamera = event.data.ThirdPersonCamera || false;
ROConfig.FirstPersonCamera = event.data.FirstPersonCamera || false;
ROConfig.CameraMaxZoomOut = event.data.CameraMaxZoomOut || 5;
ROConfig.packetDump = event.data.packetDump || false;
ROConfig.application = event.data.application || 1;
ROConfig.enableCheckAttendance = event.data.enableCheckAttendance || false;
ROConfig.forceUseAddress = event.data.forceUseAddress || false;
ROConfig.enableConsole = event.data.enableConsole || false;
ROConfig.disableConsole = event.data.disableConsole || false;
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>