diff options
Diffstat (limited to 'recipes/hangouts')
-rw-r--r-- | recipes/hangouts/package.json | 2 | ||||
-rw-r--r-- | recipes/hangouts/webview.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/recipes/hangouts/package.json b/recipes/hangouts/package.json index e14f05e..bb76e4b 100644 --- a/recipes/hangouts/package.json +++ b/recipes/hangouts/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "hangouts", | 2 | "id": "hangouts", |
3 | "name": "Hangouts", | 3 | "name": "Hangouts", |
4 | "version": "1.3.0", | 4 | "version": "1.3.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://hangouts.google.com", | 7 | "serviceURL": "https://hangouts.google.com", |
diff --git a/recipes/hangouts/webview.js b/recipes/hangouts/webview.js index f57864e..02ded41 100644 --- a/recipes/hangouts/webview.js +++ b/recipes/hangouts/webview.js | |||
@@ -1,7 +1,8 @@ | |||
1 | module.exports = Ferdium => { | 1 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | // get unread messages | 3 | // get unread messages |
4 | const count = document.querySelector('#hangout-landing-chat iframe').contentWindow.document.querySelectorAll('.ee').length; | 4 | let count = 0; |
5 | for (const span of document.querySelectorAll('span[jsname=DW2nlb]')) count += Ferdium.safeParseInt(span.textContent); | ||
5 | 6 | ||
6 | // set Ferdium badge | 7 | // set Ferdium badge |
7 | Ferdium.setBadge(count); | 8 | Ferdium.setBadge(count); |