# HG changeset patch # User Nicholas Jillings # Date 1461943594 -3600 # Node ID 6897339ac651500afba2701dd6ec5c7338c0682c # Parent f1e67258f0b8f8aec5fbb74b22d0d27762a4d31a #48. JS in core.js diff -r f1e67258f0b8 -r 6897339ac651 index.html --- a/index.html Fri Apr 29 15:52:41 2016 +0100 +++ b/index.html Fri Apr 29 16:26:34 2016 +0100 @@ -22,28 +22,6 @@ - diff -r f1e67258f0b8 -r 6897339ac651 js/core.js --- a/js/core.js Fri Apr 29 15:52:41 2016 +0100 +++ b/js/core.js Fri Apr 29 16:26:34 2016 +0100 @@ -140,6 +140,26 @@ storage = new Storage(); // Define window callbacks for interface window.onresize = function(event){interfaceContext.resizeWindow(event);}; + + if (window.location.search.length != 0) + { + var search = window.location.search.split('?')[1]; + // Now split the requests into pairs + var searchQueries = search.split('&'); + for (var i in searchQueries) + { + // Split each request into + searchQueries[i] = searchQueries[i].split('='); + if (searchQueries[i][0] == "url") + { + url = decodeURI(searchQueries[i][1]); + } + } + loadProjectSpec(url); + window.onbeforeunload = function() { + return "Please only leave this page once you have completed the tests. Are you sure you have completed all testing?"; + }; + } }; function loadProjectSpec(url) { diff -r f1e67258f0b8 -r 6897339ac651 test.html --- a/test.html Fri Apr 29 15:52:41 2016 +0100 +++ b/test.html Fri Apr 29 16:26:34 2016 +0100 @@ -22,28 +22,6 @@ -