annotate 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
rev   line source
nicholas@755 1 <!DOCTYPE html>
nicholas@755 2 <html lang="en">
nicholas@755 3 <head>
nicholas@755 4 <meta charset="utf-8" />
nicholas@755 5
nicholas@755 6
nicholas@755 7 <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
nicholas@755 8 Remove this if you use the .htaccess -->
nicholas@755 9 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
nicholas@755 10
nicholas@755 11 <title>Web Audio Evaluation Tool</title>
nicholas@755 12 <meta name="description" content="" />
nicholas@755 13 <meta name="author" content="" />
nicholas@755 14
nicholas@755 15 <!-- Load up the default core JS and CSS files-->
nicholas@755 16 <link rel='stylesheet' type='text/css' href='core.css'>
nicholas@755 17 <!-- Use jQuery hosted from Google CDN -->
nicholas@755 18 <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>-->
nicholas@755 19 <script src="jquery-2.1.4.js"></script>
nicholas@755 20 <script src='core.js'></script>
nicholas@755 21 <script src='loudness.js'></script>
nicholas@755 22 <script type="text/javascript">
nicholas@755 23 window.onbeforeunload = function() {
nicholas@755 24 return "Please only leave this page once you have completed the tests. Are you sure you have completed all testing?";
nicholas@755 25 };
nicholas@761 26
nicholas@761 27 var url = 'example_eval/project.xml';
nicholas@761 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
nicholas@761 29 if (window.location.search.length != 0)
nicholas@761 30 {
nicholas@761 31 var search = window.location.search.split('?')[1];
nicholas@761 32 // Now split the requests into pairs
nicholas@761 33 var searchQueries = search.split('&');
nicholas@761 34 for (var i in searchQueries)
nicholas@761 35 {
nicholas@761 36 // Split each request into
nicholas@761 37 searchQueries[i] = searchQueries[i].split('=');
nicholas@761 38 if (searchQueries[i][0] == "url")
nicholas@761 39 {
nicholas@761 40 url = searchQueries[i][1];
nicholas@761 41 }
nicholas@761 42 }
nicholas@761 43 }
nicholas@755 44 loadProjectSpec(url);
nicholas@755 45 </script>
nicholas@755 46 </head>
nicholas@755 47
nicholas@755 48 <body>
nicholas@755 49 <!-- Load up the default page interface allowing for project setting loads, even if hard-coded-->
nicholas@755 50 <!-- Actual test interface design should be contained in the .js for ease of dynamic content-->
nicholas@755 51 <div id='topLevelBody'>
nicholas@755 52 <p>HTML5 APE Tool</p>
nicholas@755 53 </div>
nicholas@755 54 </body>
nicholas@755 55 </html>