From 887092eb4b244def4bf074c4ef81a8cf5a18d217 Mon Sep 17 00:00:00 2001
From: David Cormier <david.cormier@savoirfairelinux.com>
Date: Tue, 17 Dec 2013 08:40:49 -0500
Subject: [PATCH] Remove unused variables and __proto__ inheritance

---
 js/websockets.js | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/js/websockets.js b/js/websockets.js
index 1f3fbf3..2b306c4 100644
--- a/js/websockets.js
+++ b/js/websockets.js
@@ -9,7 +9,7 @@ weechat.filter('toArray', function () {
         }
 
         return Object.keys(obj).map(function (key) {
-            return Object.defineProperty(obj[key], '$key', {__proto__: null, value: key});
+            return Object.defineProperty(obj[key], '$key', { value: key });
         });
     };
 });
@@ -281,7 +281,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
         websocket = new WebSocket(proto+"://" + host + ':' + port + "/weechat");
         websocket.binaryType = "arraybuffer";
 
-        websocket.onopen = function (evt) {
+        websocket.onopen = function () {
 
             $log.info("Connected to relay");
 
@@ -299,7 +299,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
                 })
             ]).then(
                 null,
-                function(error) {
+                function() {
                     $rootScope.passwordError = true;
                 }
             );
@@ -358,7 +358,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
 
         };
 
-        websocket.onclose = function (evt) {
+        websocket.onclose = function () {
             $log.info("Disconnected from relay");
             $rootScope.connected = false;
             failCallbacks('disconnection');
@@ -426,7 +426,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
     };
 }]);
 
-weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', '$log', 'models', 'connection', function ($rootScope, $scope, $store, $timeout, $log, models, connection, testService) {
+weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', '$log', 'models', 'connection', function ($rootScope, $scope, $store, $timeout, $log, models, connection) {
     if(window.Notification) {
         // Request notification permission
         Notification.requestPermission(function (status) {
@@ -702,8 +702,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
     };
 
 
-    $scope.handleKeyPress = function($event) {
-    };
     $scope.handleSearchBoxKey = function($event) {
         // Support different browser quirks
         var code = $event.keyCode ? $event.keyCode : $event.charCode;