changeset 3091:cb81b0e8d31a

Merge branch 'master' into vnext
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 12 Jan 2018 15:45:59 +0000
parents a169e79ba224 (current diff) d5432dd0924e (diff)
children 30ba1b9ed867 2861ad69b77d
files js/core.js
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/js/core.js	Fri Jan 12 15:40:26 2018 +0000
+++ b/js/core.js	Fri Jan 12 15:45:59 2018 +0000
@@ -696,7 +696,7 @@
             tr = document.createElement('div');
             tr.setAttribute('name', 'option');
             tr.className = "popup-option-checbox";
-            var resp = undefined;
+            var resp;
             if (node.response.length > 0) {
                 resp = node.response.find(function (a) {
                     return a.name == option.name;
@@ -1267,7 +1267,7 @@
                 } else {
                     remainder.push(a);
                 }
-            })
+            });
             if (page.poolSize > 0 || page.randomiseOrder) {
                 page.randomiseOrder = true;
                 if (page.poolSize === 0) {
@@ -2040,9 +2040,9 @@
 
     this.bufferStart = function (startTime) {
         this.outputGain.gain.cancelScheduledValues(audioContext.currentTime);
-        if (this.bufferNode && this.bufferNode.state == 0) {
+        if (this.bufferNode && this.bufferNode.state === 0) {
             this.bufferNode.state = 1;
-            if (this.bufferNode.loop == true) {
+            if (this.bufferNode.loop === true) {
                 this.bufferNode.start(startTime);
             } else {
                 this.bufferNode.start(startTime, this.specification.startTime || 0, this.specification.stopTime - this.specification.startTime || this.buffer.buffer.duration);
@@ -2381,7 +2381,7 @@
                     throw ("Key must be a singular character");
                 }
                 var included = this.keys.findIndex(function (k) {
-                    return k.key == key
+                    return k.key == key;
                 }) >= 0;
                 if (included) {
                     throw ("Key " + key + " already bounded!");
@@ -2414,7 +2414,7 @@
 
                 function keypress(key) {
                     var index = this.keys.findIndex(function (k) {
-                        return k.key == key
+                        return k.key == key;
                     });
                     if (index >= 0) {
                         audioEngineContext.play(this.keys[index].audioObject.id);
@@ -2425,7 +2425,7 @@
                     return document.activeElement.className.indexOf("trackComment") >= 0;
                 }
                 if (e.key === " ") {
-                    if (isPlaying() && trackCommentFocus() == false) {
+                    if (isPlaying() && trackCommentFocus() === false) {
                         e.preventDefault();
                         audioEngineContext.stop();
                     }
@@ -3696,7 +3696,7 @@
                 // Make the request
                 req.send([hold.innerHTML]);
             });
-        };
+        }
 
         function keyPromise() {
             return new Promise(function (resolve, reject) {
@@ -3721,7 +3721,7 @@
                 };
 
                 req.send();
-            })
+            });
         }
 
         var requestChains = null;
@@ -3734,7 +3734,7 @@
                     return sessionKey;
                 },
                 "set": function (a) {
-                    throw ("Cannot set read-only property")
+                    throw ("Cannot set read-only property");
                 }
             },
             "request": {
@@ -3775,7 +3775,7 @@
             },
             "update": {
                 "value": function () {
-                    if (this.key == null || requestChains === undefined) {
+                    if (this.key === null || requestChains === undefined) {
                         throw ("Cannot save as key == null");
                     }
                     this.parent.root.setAttribute("state", "update");
@@ -3784,7 +3784,7 @@
             },
             "finish": {
                 "value": function () {
-                    if (this.key == null || requestChains === undefined) {
+                    if (this.key === null || requestChains === undefined) {
                         throw ("Cannot save as key == null");
                     }
                     this.parent.finish();
@@ -3792,7 +3792,7 @@
                         console.log("OK");
                     }, function () {
                         createProjectSave("local");
-                    })
+                    });
                 }
             }
         });