2020-08-04 17:42:31 +02:00
|
|
|
let __notificationCount = '';
|
|
|
|
|
2020-07-29 22:48:49 +02:00
|
|
|
runAfterLoad(() => {
|
2020-08-04 17:42:31 +02:00
|
|
|
__notificationCount = getNotificationCount();
|
2020-07-29 22:48:49 +02:00
|
|
|
displayNotificationsInTitle();
|
|
|
|
}, ".*");
|
|
|
|
|
2020-08-04 17:42:31 +02:00
|
|
|
runAfterPathnameChange(() => {
|
|
|
|
displayNotificationsInTitle();
|
|
|
|
}, ".*");
|
|
|
|
|
|
|
|
function getNotificationCount() {
|
2020-08-20 16:09:08 +02:00
|
|
|
let menuUserText = document.getElementById('materialize-menu-dropdown').innerText.split('\n')[4];
|
|
|
|
return menuUserText.split(" ")[1] + ' ';
|
2020-08-04 17:42:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function displayNotificationsInTitle(){
|
|
|
|
document.title = __notificationCount + document.title;
|
|
|
|
}
|