diff --git a/test/spec/directives/focus-me.directive.spec.js b/test/spec/directives/focus-me.directive.spec.js deleted file mode 100644 index c91b36a2f3..0000000000 --- a/test/spec/directives/focus-me.directive.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -describe('focusMe Directive', function() { - var element, scope; - - beforeEach(module('habitrpg')); - - beforeEach(inject(function($rootScope, $compile) { - scope = $rootScope.$new(); - - element = ""; - - element = $compile(element)(scope); - scope.$digest(); - })); - - it('focuses the element when appended to the DOM', function() { - inject(function($timeout) { - var focusSpy = sandbox.spy(); - - element.appendTo(document.body); - element.on('focus', focusSpy); - - $timeout.flush(); - expect(focusSpy).to.have.been.called; - }); - }); -}); diff --git a/website/public/js/directives/focus-me.directive.js b/website/public/js/directives/focus-me.directive.js deleted file mode 100644 index 0fdec0e390..0000000000 --- a/website/public/js/directives/focus-me.directive.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -(function(){ - angular - .module('habitrpg') - .directive('focusMe', focusMe); - - focusMe.$inject = [ - '$timeout', - '$parse' - ]; - - function focusMe($timeout, $parse) { - return { - link: function($scope, element, attrs) { - var model = $parse(attrs.focusMe); - $scope.$watch(model, function(value) { - $timeout(function() { - element[0].focus(); - }); - }); - } - } - } -}()); diff --git a/website/public/manifest.json b/website/public/manifest.json index 227d42c2e0..787a2f59d9 100644 --- a/website/public/manifest.json +++ b/website/public/manifest.json @@ -60,7 +60,6 @@ "js/directives/close-menu.directive.js", "js/directives/expand-menu.directive.js", - "js/directives/focus-me.directive.js", "js/directives/from-now.directive.js", "js/directives/habitrpg-tasks.directive.js", "js/directives/hrpg-sort-checklist.directive.js",