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/package.json | 2 +- recipes/nextcloud-talk/webview.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'recipes') diff --git a/recipes/nextcloud-talk/package.json b/recipes/nextcloud-talk/package.json index 445780d..7120673 100644 --- a/recipes/nextcloud-talk/package.json +++ b/recipes/nextcloud-talk/package.json @@ -1,7 +1,7 @@ { "id": "nextcloud-talk", "name": "Nextcloud Talk", - "version": "1.1.1", + "version": "1.2.0", "license": "MIT", "config": { "hasNotificationSound": true, 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-54-g00ecf