From 5f0329ccf678031b0d8638a45bf7f9bd802d3159 Mon Sep 17 00:00:00 2001 From: vrde Date: Tue, 20 Oct 2015 11:35:32 +0200 Subject: [PATCH] Remove useless code --- js/utils/dom_utils.js | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/js/utils/dom_utils.js b/js/utils/dom_utils.js index b082f474..c20e1009 100644 --- a/js/utils/dom_utils.js +++ b/js/utils/dom_utils.js @@ -2,26 +2,8 @@ /** - * Get the number of unread notifications in the title. - * - * @return {int} the number of unread notifications - */ -function getUnreadCount() { - const match = document.title.match(/^\((\d+)\)/); - return parseInt((match ? match[1] : 0), 10); -} - - -/** - * Set the title in the browser window while keeping the unread notification count (if any). + * Set the title in the browser window. */ export function setDocumentTitle(title) { - const count = getUnreadCount(); - let newTitle = title; - - if (count > 0) { - newTitle = `(${count}) ${newTitle}`; - } - - document.title = newTitle; + document.title = title; }