]> source.dussan.org Git - jquery.git/commitdiff
Rough draft of version=min test capabilities reintroduced.
authorRick Waldron <waldron.rick@gmail.com>
Wed, 6 Jun 2012 21:39:23 +0000 (17:39 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Wed, 6 Jun 2012 21:39:23 +0000 (17:39 -0400)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
test/index.html

index b0aae40bfce80d9750347cd7c42c7b3b65198410..3de1565fe7cc48600d28da4b3ac6c848c6b59ec0 100644 (file)
@@ -8,7 +8,27 @@
        <!-- Includes -->
 
        <script src="data/testinit.js"></script>
-       <script src="../dist/jquery.js"></script>
+
+       <script>
+               var set, keyvals, params,
+                               version = "";
+
+               if ( location.search ) {
+                       keyvals = location.search.slice(1).split("&"),
+                       params = {};
+
+                       while ( keyvals.length ) {
+                               set = keyvals.shift().split("=");
+                               params[ set[0] ] = set[1];
+                       }
+                       if ( params.version && params.version === "min" ) {
+                               version = params.version + ".";
+                       }
+               }
+               document.write(
+                       "<script src='../dist/jquery." + version + "js'><\/script>"
+               );
+       </script>
 
        <script src="qunit/qunit/qunit.js"></script>
        <script src="data/testrunner.js"></script>