diff options
Diffstat (limited to 'recipes/guilded')
-rw-r--r-- | recipes/guilded/index.js | 4 | ||||
-rw-r--r-- | recipes/guilded/webview.js | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/recipes/guilded/index.js b/recipes/guilded/index.js index e8243fb..258da41 100644 --- a/recipes/guilded/index.js +++ b/recipes/guilded/index.js | |||
@@ -1,3 +1 @@ | |||
1 | "use strict"; | module.exports = Franz => Franz; | |
2 | |||
3 | module.exports = Franz => Franz; \ No newline at end of file | ||
diff --git a/recipes/guilded/webview.js b/recipes/guilded/webview.js index 371fac8..72a49b4 100644 --- a/recipes/guilded/webview.js +++ b/recipes/guilded/webview.js | |||
@@ -1,15 +1,13 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | 1 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
5 | var unread = 0 | 3 | let unread = 0; |
6 | const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0] | 4 | const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0]; |
7 | if (notificationBadge != undefined) { | 5 | if (notificationBadge != undefined) { |
8 | const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0] | 6 | const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0]; |
9 | unread = innerBadge.innerText; | 7 | unread = innerBadge.innerText; |
10 | } | 8 | } |
11 | Franz.setBadge(parseInt(unread, 10)); | 9 | Franz.setBadge(parseInt(unread, 10)); |
12 | }; | 10 | }; |
13 | 11 | ||
14 | Franz.loop(getMessages); | 12 | Franz.loop(getMessages); |
15 | }; \ No newline at end of file | 13 | }; |