From 5c4cbbbba10d45c9ded377dd077dd3b52cc33502 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Sun, 8 Apr 2018 16:11:12 +0200 Subject: [PATCH] Remove jquery from NotificationController.js --- src/js/controller/NotificationController.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/controller/NotificationController.js b/src/js/controller/NotificationController.js index 18ee376..782e107 100644 --- a/src/js/controller/NotificationController.js +++ b/src/js/controller/NotificationController.js @@ -7,8 +7,8 @@ * @public */ ns.NotificationController.prototype.init = function() { - $.subscribe(Events.SHOW_NOTIFICATION, $.proxy(this.displayMessage_, this)); - $.subscribe(Events.HIDE_NOTIFICATION, $.proxy(this.removeMessage_, this)); + $.subscribe(Events.SHOW_NOTIFICATION, this.displayMessage_.bind(this)); + $.subscribe(Events.HIDE_NOTIFICATION, this.removeMessage_.bind(this)); }; /** @@ -35,9 +35,9 @@ * @private */ ns.NotificationController.prototype.removeMessage_ = function (evt) { - var message = $('#user-message'); - if (message.length) { - message.remove(); + var message = document.querySelector('#user-message'); + if (message) { + message.parentNode.removeChild(message); } }; })();