diff options
author | 2021-12-14 11:27:25 +0100 | |
---|---|---|
committer | 2021-12-14 15:57:25 +0530 | |
commit | 4286ba6420dd7515f03819a4a9c5d8428352b2de (patch) | |
tree | 91385fd54aa41ca3e64e058366c19930347d3c83 /recipes/nextcloud-talk/webview.js | |
parent | dummy commit (diff) | |
download | ferdium-recipes-4286ba6420dd7515f03819a4a9c5d8428352b2de.tar.gz ferdium-recipes-4286ba6420dd7515f03819a4a9c5d8428352b2de.tar.zst ferdium-recipes-4286ba6420dd7515f03819a4a9c5d8428352b2de.zip |
Indirect badge if title page starts with a star (#787)
If the title of the Nextcloud Talk page starts with a star (*) increment the number of indirect messages.
Nextcloud shows the star indicator if you already are in an active chat and you get new notifications in this chat window.
Diffstat (limited to 'recipes/nextcloud-talk/webview.js')
-rw-r--r-- | recipes/nextcloud-talk/webview.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/recipes/nextcloud-talk/webview.js b/recipes/nextcloud-talk/webview.js index 49a3e29..5e28853 100644 --- a/recipes/nextcloud-talk/webview.js +++ b/recipes/nextcloud-talk/webview.js | |||
@@ -21,6 +21,10 @@ module.exports = Ferdi => { | |||
21 | indirect += Number(counter.textContent); | 21 | indirect += Number(counter.textContent); |
22 | } | 22 | } |
23 | 23 | ||
24 | if (document.title.startsWith("*")) { | ||
25 | indirect++; | ||
26 | } | ||
27 | |||
24 | Ferdi.setBadge(direct, indirect); | 28 | Ferdi.setBadge(direct, indirect); |
25 | }; | 29 | }; |
26 | 30 | ||