function connect()
{
+ var url = window.location.toString();
+ var query_string = url.split("?");
+ if (query_string.length > 1) {
+ var params = query_string[1].split("&");
+ if (params[0].indexOf("toplevel") != -1)
+ useToplevelWindows = true;
+ }
var xhr = createXHR();
if (xhr) {
if (typeof xhr.multipart == 'undefined') {
static void
got_request (HttpRequest *request)
{
- char *start, *escaped, *tmp, *version;
+ char *start, *escaped, *tmp, *version, *query;
if (!g_str_has_prefix (request->request->str, "GET "))
{
version = g_strndup (start, tmp - start);
}
+ query = strchr (escaped, '?');
+ if (query)
+ *query = 0;
+
if (strcmp (escaped, "/client.html") == 0 || strcmp (escaped, "/") == 0)
send_data (request, "text/html", client_html, G_N_ELEMENTS(client_html) - 1);
else if (strcmp (escaped, "/broadway.js") == 0)