diff options
Diffstat (limited to 'recipes/nextcloud-deck/webview.js')
-rw-r--r-- | recipes/nextcloud-deck/webview.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/recipes/nextcloud-deck/webview.js b/recipes/nextcloud-deck/webview.js index 33bf0c5..e60f50b 100644 --- a/recipes/nextcloud-deck/webview.js +++ b/recipes/nextcloud-deck/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 | const directSelector = document.querySelector( | 9 | const directSelector = document.querySelector( |
10 | '.subscriptions-feed .app-navigation-entry-utils-counter', | 10 | '.subscriptions-feed .app-navigation-entry-utils-counter', |
11 | ); | 11 | ); |
12 | const direct = directSelector ? Ferdium.safeParseInt(directSelector.textContent) : 0; | 12 | const direct = directSelector |
13 | ? Ferdium.safeParseInt(directSelector.textContent) | ||
14 | : 0; | ||
13 | 15 | ||
14 | Ferdium.setBadge(direct); | 16 | Ferdium.setBadge(direct); |
15 | }; | 17 | }; |