Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Make QUnit work with TestSwarm
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 30 Sep 2011 20:39:49 +0000 (16:39 -0400)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 30 Sep 2011 20:39:49 +0000 (16:39 -0400)
test/index.html
test/swarminject.js [new file with mode: 0755]

index 64ccfcc..db35cb0 100644 (file)
@@ -7,6 +7,8 @@
        <script type="text/javascript" src="../qunit/qunit.js"></script>
        <script type="text/javascript" src="test.js"></script>
        <script type="text/javascript" src="same.js"></script>
+
+       <script src="swarminject.js"></script>
 </head>
 <body>
        <h1 id="qunit-header">QUnit Test Suite</h1>
diff --git a/test/swarminject.js b/test/swarminject.js
new file mode 100755 (executable)
index 0000000..db69326
--- /dev/null
@@ -0,0 +1,9 @@
+// load testswarm agent
+(function() {
+    var url = window.location.search;
+       url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
+       if ( !url || url.indexOf("http") !== 0 ) {
+               return;
+       }
+    document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
+})();

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf