unit-js.html 910 B

1234567891011121314151617181920212223
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Haxe Tests (JS)</title>
  6. <meta name="description" content="">
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. </head>
  9. <body id="haxe:trace">
  10. <script type="text/javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
  11. <script type="text/javascript">
  12. // http://stackoverflow.com/questions/11582512/how-to-get-url-parameters-with-javascript
  13. function getURLParameter(name) {
  14. return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
  15. }
  16. var js = getURLParameter("js") || "bin/unit.js";
  17. $.getScript(js, function() {
  18. unit.Test.main();
  19. });
  20. </script>
  21. </body>
  22. </html>