From eecb201016589de7cd963f7a1d1dffcc50ab3d0b Mon Sep 17 00:00:00 2001 From: Shampra <16141040+Shampra@users.noreply.github.com> Date: Wed, 15 May 2024 13:29:10 +0200 Subject: [PATCH 1/4] Update version in package.json --- recipes/hangoutschat/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/hangoutschat/package.json b/recipes/hangoutschat/package.json index 9bc79f1aa..4c0b2600c 100644 --- a/recipes/hangoutschat/package.json +++ b/recipes/hangoutschat/package.json @@ -1,7 +1,7 @@ { "id": "hangoutschat", "name": "Hangouts Chat", - "version": "1.8.1", + "version": "1.8.2", "license": "MIT", "aliases": [ "google-chat", From fde099e521411fa6ee1885ef0c6a2c56be5afc4b Mon Sep 17 00:00:00 2001 From: Shampra <16141040+Shampra@users.noreply.github.com> Date: Wed, 15 May 2024 14:59:04 +0200 Subject: [PATCH 2/4] Update detection for notification bagde Use now the ico link because using div classes is broken with every Google chat update --- recipes/hangoutschat/webview.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/recipes/hangoutschat/webview.js b/recipes/hangoutschat/webview.js index 7f2acf2cb..307a75278 100644 --- a/recipes/hangoutschat/webview.js +++ b/recipes/hangoutschat/webview.js @@ -14,9 +14,6 @@ module.exports = Ferdium => { 'https://accounts.google.com/AccountChooser?continue=https://chat.google.com/?referrer=2'; } - // class corresponding to the red badge that is visible for direct messages - const directMessageSelector = 'div.V6.CL.su.ahD.X9.Y2 span.akt span.XU'; - // class corresponding to the bold text that is visible for room messages const indirectMessageSelector = 'div.V6.CL.V2.X9.Y2 span.akt span.XU'; @@ -25,10 +22,8 @@ module.exports = Ferdium => { let directCount; let indirectCount; - const directCountSelector = document.querySelector(directMessageSelector); - if (directCountSelector) { - directCount = Number(directCountSelector.textContent); - } + // get unread messages count + directCount = document.querySelectorAll('link[href^="https://ssl.gstatic.com/ui/v1/icons/mail/images/favicon_chat_new_notif_"][href$=".ico"]').length; // get unread indirect messages const indirectCountSelector = document.querySelector( From 3204952f1c38921109dbbd2789c7131c304981e7 Mon Sep 17 00:00:00 2001 From: Shampra <16141040+Shampra@users.noreply.github.com> Date: Wed, 15 May 2024 17:45:25 +0200 Subject: [PATCH 3/4] Update package.json --- recipes/hangoutschat/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/hangoutschat/package.json b/recipes/hangoutschat/package.json index 4c0b2600c..0f9f3f8ba 100644 --- a/recipes/hangoutschat/package.json +++ b/recipes/hangoutschat/package.json @@ -1,7 +1,7 @@ { "id": "hangoutschat", "name": "Hangouts Chat", - "version": "1.8.2", + "version": "1.8.3", "license": "MIT", "aliases": [ "google-chat", From 9aae90b44a5f246b3e48936a08c59e0485149cf3 Mon Sep 17 00:00:00 2001 From: Shampra <16141040+Shampra@users.noreply.github.com> Date: Wed, 15 May 2024 17:54:29 +0200 Subject: [PATCH 4/4] Update package.json --- recipes/hangoutschat/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/hangoutschat/package.json b/recipes/hangoutschat/package.json index 0f9f3f8ba..bfe5d76f6 100644 --- a/recipes/hangoutschat/package.json +++ b/recipes/hangoutschat/package.json @@ -1,7 +1,7 @@ { "id": "hangoutschat", "name": "Hangouts Chat", - "version": "1.8.3", + "version": "1.9.0", "license": "MIT", "aliases": [ "google-chat",