Mercurial > hg > webaudioevaluationtool
comparison index.html @ 761:af6cfa619c24
Browser GET support. In the project URL, you can select the test page to load by using http://server.com/index.html?url=server/path/to/project.xml
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Thu, 17 Dec 2015 16:48:08 +0000 |
parents | c73996a0fb21 |
children | 43801b3d6131 |
comparison
equal
deleted
inserted
replaced
760:946f8b4762ad | 761:af6cfa619c24 |
---|---|
21 <script src='loudness.js'></script> | 21 <script src='loudness.js'></script> |
22 <script type="text/javascript"> | 22 <script type="text/javascript"> |
23 window.onbeforeunload = function() { | 23 window.onbeforeunload = function() { |
24 return "Please only leave this page once you have completed the tests. Are you sure you have completed all testing?"; | 24 return "Please only leave this page once you have completed the tests. Are you sure you have completed all testing?"; |
25 }; | 25 }; |
26 </script> | 26 |
27 <!-- Uncomment the following script for automatic loading of projects --> | 27 var url = 'example_eval/project.xml'; |
28 <script> | 28 // SEARCH QUERY: By using the GET Request option ?url=loca/path/to/project.xml in the URL bar, you can load a project quickly |
29 //url = '/pseudo.xml'; //Project XML document location | 29 if (window.location.search.length != 0) |
30 url = 'example_eval/project.xml'; | 30 { |
31 var search = window.location.search.split('?')[1]; | |
32 // Now split the requests into pairs | |
33 var searchQueries = search.split('&'); | |
34 for (var i in searchQueries) | |
35 { | |
36 // Split each request into | |
37 searchQueries[i] = searchQueries[i].split('='); | |
38 if (searchQueries[i][0] == "url") | |
39 { | |
40 url = searchQueries[i][1]; | |
41 } | |
42 } | |
43 } | |
31 loadProjectSpec(url); | 44 loadProjectSpec(url); |
32 </script> | 45 </script> |
33 | |
34 </head> | 46 </head> |
35 | 47 |
36 <body> | 48 <body> |
37 <!-- Load up the default page interface allowing for project setting loads, even if hard-coded--> | 49 <!-- Load up the default page interface allowing for project setting loads, even if hard-coded--> |
38 <!-- Actual test interface design should be contained in the .js for ease of dynamic content--> | 50 <!-- Actual test interface design should be contained in the .js for ease of dynamic content--> |