diff options
Diffstat (limited to 'recipes/nextcloud-news')
-rw-r--r-- | recipes/nextcloud-news/service.css | 16 | ||||
-rw-r--r-- | recipes/nextcloud-news/webview.js | 6 |
2 files changed, 16 insertions, 6 deletions
diff --git a/recipes/nextcloud-news/service.css b/recipes/nextcloud-news/service.css index 4974300..ea90cc9 100644 --- a/recipes/nextcloud-news/service.css +++ b/recipes/nextcloud-news/service.css | |||
@@ -1,12 +1,20 @@ | |||
1 | /* Hide all app links and contacts menu link in the top menu except for | 1 | /* Hide all app links and contacts menu link in the top menu except for |
2 | News */ | 2 | News */ |
3 | #appmenu li:not([data-id="news"]), #contactsmenu {display: none;} | 3 | #appmenu li:not([data-id='news']), |
4 | #contactsmenu { | ||
5 | display: none; | ||
6 | } | ||
4 | 7 | ||
5 | /* Change the cursor to the default for Nextcloud home, News and settings | 8 | /* Change the cursor to the default for Nextcloud home, News and settings |
6 | links in the top menu and disable them */ | 9 | links in the top menu and disable them */ |
7 | #nextcloud, #appmenu li[data-id="news"] a, #settings { | 10 | #nextcloud, |
8 | cursor: default; pointer-events: none; | 11 | #appmenu li[data-id='news'] a, |
12 | #settings { | ||
13 | cursor: default; | ||
14 | pointer-events: none; | ||
9 | } | 15 | } |
10 | 16 | ||
11 | /* Hide "More" link in the top menu */ | 17 | /* Hide "More" link in the top menu */ |
12 | #more-apps {display: none !important;} | 18 | #more-apps { |
19 | display: none !important; | ||
20 | } | ||
diff --git a/recipes/nextcloud-news/webview.js b/recipes/nextcloud-news/webview.js index 048ac7d..7c1c65c 100644 --- a/recipes/nextcloud-news/webview.js +++ b/recipes/nextcloud-news/webview.js | |||
@@ -1,13 +1,15 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
4 | 6 | ||
5 | module.exports = Ferdi => { | 7 | module.exports = Ferdi => { |
6 | const getMessages = () => { | 8 | const getMessages = () => { |
7 | const selector = document.querySelector( | 9 | const selector = document.querySelector( |
8 | '.subscriptions-feed .app-navigation-entry-utils-counter', | 10 | '.subscriptions-feed .app-navigation-entry-utils-counter', |
9 | ); | 11 | ); |
10 | const direct = selector ? Ferdi.safeParseInt(selector.innerText) : 0; | 12 | const direct = selector ? Ferdi.safeParseInt(selector.textContent) : 0; |
11 | 13 | ||
12 | Ferdi.setBadge(direct); | 14 | Ferdi.setBadge(direct); |
13 | }; | 15 | }; |