blob: 4f4749b79a5d436aa41fd938d778a7cc9ce6cd4f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module.exports = (Ferdi) => {
function getTasks() {
let incompleteCount = 0;
const countEls = document.querySelectorAll('.AppSidebarListsItems__itemContainer__sizeContainer:not([hidden]) > .AppSidebarListsItems__itemContainer__size');
if (countEls.length) {
Array.from(countEls).forEach((el) => {
incompleteCount += Ferdi.safeParseInt(el.innerHTML);
});
}
Ferdi.setBadge(incompleteCount);
}
Ferdi.loop(getTasks);
};
|