| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { getGlobalConfiguration, SETTINGS_websiteShowNotificationsCountInTab } from '../configuration/configuration'; |
||
| 28 | |||
| 29 | function updateNotificationsInTitle(): void { |
||
| 30 | let count = getNotificationCount(); |
||
| 31 | |||
| 32 | if (helper.assigned(count) && count > 0) { |
||
| 33 | // document.title is updated after the event is triggered, so we delay our title update by a reasonable time |
||
| 34 | setTimeout(() => { |
||
| 35 | document.title = `(${count}) ${document.title}`; |
||
| 36 | }, 100); |
||
| 37 | } |
||
| 38 | } |