Skip to content

Commit

Permalink
More variable renaming to avoid conflicts when module closures are re…
Browse files Browse the repository at this point in the history
…moved.
  • Loading branch information
jaubourg committed Dec 11, 2010
1 parent 9fa9a57 commit 2e12975
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/transports/jsonp.js
Expand Up @@ -2,7 +2,7 @@

var jsc = jQuery.now(),
jsre = /\=\?(&|$)/,
rquerymark = /\?/;
rquery_jsonp = /\?/;

// Default jsonp callback name
jQuery.ajaxSettings.jsonpCallback = function() {
Expand All @@ -29,7 +29,7 @@ jQuery.xhr.prefilter( function(s) {
data = s.url == url && typeof(s.data) === "string" ? s.data.replace(jsre, "=" + jsonpCallback + "$1") : s.data;

if ( url == s.url && data == s.data ) {
url = url += (rquerymark.test( url ) ? "&" : "?") + jsonp + "=" + jsonpCallback;
url = url += (rquery_jsonp.test( url ) ? "&" : "?") + jsonp + "=" + jsonpCallback;
}

s.url = url;
Expand Down
6 changes: 3 additions & 3 deletions src/xhr.js
@@ -1,6 +1,6 @@
(function( jQuery ) {

var rquery = /\?/,
var rquery_xhr = /\?/,
rhash = /#.*$/,
rheaders = /^(.*?):\s*(.*?)\r?$/mg, // IE leaves an \r character at EOL
rnoContent = /^(?:GET|HEAD)$/,
Expand Down Expand Up @@ -109,7 +109,7 @@ jQuery.xhr = function( _native ) {

// If data is available, append data to url
if ( data ) {
url += (rquery.test(url) ? "&" : "?") + data;
url += (rquery_xhr.test(url) ? "&" : "?") + data;
}

// Add anti-cache in url if needed
Expand All @@ -120,7 +120,7 @@ jQuery.xhr = function( _native ) {
ret = url.replace(rts, "$1_=" + ts );

// if nothing was replaced, add timestamp to the end
url = ret + ((ret == url) ? (rquery.test(url) ? "&" : "?") + "_=" + ts : "");
url = ret + ((ret == url) ? (rquery_xhr.test(url) ? "&" : "?") + "_=" + ts : "");
}

s.url = url;
Expand Down

0 comments on commit 2e12975

Please sign in to comment.