From 801e744a4d96e5af37e04016932fb1e72447bfd6 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Sat, 22 Mar 2014 19:39:58 -0400 Subject: [PATCH 1/2] Remove dead code These codepaths are not used within the application or from the test environment, so they may be safely removed. --- src/client/cloak.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/client/cloak.js b/src/client/cloak.js index 8db56e9..8837de0 100644 --- a/src/client/cloak.js +++ b/src/client/cloak.js @@ -12,7 +12,6 @@ var config = {}; var timerEvents = {}; var serverConfig; - var callbacks = {}; var cloak = { @@ -185,13 +184,6 @@ return socket.socket.connected; }, - _callback: function(name, callback) { - if (callbacks[name] === undefined) { - callbacks[name] = []; - } - callbacks[name].push(callback); - }, - currentUser: function() { return uid; }, From dc9f61c830389dc37da3b717e43d2694c9eb30d9 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Sat, 22 Mar 2014 23:55:51 -0400 Subject: [PATCH 2/2] Remove unnecessary variable --- src/client/cloak.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/cloak.js b/src/client/cloak.js index 8837de0..2e79b46 100644 --- a/src/client/cloak.js +++ b/src/client/cloak.js @@ -7,7 +7,6 @@ var uid; var socket; - var url; var events = {}; var config = {}; var timerEvents = {}; @@ -56,9 +55,8 @@ } }, - run: function(urlArg) { + run: function(url) { - url = urlArg; socket = io.connect(url, { 'force new connection': true });