#19 Added displayNotificationsInTitle in notifications
This commit is contained in:
parent
dd5790695a
commit
76d2a0fcd9
10
enhancements/notifications.js
Normal file
10
enhancements/notifications.js
Normal 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] + ' ');
|
||||
}
|
|
@ -22,7 +22,8 @@
|
|||
],
|
||||
"js": [
|
||||
"enhancements/quickSearch.js",
|
||||
"enhancements/animeRequests.js"
|
||||
"enhancements/animeRequests.js",
|
||||
"enhancements/notifications.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue