diff js/loader.js @ 2683:15104a43089d

More cleanups for #180
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Wed, 01 Mar 2017 17:10:24 +0000
parents 464c6c6692d6
children
line wrap: on
line diff
--- a/js/loader.js	Wed Mar 01 16:30:59 2017 +0000
+++ b/js/loader.js	Wed Mar 01 17:10:24 2017 +0000
@@ -1,8 +1,8 @@
 // Script to load the relevant JS files if the system supports it
-
+/*globals window, document */
 window.onload = function () {
     // First check if the Web Audio API is supported
-    if (window.AudioContext == undefined && window.webkitAudioContext == undefined) {
+    if (window.AudioContext === undefined && window.webkitAudioContext === undefined) {
         // Display unsuported error message
         var body = document.getElementsByTagName("body")[0];
         body.innerHTML = "<h1>Sorry! Your browser is not supported :(</h1><p>Your browser does not support the HTML5 Web Audio API. Please use one of the following supported browsers instead.<p>";
@@ -26,4 +26,4 @@
             head.appendChild(script);
         }
     }
-}
+};