From 4286ba6420dd7515f03819a4a9c5d8428352b2de Mon Sep 17 00:00:00 2001 From: cm-schl <63400209+cm-schl@users.noreply.github.com> Date: Tue, 14 Dec 2021 11:27:25 +0100 Subject: 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. --- recipes/nextcloud-talk/webview.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'recipes/nextcloud-talk/webview.js') 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 => { indirect += Number(counter.textContent); } + if (document.title.startsWith("*")) { + indirect++; + } + Ferdi.setBadge(direct, indirect); }; -- cgit v1.2.3-70-g09d2