aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes/nextcloud-calendar/service.css5
-rw-r--r--recipes/nextcloud-calendar/webview.js13
2 files changed, 10 insertions, 8 deletions
diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css
index 833d5a8..634a959 100644
--- a/recipes/nextcloud-calendar/service.css
+++ b/recipes/nextcloud-calendar/service.css
@@ -10,3 +10,8 @@ settings links and disable them */
10 10
11/* Hide "More" link in the top menu */ 11/* Hide "More" link in the top menu */
12#more-apps {display: none !important;} 12#more-apps {display: none !important;}
13
14/* Hide notifications that are not related to calendar */
15.notifications .notification-wrapper .notification:not([object_type="dav"]) {
16 display: none;
17}
diff --git a/recipes/nextcloud-calendar/webview.js b/recipes/nextcloud-calendar/webview.js
index 53496fe..e36a9d4 100644
--- a/recipes/nextcloud-calendar/webview.js
+++ b/recipes/nextcloud-calendar/webview.js
@@ -6,18 +6,15 @@ function _interopRequireDefault(obj) {
6 return obj && obj.__esModule ? obj : {default: obj}; 6 return obj && obj.__esModule ? obj : {default: obj};
7} 7}
8 8
9module.exports = Franz => { 9module.exports = Ferdi => {
10 const getMessages = function getMessages() { 10 const getMessages = function getMessages() {
11 const direct = document.querySelectorAll( 11 const direct = document.querySelectorAll(
12 '.app-navigation-entry-utils-counter.highlighted' 12 '.notifications .notification-wrapper .notification[object_type="dav"]'
13 ).length;
14 const indirect = document.querySelectorAll(
15 '.app-navigation-entry-utils-counter:not(.highlighted)'
16 ).length; 13 ).length;
17 14
18 Franz.setBadge(direct, indirect); 15 Ferdi.setBadge(direct);
19 }; 16 };
20 17
21 Franz.loop(getMessages); 18 Ferdi.loop(getMessages);
22 Franz.injectCSS(_path.default.join(__dirname, 'service.css')); 19 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
23}; 20};