diff options
Diffstat (limited to 'recipes/nextcloud-calendar/webview.js')
-rw-r--r-- | recipes/nextcloud-calendar/webview.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/recipes/nextcloud-calendar/webview.js b/recipes/nextcloud-calendar/webview.js index 80bfc45..2755cab 100644 --- a/recipes/nextcloud-calendar/webview.js +++ b/recipes/nextcloud-calendar/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.querySelectorAll( | 9 | const directSelector = document.querySelectorAll( |
10 | '.notifications .notification-wrapper .notification[object_type="dav"]', | 10 | '.notifications .notification-wrapper .notification[object_type="dav"]', |
11 | ); | 11 | ); |
12 | const direct = directSelector ? Ferdium.safeParseInt(directSelector.length) : 0; | 12 | const direct = directSelector |
13 | ? Ferdium.safeParseInt(directSelector.length) | ||
14 | : 0; | ||
13 | 15 | ||
14 | Ferdium.setBadge(direct); | 16 | Ferdium.setBadge(direct); |
15 | }; | 17 | }; |