Permalink
Browse files

using qunit params

  • Loading branch information...
1 parent cacbac7 commit 20819c0737a098fec0eb6d9cf3f2ee3994cbf1dc Brett Wejrowski committed Nov 10, 2011
Showing with 11 additions and 12 deletions.
  1. +3 −4 test/jquery.html
  2. +4 −4 test/mootools.html
  3. +4 −4 test/prototype.html
View
@@ -11,10 +11,9 @@
<!-- Your project file goes here -->
<script>/*<![CDATA[*/
- if( window.location.hash != "" && window.location.hash.substr(1) != "" ){
- var rev = window.location.hash.substr(1);
- document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ rev +'/simpleCart.js"><\/script>');
- document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ rev +'/test/test.core.js"><\/script>');
+ if( QUnit.urlParams.commit ){
+ document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ QUnit.urlParams.commit +'/simpleCart.js"><\/script>');
+ document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ QUnit.urlParams.commit +'/test/test.core.js"><\/script>');
} else {
document.write('<script src="../simpleCart.js"><\/script>');
document.write('<script type="text/javascript" src="test.core.js"><\/script>');
View
@@ -9,11 +9,11 @@
<script>/*<![CDATA[*/!window.QUnit && document.write('<script src="inc/qunit.js"><\/script>')/*]]>*/</script>
+ <!-- Your project file goes here -->
<script>/*<![CDATA[*/
- if( window.location.hash != "" && window.location.hash.substr(1) != "" ){
- var rev = window.location.hash.substr(1);
- document.write('<script src="https://raw.github.com/wojodesign/simplecart-js/'+ rev +'/simpleCart.js"><\/script>');
- document.write('<script src="https://raw.github.com/wojodesign/simplecart-js/'+ rev +'/test/test.core.js"><\/script>');
+ if( QUnit.urlParams.commit ){
+ document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ QUnit.urlParams.commit +'/simpleCart.js"><\/script>');
+ document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ QUnit.urlParams.commit +'/test/test.core.js"><\/script>');
} else {
document.write('<script src="../simpleCart.js"><\/script>');
document.write('<script type="text/javascript" src="test.core.js"><\/script>');
View
@@ -9,11 +9,11 @@
<script>/*<![CDATA[*/!window.QUnit && document.write('<script src="inc/qunit.js"><\/script>')/*]]>*/</script>
+ <!-- Your project file goes here -->
<script>/*<![CDATA[*/
- if( window.location.hash != "" && window.location.hash.substr(1) != "" ){
- var rev = window.location.hash.substr(1);
- document.write('<script src="https://raw.github.com/wojodesign/simplecart-js/'+ rev +'/simpleCart.js"><\/script>');
- document.write('<script src="https://raw.github.com/wojodesign/simplecart-js/'+ rev +'/test/test.core.js"><\/script>');
+ if( QUnit.urlParams.commit ){
+ document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ QUnit.urlParams.commit +'/simpleCart.js"><\/script>');
+ document.write('<script src="http://raw.github.com/wojodesign/simplecart-js/'+ QUnit.urlParams.commit +'/test/test.core.js"><\/script>');
} else {
document.write('<script src="../simpleCart.js"><\/script>');
document.write('<script type="text/javascript" src="test.core.js"><\/script>');

0 comments on commit 20819c0

Please sign in to comment.