]> source.dussan.org Git - jquery.git/commitdiff
More code style fixes.
authorjaubourg <j@ubourg.net>
Sun, 23 Jan 2011 19:46:09 +0000 (20:46 +0100)
committerjaubourg <j@ubourg.net>
Sun, 23 Jan 2011 19:46:09 +0000 (20:46 +0100)
src/ajax.js
src/ajax/jsonp.js
src/ajax/script.js

index 470e02254d80f1156b9e7bff657a524afded5701..bc3696ee8e5c9e133a28b89fcb0517bd18aa80bf 100644 (file)
@@ -255,7 +255,7 @@ jQuery.extend({
 
                // If options is not an object,
                // we simulate pre-1.5 signature
-               if ( typeof( options ) !== "object" ) {
+               if ( typeof options !== "object" ) {
                        options = url;
                        url = undefined;
                }
@@ -423,7 +423,7 @@ jQuery.extend({
                        statusCode = undefined;
 
                        if ( s.global ) {
-                               globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ) ,
+                               globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
                                                [ jXHR, s, isSuccess ? success : error ] );
                        }
 
@@ -455,7 +455,7 @@ jQuery.extend({
                                        }
                                } else {
                                        tmp = map[ jXHR.status ];
-                                       jXHR.then( tmp , tmp );
+                                       jXHR.then( tmp, tmp );
                                }
                        }
                        return this;
@@ -702,7 +702,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, dat
                        selected = list[ i ]( options, originalOptions );
                        // If we got redirected to a different dataType,
                        // we add it and switch to the corresponding list
-                       if ( typeof( selected ) === "string" && selected !== dataType ) {
+                       if ( typeof selected === "string" && selected !== dataType ) {
                                options.dataTypes.unshift( selected );
                                selected = inspectPrefiltersOrTransports(
                                                structure, options, originalOptions, selected, tested );
@@ -757,7 +757,7 @@ function prefiltersOrTransports( structure, arg1, arg2, type /* internal */ ) {
                return inspectPrefiltersOrTransports( structure, arg1, arg2 );
        } else {
                // We're requested to add to the structure
-               // Signature is ( dataTypeExpression , function )
+               // Signature is ( dataTypeExpression, function )
                // with dataTypeExpression being optional and
                // defaulting to auto ("*")
                type = ( type === "function" );
@@ -818,11 +818,11 @@ function ajaxHandleResponses( s, jXHR, responses ) {
        } else {
                // Try convertible dataTypes
                for ( type in responses ) {
-                       if ( ! dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+                       if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
                                finalDataType = type;
                                break;
                        }
-                       if ( ! firstDataType ) {
+                       if ( !firstDataType ) {
                                firstDataType = type;
                        }
                }
index 0588475b62a339aa44e72500cf72b167cca5adf5..f5742d998bd6bb6069c28a815214abaa255b27bc 100644 (file)
@@ -12,10 +12,9 @@ jQuery.ajaxSetup({
 });
 
 // Detect, normalize options and install callbacks for jsonp requests
-// (dataIsString is used internally)
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString ) {
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString /* internal */ ) {
 
-       dataIsString = ( typeof( s.data ) === "string" );
+       dataIsString = ( typeof s.data === "string" );
 
        if ( s.dataTypes[ 0 ] === "jsonp" ||
                originalSettings.jsonpCallback ||
index 37bd85b563b53bd9463abf3da96f346deacd5837..dfee86712fde9eae00a27bcda5e3ab9746ec59aa 100644 (file)
@@ -14,7 +14,7 @@ jQuery.ajaxSetup({
 });
 
 // Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function(s) {
+jQuery.ajaxPrefilter( "script", function( s ) {
        if ( s.cache === undefined ) {
                s.cache = false;
        }