#19 Added displayNotificationsInTitle in notifications

This commit is contained in:
kaffem 2020-07-29 22:48:49 +02:00
parent dd5790695a
commit 76d2a0fcd9
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,10 @@
runAfterLoad(() => {
displayNotificationsInTitle();
}, ".*");
function displayNotificationsInTitle(){
let menu = document.getElementById('materialize-menu-dropdown');
let menuDropdowns = Array.from(menu.querySelectorAll('ul.dropdown')).slice(-1)[0];
let notificationText = menuDropdowns.innerText.split(" ")[3];
document.querySelector('head > title').insertAdjacentText('afterbegin', notificationText.split(" ")[1] + ' ');
}

View file

@ -22,7 +22,8 @@
],
"js": [
"enhancements/quickSearch.js",
"enhancements/animeRequests.js"
"enhancements/animeRequests.js",
"enhancements/notifications.js"
],
"run_at": "document_end"
}