From d363121556c5f0cd5f70c52575f2b599055a91f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 28 Apr 2014 13:52:21 +0100 Subject: [PATCH] Remove unnecessary uses of jQuery and dead code Native code is faster anyways ;) --- js/glowingbear.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index d4d83b9..5594461 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -703,7 +703,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $scope.search = ''; if (!$rootScope.isMobileUi()) { - $('#sendMessage').focus(); + document.getElementById('sendMessage').focus(); } }); @@ -1215,10 +1215,7 @@ weechat.directive('inputBar', function() { * Returns the input element */ $scope.getInputNode = function() { - return $element.find('#'+$scope.inputId)[0]; - }; - $scope.getForm = function() { - return $element.find('form')[0]; + return document.querySelector('textarea#' + $scope.inputId); }; $scope.completeNick = function() {