remove evil whitespaces
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 13 Jan 2007 21:33:35 +0000 (21:33 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 13 Jan 2007 21:33:35 +0000 (21:33 +0000)
skins/common/ajax.js

index 4006559..d90bea0 100644 (file)
@@ -10,30 +10,30 @@ var sajax_request_type = "GET";
 */
 function sajax_debug(text) {
        if (!sajax_debug_mode) return false;
-       
+
        var e= document.getElementById('sajax_debug');
-       
+
        if (!e) {
                e= document.createElement("p");
                e.className= 'sajax_debug';
                e.id= 'sajax_debug';
-               
+
                var b= document.getElementsByTagName("body")[0];
-               
+
                if (b.firstChild) b.insertBefore(e, b.firstChild);
                else b.appendChild(e);
        }
-       
+
        var m= document.createElement("div");
        m.appendChild( document.createTextNode( text ) );
-       
+
        e.appendChild( m );
-       
+
        return true;
 }
 
 /**
-* compatibility wrapper for creating a new XMLHttpRequest object. 
+* compatibility wrapper for creating a new XMLHttpRequest object.
 */
 function sajax_init_object() {
        sajax_debug("sajax_init_object() called..")
@@ -51,7 +51,7 @@ function sajax_init_object() {
                A = new XMLHttpRequest();
        if (!A)
                sajax_debug("Could not create connection object.");
-       
+
        return A;
 }
 
@@ -95,7 +95,7 @@ function sajax_do_call(func_name, args, target) {
                alert("AJAX not supported");
                return false;
        }
-       
+
        try {
                x.open(sajax_request_type, uri, true);
        } catch (e) {
@@ -113,13 +113,13 @@ function sajax_do_call(func_name, args, target) {
        x.onreadystatechange = function() {
                if (x.readyState != 4)
                        return;
-                       
+
                sajax_debug("received (" + x.status + " " + x.statusText + ") " + x.responseText);
-               
+
                //if (x.status != 200)
                //      alert("Error: " + x.status + " " + x.statusText + ": " + x.responseText);
                //else
-               
+
                if ( typeof( target ) == 'function' ) {
                        target( x );
                }
@@ -136,14 +136,14 @@ function sajax_do_call(func_name, args, target) {
                else {
                        alert("bad target for sajax_do_call: not a function or object: " + target);
                }
-               
+
                return;
        }
-       
+
        sajax_debug(func_name + " uri = " + uri + " / post = " + post_data);
        x.send(post_data);
        sajax_debug(func_name + " waiting..");
        delete x;
-       
+
        return true;
 }