diff --git a/modules/pcx86/lib/keyboard.js b/modules/pcx86/lib/keyboard.js index 2e228bb44..ee312e2b9 100644 --- a/modules/pcx86/lib/keyboard.js +++ b/modules/pcx86/lib/keyboard.js @@ -1043,7 +1043,7 @@ Keyboard.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) kbd.addActiveKey(simCode); }; }(this, sBinding, Keyboard.SOFTCODES[sBinding]); - var fnUp = function (kbd, sKey, simCode) { + var fnUp = function(kbd, sKey, simCode) { return function onKeyboardBindingUp(event) { kbd.removeActiveKey(simCode); }; @@ -1655,7 +1655,7 @@ Keyboard.prototype.injectKeysFromBuffer = function(msDelay) this.addActiveKey(ch, true); } if (this.sInjectBuffer.length > 0) { - setTimeout(function (kbd) { + setTimeout(function(kbd) { return function onInjectKeyTimeout() { kbd.injectKeysFromBuffer(msDelay); }; diff --git a/modules/shared/es6/component.js b/modules/shared/es6/component.js index d395e5299..74f1ad9be 100644 --- a/modules/shared/es6/component.js +++ b/modules/shared/es6/component.js @@ -1027,7 +1027,7 @@ if (!Array.prototype.indexOf) { * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray */ if (!Array.isArray) { - Array.isArray = function (arg) { + Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; } diff --git a/modules/shared/es6/netlib.js b/modules/shared/es6/netlib.js index 4cb2a89ef..d36997057 100644 --- a/modules/shared/es6/netlib.js +++ b/modules/shared/es6/netlib.js @@ -156,7 +156,7 @@ class Net { var options = url.parse(sURL); options.method = "HEAD"; options.path = options.pathname; // TODO: Determine the necessity of aliasing this - var req = http.request(options, function (res) + var req = http.request(options, function(res) { var err = null; var stat = null; @@ -179,7 +179,7 @@ class Net { } done(err, stat); }); - req.on('error', function (err) + req.on('error', function(err) { done(err, null); }); @@ -211,9 +211,9 @@ class Net { */ var sFile = ""; var bufFile = null; - http.get(sURL, function (res) + http.get(sURL, function(res) { - res.on('data', function (data) + res.on('data', function(data) { if (sEncoding) { sFile += data; @@ -241,7 +241,7 @@ class Net { * bufFile = buf; */ bufFile = Buffer.concat([bufFile, data], bufFile.length + data.length); - }).on('end', function () + }).on('end', function() { /* * TODO: Decide what to do when res.statusCode is actually an error code (eg, 404), because @@ -252,7 +252,7 @@ class Net { } else { done(new Error(sEncoding ? sFile : bufFile), res.statusCode, null); } - }).on('error', function (err) + }).on('error', function(err) { done(err, res.statusCode, null); }); @@ -279,12 +279,12 @@ class Net { * Either the documentation isn't quite right for url.parse() or http.request() (the big brother * of http.get), or one of those "options" properties is aliased to the other, or...? */ - http.get(sURL, function (res) + http.get(sURL, function(res) { - res.on('data', function (data) + res.on('data', function(data) { file.write(data); - }).on('end', function () + }).on('end', function() { file.end(); /* @@ -295,7 +295,7 @@ class Net { * in such cases, the file content will likely just be an HTML error page. */ done(null, res.statusCode); - }).on('error', function (err) + }).on('error', function(err) { done(err, res.statusCode); }); @@ -329,7 +329,7 @@ class Net { var sBaseName = Str.getBaseName(sURL); var sFile = path.join(Net.sServerRoot, sURL); if (fAsync) { - fs.readFile(sFile, {encoding: "utf8"}, function (err, s) + fs.readFile(sFile, {encoding: "utf8"}, function(err, s) { /* * TODO: If err is set, is there an error code we should return (instead of -1)? diff --git a/modules/shared/es6/proclib.js b/modules/shared/es6/proclib.js index aca7c8b58..818a708a4 100644 --- a/modules/shared/es6/proclib.js +++ b/modules/shared/es6/proclib.js @@ -44,7 +44,7 @@ class Proc { * * @return {{argc:number, argv:{}}} */ - static getArgs = function () + static getArgs() { var argc = 0; var argv = {}; diff --git a/modules/shared/es6/strlib.js b/modules/shared/es6/strlib.js index 804d9301b..82264f4e4 100644 --- a/modules/shared/es6/strlib.js +++ b/modules/shared/es6/strlib.js @@ -450,7 +450,7 @@ class Str { */ static escapeHTML(sHTML) { - return sHTML.replace(/[&<>"']/g, function (m) + return sHTML.replace(/[&<>"']/g, function(m) { return Str.aHTMLEscapeMap[m]; }); @@ -494,7 +494,7 @@ class Str { k = k.replace(/([\\[\]*{}().+?])/g, "\\$1"); sMatch += (sMatch ? '|' : '') + k; } - return s.replace(new RegExp('(' + sMatch + ')', "g"), function (m) + return s.replace(new RegExp('(' + sMatch + ')', "g"), function(m) { return a[m]; }); diff --git a/modules/shared/es6/usrlib.js b/modules/shared/es6/usrlib.js index 1ea251fd1..d3260b457 100644 --- a/modules/shared/es6/usrlib.js +++ b/modules/shared/es6/usrlib.js @@ -56,7 +56,7 @@ class Usr { var right = a.length; var found = 0; if (fnCompare === undefined) { - fnCompare = function (a, b) + fnCompare = function(a, b) { return a > b ? 1 : a < b ? -1 : 0; }; diff --git a/modules/shared/es6/weblib.js b/modules/shared/es6/weblib.js index cc7f22fd7..c83cc951e 100644 --- a/modules/shared/es6/weblib.js +++ b/modules/shared/es6/weblib.js @@ -174,7 +174,7 @@ class Web { return [sResource, nErrorCode]; } else if (fAsync && typeof resources == 'function') { - resources(sURL, function (sResource, nErrorCode) + resources(sURL, function(sResource, nErrorCode) { if (done) done(sURL, sResource, nErrorCode); }); @@ -190,7 +190,7 @@ class Web { var xmlHTTP = (window.XMLHttpRequest ? new window.XMLHttpRequest() : new window.ActiveXObject("Microsoft.XMLHTTP")); if (fAsync) { - xmlHTTP.onreadystatechange = function () + xmlHTTP.onreadystatechange = function() { if (xmlHTTP.readyState === 4) { /* @@ -679,7 +679,7 @@ class Web { var match; var pl = /\+/g; // RegExp for replacing addition symbol with a space var search = /([^&=]+)=?([^&]*)/g; - var decode = function (s) + var decode = function(s) { return decodeURIComponent(s.replace(pl, " ")); }; @@ -777,7 +777,7 @@ class Web { ms = msRepeat; } }; - e.onmousedown = function () + e.onmousedown = function() { // Web.log("onMouseDown()"); if (!fIgnoreMouseEvents) { @@ -787,7 +787,7 @@ class Web { } } }; - e.ontouchstart = function () + e.ontouchstart = function() { // Web.log("onTouchStart()"); if (!timer) { @@ -795,7 +795,7 @@ class Web { fnRepeat(); } }; - e.onmouseup = e.onmouseout = function () + e.onmouseup = e.onmouseout = function() { // Web.log("onMouseUp()/onMouseOut()"); if (timer) { @@ -803,7 +803,7 @@ class Web { timer = null; } }; - e.ontouchend = e.ontouchcancel = function () + e.ontouchend = e.ontouchcancel = function() { // Web.log("onTouchEnd()/onTouchCancel()"); if (timer) { diff --git a/modules/shared/lib/component.js b/modules/shared/lib/component.js index 07a03b6f4..92b0abe8e 100644 --- a/modules/shared/lib/component.js +++ b/modules/shared/lib/component.js @@ -1081,7 +1081,7 @@ if (!Array.prototype.indexOf) { * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray */ if (!Array.isArray) { - Array.isArray = function (arg) { + Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; } diff --git a/modules/shared/lib/sockets.js b/modules/shared/lib/sockets.js index da453401c..06c16914b 100644 --- a/modules/shared/lib/sockets.js +++ b/modules/shared/lib/sockets.js @@ -34,6 +34,6 @@ var socket = io.connect(); // if we get an "info" emit from the socket server then console.log the data we receive -socket.on('info', function (data) { +socket.on('info', function(data) { console.log(data); });