Skip to content

Commit

Permalink
Cleaner script tags with document.write
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed May 22, 2012
1 parent c864e93 commit 1ba9060
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2 id="qunit-userAgent"></h2>
<script> <script>
// Load jshint if being used (can cause failurs in old environments if always loaded) // Load jshint if being used (can cause failurs in old environments if always loaded)
if (jsHint) { if (jsHint) {
document.write(unescape('%3Cscript src="jshint.js"%3E%3C/script%3E')); document.write('<script src="jshint.js"><\/script>');
} }
// Close the script tag to make sure document.write happens // Close the script tag to make sure document.write happens
</script> </script>
Expand All @@ -73,7 +73,7 @@ <h2 id="qunit-userAgent"></h2>
// Load custom version of jQuery if possible // Load custom version of jQuery if possible
var jQueryVersion = QUnit.urlParams.jquery || "1.7.2"; var jQueryVersion = QUnit.urlParams.jquery || "1.7.2";
if (jQueryVersion !== 'none') { if (jQueryVersion !== 'none') {
document.write(unescape('%3Cscript src="http://code.jquery.com/jquery-'+jQueryVersion+'.js"%3E%3C/script%3E')); document.write('<script src="http://code.jquery.com/jquery-'+jQueryVersion+'.js"><\/script>');
} }
// Close the script tag to make sure document.write happens // Close the script tag to make sure document.write happens
</script> </script>
Expand All @@ -82,7 +82,7 @@ <h2 id="qunit-userAgent"></h2>
// Fallback to default jQuery // Fallback to default jQuery
if (jQueryVersion !== 'none' && !window.jQuery) { if (jQueryVersion !== 'none' && !window.jQuery) {
if (console && console.warn) { console.warn("Unable to load jQuery "+jQueryVersion+". Using default."); } if (console && console.warn) { console.warn("Unable to load jQuery "+jQueryVersion+". Using default."); }
document.write(unescape('%3Cscript src="../lib/jquery-1.7.2.js"%3E%3C/script%3E')); document.write('<script src="../lib/jquery-1.7.2.js"><\/script>');
} }
// Close the script tag to make sure document.write happens // Close the script tag to make sure document.write happens
</script> </script>
Expand All @@ -102,7 +102,7 @@ <h2 id="qunit-userAgent"></h2>
var emberFile = distros[dist]; var emberFile = distros[dist];
if (!emberFile) { throw 'Unknown dist'; } if (!emberFile) { throw 'Unknown dist'; }


document.write(unescape('%3Cscript src="../dist/'+emberFile+'"%3E%3C/script%3E')); document.write('<script src="../dist/'+emberFile+'"><\/script>');
// Close the script tag to make sure document.write happens // Close the script tag to make sure document.write happens
</script> </script>


Expand Down

0 comments on commit 1ba9060

Please sign in to comment.