diff options
Diffstat (limited to 'recipes/google-groups/webview.js')
-rw-r--r-- | recipes/google-groups/webview.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/recipes/google-groups/webview.js b/recipes/google-groups/webview.js index 7006eef..c13334a 100644 --- a/recipes/google-groups/webview.js +++ b/recipes/google-groups/webview.js | |||
@@ -1,15 +1,17 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { | 1 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | 2 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 3 | } |
6 | 4 | ||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | let countImportant = 0; | 9 | let countImportant = 0; |
10 | const unReadConversationCount = document.querySelectorAll('.NHlkZc'); | 10 | const unReadConversationCount = document.querySelectorAll('.NHlkZc'); |
11 | if (unReadConversationCount.length > 0) { | 11 | if (unReadConversationCount.length > 0) { |
12 | countImportant = Ferdium.safeParseInt(unReadConversationCount[0].textContent); | 12 | countImportant = Ferdium.safeParseInt( |
13 | unReadConversationCount[0].textContent, | ||
14 | ); | ||
13 | } | 15 | } |
14 | Ferdium.setBadge(countImportant, 0); | 16 | Ferdium.setBadge(countImportant, 0); |
15 | }; | 17 | }; |