diff options
Diffstat (limited to 'recipes/nextcloud')
-rw-r--r-- | recipes/nextcloud/index.js | 11 | ||||
-rw-r--r-- | recipes/nextcloud/package.json | 2 | ||||
-rw-r--r-- | recipes/nextcloud/webview.js | 18 |
3 files changed, 20 insertions, 11 deletions
diff --git a/recipes/nextcloud/index.js b/recipes/nextcloud/index.js index 4618097..ec947b7 100644 --- a/recipes/nextcloud/index.js +++ b/recipes/nextcloud/index.js | |||
@@ -1,5 +1,6 @@ | |||
1 | module.exports = Ferdium => class Nextcloud extends Ferdium { | 1 | module.exports = Ferdium => |
2 | buildUrl(url) { | 2 | class Nextcloud extends Ferdium { |
3 | return `${url}/`; | 3 | buildUrl(url) { |
4 | } | 4 | return `${url}/`; |
5 | }; | 5 | } |
6 | }; | ||
diff --git a/recipes/nextcloud/package.json b/recipes/nextcloud/package.json index 239cd6b..0cf39e8 100644 --- a/recipes/nextcloud/package.json +++ b/recipes/nextcloud/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "nextcloud", | 2 | "id": "nextcloud", |
3 | "name": "Nextcloud", | 3 | "name": "Nextcloud", |
4 | "version": "1.2.1", | 4 | "version": "1.3.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "hasNotificationSound": true, | 7 | "hasNotificationSound": true, |
diff --git a/recipes/nextcloud/webview.js b/recipes/nextcloud/webview.js index cb13e02..e42f10a 100644 --- a/recipes/nextcloud/webview.js +++ b/recipes/nextcloud/webview.js | |||
@@ -1,13 +1,21 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
1 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | const direct = document.querySelector( | 9 | const direct = document |
4 | '#header-menu-notifications, .notifications' | 10 | .querySelector('#header-menu-notifications, .notifications') |
5 | ).querySelectorAll( | 11 | .querySelectorAll( |
6 | '.notification-container .notification-wrapper .notification' | 12 | '.notification-container .notification-wrapper .notification', |
7 | ).length; | 13 | ).length; |
8 | 14 | ||
9 | Ferdium.setBadge(direct); | 15 | Ferdium.setBadge(direct); |
10 | }; | 16 | }; |
11 | 17 | ||
12 | Ferdium.loop(getMessages); | 18 | Ferdium.loop(getMessages); |
19 | |||
20 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
13 | }; | 21 | }; |