mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
e69e81b9f5
sequence we're on when handling input_ globals. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6061 fc73d0e0-1445-4013-8a0c-d673dee63da5
25 lines
916 B
JavaScript
25 lines
916 B
JavaScript
{
|
|
if (!Module["arguments"])
|
|
Module['arguments'] = ['-nohome'];
|
|
|
|
if (typeof man == "undefined")
|
|
var man = window.location.protocol + "//" + window.location.host + window.location.pathname + ".fmf";
|
|
|
|
if (window.location.hash != "")
|
|
man = window.location.hash.substring(1);
|
|
|
|
Module['arguments'] = Module['arguments'].concat(['-manifest', man]);
|
|
|
|
// use query string in URL as command line
|
|
qstring = decodeURIComponent(window.location.search.substring(1)).split(" ");
|
|
for (var i = 0; i < qstring.length; i++)
|
|
{
|
|
if ((qstring[i] == '+sv_port_rtc' || qstring[i] == '+connect' || qstring[i] == '+join' || qstring[i] == '+observe' || qstring[i] == '+qtvplay') && i+1 < qstring.length)
|
|
{
|
|
Module['arguments'] = Module['arguments'].concat(qstring[i+0], qstring[i+1]);
|
|
i++;
|
|
}
|
|
else if (!document.referrer)
|
|
Module['arguments'] = Module['arguments'].concat(qstring[i]);
|
|
}
|
|
}
|