aboutsummaryrefslogtreecommitdiffstats
path: root/test/data/include_js.php
blob: ee9c71a5d8cb141198a210b3cf18458de8b243fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(function() {

window.hasPHP = false /* <?php echo "*" . "/ || true /*"; ?> */;

if ( !window.top.jQueryIncludes ) {
	
	window.top.jQueryIncludes = (function() {
	
		var location = window.top.document.location.href,
			baseURL = location.replace( /\/test\/.*/, "/"),
			version = /(?:&|\?)jquery=([^&]+?)(?:$|&)/.exec( location ),
			includes, i;

		if ( version ) {
			version = version[ 1 ];
			if( version === "min" ) {
				includes = [ baseURL + "dist/jquery.min.js" ];
			} else if( version === "dist" ) {
				includes = [ baseURL + "dist/jquery.js" ];
			} else {
				includes = [ "http://code.jquery.com/jquery-" + version + ".js" ];
			}
		} else {
			includes = [
				"core",
				"callbacks",
				"deferred",
				"support",
				"data",
				"queue",
				"attributes",
				"event",
				"sizzle/sizzle",
				"sizzle-jquery",
				"traversing",
				"manipulation",
				"css",
				"ajax",
				"ajax/jsonp",
				"ajax/script",
				"ajax/xhr",
				"effects",
				"offset",
				"dimensions",
				"exports"
			];
			for ( i = includes.length; i--; ) {
				includes[ i ] = baseURL + "src/" + includes[ i ] + ".js";
			}	
		}
		
		for ( i = includes.length; i--; ) {
			includes[ i ] = "<script src='" + includes[ i ] + "'><" + "/script>";
		}

		return includes.join( "\n" );
	})();
}

document.write( window.top.jQueryIncludes );

})();