Browse Source

even more jshint compliance

master
ansuz 4 years ago
parent
commit
278c4ab32f
7 changed files with 21 additions and 4 deletions
  1. 8
      ChainPadSrv.js
  2. 3
      config.js.dist
  3. 3
      customize.dist/DecorateToolbar.js
  4. 3
      customize.dist/pad.js
  5. 3
      customize.dist/sheet.js
  6. 3
      server.js
  7. 2
      storage/amnesia.js

8
ChainPadSrv.js

@ -14,7 +14,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var WebSocket = require('ws');
// triggers jsh because we're not in a browser and WebSocket is a thing
var WebSocket = require('ws'); // jshint ignore:line
var REGISTER = 0;
var REGISTER_ACK = 1;
@ -60,7 +62,7 @@ var sendChannelMessage = function (ctx, channel, msg, cb) {
try { user.socket.close(); } catch (e) { }
}
});
cb && cb();
if (cb) { cb(); }
});
};
@ -184,7 +186,7 @@ var create = module.exports.create = function (socketServer, store) {
}
});
socket.on('close', function (evt) {
for (client in ctx.registeredClients) {
for (var client in ctx.registeredClients) {
if (ctx.registeredClients[client].socket === socket) {
dropClient(ctx, client);
}

3
config.js.dist

@ -1,3 +1,6 @@
/*
globals module
*/
module.exports = {
// the address you want to bind to, :: means all ipv4 and ipv6 addresses

3
customize.dist/DecorateToolbar.js

@ -1,3 +1,6 @@
/*
globals define
*/
define([
'/bower_components/jquery/dist/jquery.min.js'
], function () {

3
customize.dist/pad.js

@ -1,3 +1,6 @@
/*
globals define console
*/
require([
'/customize/DecorateToolbar.js',
'/bower_components/jquery/dist/jquery.min.js'

3
customize.dist/sheet.js

@ -1,3 +1,6 @@
/*
globals require
*/
require([
'/customize/DecorateToolbar.js',
'/bower_components/jquery/dist/jquery.min.js'

3
server.js

@ -1,3 +1,6 @@
/*
globals require console
*/
var Express = require('express');
var Http = require('http');
var Https = require('https');

2
storage/amnesia.js

@ -34,7 +34,7 @@ module.exports.create = function(conf, cb){
return a.id - b.id;
});
db.filter(function(val){
return val.chan == channelName;
return val.chan === channelName;
}).forEach(function(doc){
cb(doc.msg);
});

Loading…
Cancel
Save