@@ 9111-9142 (lines=32) @@ | ||
9108 | ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; |
|
9109 | ||
9110 | // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport |
|
9111 | function addToPrefiltersOrTransports( structure ) { |
|
9112 | ||
9113 | // dataTypeExpression is optional and defaults to "*" |
|
9114 | return function( dataTypeExpression, func ) { |
|
9115 | ||
9116 | if ( typeof dataTypeExpression !== "string" ) { |
|
9117 | func = dataTypeExpression; |
|
9118 | dataTypeExpression = "*"; |
|
9119 | } |
|
9120 | ||
9121 | var dataType, |
|
9122 | i = 0, |
|
9123 | dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; |
|
9124 | ||
9125 | if ( jQuery.isFunction( func ) ) { |
|
9126 | ||
9127 | // For each dataType in the dataTypeExpression |
|
9128 | while ( ( dataType = dataTypes[ i++ ] ) ) { |
|
9129 | ||
9130 | // Prepend if requested |
|
9131 | if ( dataType.charAt( 0 ) === "+" ) { |
|
9132 | dataType = dataType.slice( 1 ) || "*"; |
|
9133 | ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); |
|
9134 | ||
9135 | // Otherwise append |
|
9136 | } else { |
|
9137 | ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); |
|
9138 | } |
|
9139 | } |
|
9140 | } |
|
9141 | }; |
|
9142 | } |
|
9143 | ||
9144 | // Base inspection function for prefilters and transports |
|
9145 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { |
@@ 8025-8056 (lines=32) @@ | ||
8022 | originAnchor.href = location.href; |
|
8023 | ||
8024 | // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport |
|
8025 | function addToPrefiltersOrTransports( structure ) { |
|
8026 | ||
8027 | // dataTypeExpression is optional and defaults to "*" |
|
8028 | return function( dataTypeExpression, func ) { |
|
8029 | ||
8030 | if ( typeof dataTypeExpression !== "string" ) { |
|
8031 | func = dataTypeExpression; |
|
8032 | dataTypeExpression = "*"; |
|
8033 | } |
|
8034 | ||
8035 | var dataType, |
|
8036 | i = 0, |
|
8037 | dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; |
|
8038 | ||
8039 | if ( jQuery.isFunction( func ) ) { |
|
8040 | ||
8041 | // For each dataType in the dataTypeExpression |
|
8042 | while ( ( dataType = dataTypes[ i++ ] ) ) { |
|
8043 | ||
8044 | // Prepend if requested |
|
8045 | if ( dataType[ 0 ] === "+" ) { |
|
8046 | dataType = dataType.slice( 1 ) || "*"; |
|
8047 | ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); |
|
8048 | ||
8049 | // Otherwise append |
|
8050 | } else { |
|
8051 | ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); |
|
8052 | } |
|
8053 | } |
|
8054 | } |
|
8055 | }; |
|
8056 | } |
|
8057 | ||
8058 | // Base inspection function for prefilters and transports |
|
8059 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { |
@@ 7573-7602 (lines=30) @@ | ||
7570 | ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; |
|
7571 | ||
7572 | // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport |
|
7573 | function addToPrefiltersOrTransports( structure ) { |
|
7574 | ||
7575 | // dataTypeExpression is optional and defaults to "*" |
|
7576 | return function( dataTypeExpression, func ) { |
|
7577 | ||
7578 | if ( typeof dataTypeExpression !== "string" ) { |
|
7579 | func = dataTypeExpression; |
|
7580 | dataTypeExpression = "*"; |
|
7581 | } |
|
7582 | ||
7583 | var dataType, |
|
7584 | i = 0, |
|
7585 | dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; |
|
7586 | ||
7587 | if ( jQuery.isFunction( func ) ) { |
|
7588 | // For each dataType in the dataTypeExpression |
|
7589 | while ( (dataType = dataTypes[i++]) ) { |
|
7590 | // Prepend if requested |
|
7591 | if ( dataType[0] === "+" ) { |
|
7592 | dataType = dataType.slice( 1 ) || "*"; |
|
7593 | (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); |
|
7594 | ||
7595 | // Otherwise append |
|
7596 | } else { |
|
7597 | (structure[ dataType ] = structure[ dataType ] || []).push( func ); |
|
7598 | } |
|
7599 | } |
|
7600 | } |
|
7601 | }; |
|
7602 | } |
|
7603 | ||
7604 | // Base inspection function for prefilters and transports |
|
7605 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { |