scratch – Diff between revs 58 and 125
?pathlinks?
Rev 58 | Rev 125 | |||
---|---|---|---|---|
1 | define( [ |
1 | define([ |
|
2 | "../core" |
2 | "../core", |
|
- | 3 | "../var/strundefined" |
||
3 | ], function( jQuery, noGlobal ) { |
4 | ], function( jQuery, strundefined ) { |
|
4 | |
- | ||
5 | "use strict"; |
- | ||
6 | |
5 | |
|
7 | var |
- | ||
8 | |
6 | var |
|
9 | // Map over jQuery in case of overwrite |
7 | // Map over jQuery in case of overwrite |
|
10 | _jQuery = window.jQuery, |
8 | _jQuery = window.jQuery, |
|
11 | |
9 | |
|
12 | // Map over the $ in case of overwrite |
10 | // Map over the $ in case of overwrite |
|
13 | _$ = window.$; |
11 | _$ = window.$; |
|
14 | |
12 | |
|
15 | jQuery.noConflict = function( deep ) { |
13 | jQuery.noConflict = function( deep ) { |
|
16 | if ( window.$ === jQuery ) { |
14 | if ( window.$ === jQuery ) { |
|
17 | window.$ = _$; |
15 | window.$ = _$; |
|
18 | } |
16 | } |
|
19 | |
17 | |
|
20 | if ( deep && window.jQuery === jQuery ) { |
18 | if ( deep && window.jQuery === jQuery ) { |
|
21 | window.jQuery = _jQuery; |
19 | window.jQuery = _jQuery; |
|
22 | } |
20 | } |
|
23 | |
21 | |
|
24 | return jQuery; |
22 | return jQuery; |
|
25 | }; |
23 | }; |
|
26 | |
24 | |
|
27 | // Expose jQuery and $ identifiers, even in AMD |
25 | // Expose jQuery and $ identifiers, even in AMD |
|
28 | // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) |
26 | // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) |
|
29 | // and CommonJS for browser emulators (#13566) |
27 | // and CommonJS for browser emulators (#13566) |
|
30 | if ( !noGlobal ) { |
28 | if ( typeof noGlobal === strundefined ) { |
|
31 | window.jQuery = window.$ = jQuery; |
29 | window.jQuery = window.$ = jQuery; |
|
32 | } |
30 | } |
|
33 | |
31 | |
|
34 | } ); |
32 | }); |
|
35 | |
33 | |