aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar cm-schl <63400209+cm-schl@users.noreply.github.com>2021-12-14 11:27:25 +0100
committerLibravatar GitHub <noreply@github.com>2021-12-14 15:57:25 +0530
commit4286ba6420dd7515f03819a4a9c5d8428352b2de (patch)
tree91385fd54aa41ca3e64e058366c19930347d3c83
parentdummy commit (diff)
downloadferdium-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.
-rw-r--r--all.json2
-rw-r--r--recipes/nextcloud-talk/package.json2
-rw-r--r--recipes/nextcloud-talk/webview.js4
3 files changed, 6 insertions, 2 deletions
diff --git a/all.json b/all.json
index 07fa090..9cd2609 100644
--- a/all.json
+++ b/all.json
@@ -1140,7 +1140,7 @@
1140 "featured": false, 1140 "featured": false,
1141 "id": "nextcloud-talk", 1141 "id": "nextcloud-talk",
1142 "name": "Nextcloud Talk", 1142 "name": "Nextcloud Talk",
1143 "version": "1.1.1", 1143 "version": "1.2.0",
1144 "icons": { 1144 "icons": {
1145 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/nextcloud-talk/icon.svg" 1145 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/nextcloud-talk/icon.svg"
1146 } 1146 }
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 @@
1{ 1{
2 "id": "nextcloud-talk", 2 "id": "nextcloud-talk",
3 "name": "Nextcloud Talk", 3 "name": "Nextcloud Talk",
4 "version": "1.1.1", 4 "version": "1.2.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "hasNotificationSound": true, 7 "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 => {
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