Commit a088751a authored by unknown's avatar unknown

Removing the second capture group. After the changes suggested by Jeff...

Removing the second capture group. After the changes suggested by Jeff Roberson, the second capture group is no longer needed. See
http://stackoverflow.com/questions/3771105/can-someone-tell-me-the-purpose-of-the-second-capture-group-in-the-jquery-rts-reg
parent 5c055040
...@@ -7,7 +7,7 @@ var jsc = jQuery.now(), ...@@ -7,7 +7,7 @@ var jsc = jQuery.now(),
rbracket = /\[\]$/, rbracket = /\[\]$/,
jsre = /\=\?(&|$)/, jsre = /\=\?(&|$)/,
rquery = /\?/, rquery = /\?/,
rts = /([?&])_=[^&]*(&?)/, rts = /([?&])_=[^&]*/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/, rurl = /^(\w+:)?\/\/([^\/?#]+)/,
r20 = /%20/g, r20 = /%20/g,
rhash = /#.*$/, rhash = /#.*$/,
...@@ -275,7 +275,7 @@ jQuery.extend({ ...@@ -275,7 +275,7 @@ jQuery.extend({
var ts = jQuery.now(); var ts = jQuery.now();
// try replacing _= if it is there // try replacing _= if it is there
var ret = s.url.replace(rts, "$1_=" + ts + "$2"); var ret = s.url.replace(rts, "$1_=" + ts);
// if nothing was replaced, add timestamp to the end // if nothing was replaced, add timestamp to the end
s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : ""); s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment