Commit 8641c3de 8641c3dee833cda80b15cf52859e1e5bed280ed2 by Jason Funk

Fix indentation and coding standard issues

1 parent 3f46bea9
......@@ -244,27 +244,22 @@
this.getBinary = function(url, method, data) {
try {
var xhr = new XMLHttpRequest();
if(method === undefined || ["GET","get","POST","post"].indexOf(method) == -1)
{
if (method === undefined || ["GET","get","POST","post"].indexOf(method) == -1) {
method = "GET";
}else{
} else {
method = method.toUpperCase();
}
xhr.open(method, url, false);
this.log("Using HTTP method: '" + method + "'", "debug");
this.log("using HTTP method: '" + method + "'", "debug");
xhr.overrideMimeType("text/plain; charset=x-user-defined");
if(method == "POST")
{
if(data === undefined)
{
if (method == "POST") {
if(data === undefined) {
data_str = "";
}else{
} else {
data_str = "";
for(k in data)
{
if(typeof(k) == "string" && typeof(data[k]) == "string")
{
for (k in data) {
if (typeof(k) == "string" && typeof(data[k]) == "string") {
data_str += "&" + escape(k) + "=" + escape(data[k]);
}
}
......@@ -272,7 +267,7 @@
}
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
}
this.log("Using request data: '" + data_str + "'", "debug");
this.log("using request data: '" + data_str + "'", "debug");
xhr.send(method == "POST" ? data_str : null);
return xhr.responseText;
} catch (e) {
......