git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Gets rid of a var statement by moving variable declarations up.
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
968c67c
..
a2b934d
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-274,6
+274,9
@@
jQuery.extend({
transport,
// timeout handle
timeoutTimer,
transport,
// timeout handle
timeoutTimer,
+ // Cross-domain detection vars
+ loc = document.location,
+ parts,
// The jXHR state
state = 0,
// Loop variable
// The jXHR state
state = 0,
// Loop variable
@@
-527,10
+530,8
@@
jQuery.extend({
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( /\s+/ );
// Determine if a cross-domain request is in order
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( /\s+/ );
// Determine if a cross-domain request is in order
- var parts = rurl.exec( s.url.toLowerCase() ),
- loc = location;
-
if ( ! s.crossDomain ) {
if ( ! s.crossDomain ) {
+ parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!(
parts &&
( parts[ 1 ] && parts[ 1 ] != loc.protocol ||
s.crossDomain = !!(
parts &&
( parts[ 1 ] && parts[ 1 ] != loc.protocol ||