simplified retrieving the notification count
This commit is contained in:
parent
b65b0ce29c
commit
a6654ebbf7
|
@ -10,10 +10,8 @@ runAfterPathnameChange(() => {
|
||||||
}, ".*");
|
}, ".*");
|
||||||
|
|
||||||
function getNotificationCount() {
|
function getNotificationCount() {
|
||||||
let menu = document.getElementById('materialize-menu-dropdown');
|
let menuUserText = document.getElementById('materialize-menu-dropdown').innerText.split('\n')[4];
|
||||||
let menuDropdowns = Array.from(menu.querySelectorAll('ul.dropdown')).slice(-1)[0];
|
return menuUserText.split(" ")[1] + ' ';
|
||||||
let notificationText = menuDropdowns.innerText.split(" ")[3];
|
|
||||||
return notificationText.split(" ")[1] + ' ';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayNotificationsInTitle(){
|
function displayNotificationsInTitle(){
|
||||||
|
|
Loading…
Reference in a new issue