Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
2e129759
Commit
2e129759
authored
Dec 11, 2010
by
jaubourg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More variable renaming to avoid conflicts when module closures are removed.
parent
9fa9a570
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
jsonp.js
src/transports/jsonp.js
+2
-2
xhr.js
src/xhr.js
+3
-3
No files found.
src/transports/jsonp.js
View file @
2e129759
...
...
@@ -2,7 +2,7 @@
var
jsc
=
jQuery
.
now
(),
jsre
=
/
\=\?(
&|$
)
/
,
rquery
mark
=
/
\?
/
;
rquery
_jsonp
=
/
\?
/
;
// Default jsonp callback name
jQuery
.
ajaxSettings
.
jsonpCallback
=
function
()
{
...
...
@@ -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
+=
(
rquery
mark
.
test
(
url
)
?
"&"
:
"?"
)
+
jsonp
+
"="
+
jsonpCallback
;
url
=
url
+=
(
rquery
_jsonp
.
test
(
url
)
?
"&"
:
"?"
)
+
jsonp
+
"="
+
jsonpCallback
;
}
s
.
url
=
url
;
...
...
src/xhr.js
View file @
2e129759
(
function
(
jQuery
)
{
var
rquery
=
/
\?
/
,
var
rquery
_xhr
=
/
\?
/
,
rhash
=
/#.*$/
,
rheaders
=
/^
(
.*
?)
:
\s
*
(
.*
?)\r?
$/mg
,
// IE leaves an \r character at EOL
rnoContent
=
/^
(?:
GET|HEAD
)
$/
,
...
...
@@ -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
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment