changeset 2618:fff464febd56

Merge branch 'master' into vnext
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Thu, 17 Nov 2016 13:08:00 +0000
parents 756d12f5c330 (current diff) c821dc2e26f5 (diff)
children 74e5d7a978ee
files js/core.js
diffstat 2 files changed, 6 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Mon Nov 14 16:21:42 2016 +0000
+++ b/README.md	Thu Nov 17 13:08:00 2016 +0000
@@ -28,11 +28,9 @@
 
 As Microsoft Internet Explorer [does not support the Web Audio API](http://caniuse.com/#feat=audio-api), you will need another browser like Firefox, Chrome, Edge or Safari.
 
-## Academic use
+## Citing
 
-### Citing
-
-Please cite 
+When using the Web Audio Evaluation Tool, please acknowledge the authors and cite 
 
 > Nicholas Jillings, Brecht De Man, David Moffat and Joshua D. Reiss, "[Web Audio Evaluation Tool: A Browser-Based Listening Test Environment](http://www.brechtdeman.com/publications/smc10.pdf)," [12th Sound and Music Computing Conference](http://www.maynoothuniversity.ie/smc15/), July 2015.
 
@@ -45,11 +43,8 @@
 	    Title = {Web {A}udio {E}valuation {T}ool: {A} browser-based listening test environment},
     	Year = {2015}}
 
-### License
+## License
 
 Please refer to LICENSE.txt ([GNU General Public License](http://www.gnu.org/licenses/gpl-3.0.en.html)).
 
-
-## Other use
-
-Other licensing schemes are available - please contact the authors regarding non-academic use. 
+If you wish to use elements of the Web Audio Evaluation Tool as part of a commercial product, please contact us for a commercial license. 
--- a/js/core.js	Mon Nov 14 16:21:42 2016 +0000
+++ b/js/core.js	Thu Nov 17 13:08:00 2016 +0000
@@ -488,8 +488,8 @@
             } else {
                 var parser = new DOMParser();
                 var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml");
-                var response = xmlDoc.getElementsByTagName('response')[0];
-                if (response.getAttribute("state") == "OK") {
+                var response = xmlDoc.firstElementChild;
+                if (response.nodeName == "response" && response.getAttribute("state") == "OK") {
                     window.onbeforeunload = undefined;
                     var file = response.getElementsByTagName("file")[0];
                     console.log("Save: OK, written " + file.getAttribute("bytes") + "B");