diff options
-rw-r--r-- | recipes/fleep/README.md | 3 | ||||
-rw-r--r-- | recipes/fleep/icon.png | bin | 0 -> 15196 bytes | |||
-rw-r--r-- | recipes/fleep/icon.svg | 4 | ||||
-rw-r--r-- | recipes/fleep/index.js | 2 | ||||
-rw-r--r-- | recipes/fleep/package.json | 12 | ||||
-rw-r--r-- | recipes/fleep/service.css | 1 | ||||
-rw-r--r-- | recipes/fleep/webview.js | 16 | ||||
-rwxr-xr-x | recipes/habitica/package.json | 2 | ||||
-rwxr-xr-x | recipes/habitica/webview.js | 16 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/package.json | 2 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/service.css | 9 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/webview.js | 13 | ||||
-rw-r--r-- | recipes/roundcube/package.json | 2 | ||||
-rw-r--r-- | recipes/roundcube/webview.js | 4 |
14 files changed, 72 insertions, 14 deletions
diff --git a/recipes/fleep/README.md b/recipes/fleep/README.md new file mode 100644 index 0000000..3ba1f3e --- /dev/null +++ b/recipes/fleep/README.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # Fleep for Ferdi | ||
2 | |||
3 | This is an unofficial Ferdi recipe for Fleep. | ||
diff --git a/recipes/fleep/icon.png b/recipes/fleep/icon.png new file mode 100644 index 0000000..80d4731 --- /dev/null +++ b/recipes/fleep/icon.png | |||
Binary files differ | |||
diff --git a/recipes/fleep/icon.svg b/recipes/fleep/icon.svg new file mode 100644 index 0000000..5604020 --- /dev/null +++ b/recipes/fleep/icon.svg | |||
@@ -0,0 +1,4 @@ | |||
1 | <svg width="1024" height="1024" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
2 | <path fill-rule="evenodd" clip-rule="evenodd" d="M21.2196 0H5.54713C2.48289 0 0 2.48289 0 5.54713V21.5466C0 24.6108 2.48289 27.0937 5.54713 27.0937H14.2796V31.0058L18.7488 27.0937H21.2196C24.2838 27.0937 26.7667 24.6108 26.7667 21.5466V5.54713C26.7546 2.48289 24.2717 0 21.2196 0Z" fill="#3E81DE"/> | ||
3 | <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5845 9.85889H16.6413V8.4176H12.7777V12.4266H16.7988V15.3212H12.7777V19.4876H14.4734V22.3823H7.83618V19.4876H9.37436V8.4176H7.83618V5.52292H19.5845V9.85889Z" fill="white"/> | ||
4 | </svg> | ||
diff --git a/recipes/fleep/index.js b/recipes/fleep/index.js new file mode 100644 index 0000000..8f5370b --- /dev/null +++ b/recipes/fleep/index.js | |||
@@ -0,0 +1,2 @@ | |||
1 | module.exports = Ferdi => class fleep extends Ferdi { | ||
2 | }; | ||
diff --git a/recipes/fleep/package.json b/recipes/fleep/package.json new file mode 100644 index 0000000..50ddc86 --- /dev/null +++ b/recipes/fleep/package.json | |||
@@ -0,0 +1,12 @@ | |||
1 | { | ||
2 | "id": "fleep", | ||
3 | "name": "Fleep", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Fleep", | ||
6 | "main": "index.js", | ||
7 | "author": "Ian Sealy <ferdi@iansealy.com>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://fleep.io/chat" | ||
11 | } | ||
12 | } | ||
diff --git a/recipes/fleep/service.css b/recipes/fleep/service.css new file mode 100644 index 0000000..38dcab0 --- /dev/null +++ b/recipes/fleep/service.css | |||
@@ -0,0 +1 @@ | |||
/* Insert custom styles you want to insert here */ \ No newline at end of file | |||
diff --git a/recipes/fleep/webview.js b/recipes/fleep/webview.js new file mode 100644 index 0000000..f3d765d --- /dev/null +++ b/recipes/fleep/webview.js | |||
@@ -0,0 +1,16 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | var _path = _interopRequireDefault(require("path")); | ||
4 | |||
5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
6 | |||
7 | module.exports = Ferdi => { | ||
8 | const getMessages = function getMessages() { | ||
9 | // Count number of conversations or teams with unread messages | ||
10 | let count = document.querySelectorAll(".unread-count").length; | ||
11 | Ferdi.setBadge(count, 0); | ||
12 | }; | ||
13 | |||
14 | Ferdi.loop(getMessages); | ||
15 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
16 | }; | ||
diff --git a/recipes/habitica/package.json b/recipes/habitica/package.json index 8fd53a1..688d3f2 100755 --- a/recipes/habitica/package.json +++ b/recipes/habitica/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "habitica", | 2 | "id": "habitica", |
3 | "name": "Habitica", | 3 | "name": "Habitica", |
4 | "version": "1.0.1", | 4 | "version": "1.0.2", |
5 | "description": "Habitica", | 5 | "description": "Habitica", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "license": "MIT", | 7 | "license": "MIT", |
diff --git a/recipes/habitica/webview.js b/recipes/habitica/webview.js index 17daa35..66633cb 100755 --- a/recipes/habitica/webview.js +++ b/recipes/habitica/webview.js | |||
@@ -1,3 +1,17 @@ | |||
1 | "use strict"; | 1 | "use strict"; |
2 | 2 | ||
3 | module.exports = Franz => Franz; | 3 | module.exports = (Franz) => { |
4 | const getMessages = () => { | ||
5 | let count = 0; | ||
6 | let element = document.querySelector(".message-count"); | ||
7 | if (element) { | ||
8 | count = Number(element.innerText); | ||
9 | if (Number.isNaN(count)) { | ||
10 | count = 0; | ||
11 | } | ||
12 | } | ||
13 | Franz.setBadge(count); | ||
14 | }; | ||
15 | |||
16 | Franz.loop(getMessages); | ||
17 | }; | ||
diff --git a/recipes/nextcloud-calendar/package.json b/recipes/nextcloud-calendar/package.json index ee23655..7b44cb1 100644 --- a/recipes/nextcloud-calendar/package.json +++ b/recipes/nextcloud-calendar/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "nextcloud-calendar", | 2 | "id": "nextcloud-calendar", |
3 | "name": "Nextcloud Calendar", | 3 | "name": "Nextcloud Calendar", |
4 | "version": "1.0.0", | 4 | "version": "1.0.1", |
5 | "description": "Ferdi recipe for Nextcloud Calendar.", | 5 | "description": "Ferdi recipe for Nextcloud Calendar.", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Edgars Andersons <Edgars+github@gaitenis.id.lv>", | 7 | "author": "Edgars Andersons <Edgars+github@gaitenis.id.lv>", |
diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css index 833d5a8..a0016ae 100644 --- a/recipes/nextcloud-calendar/service.css +++ b/recipes/nextcloud-calendar/service.css | |||
@@ -10,3 +10,12 @@ 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 | } | ||
18 | |||
19 | /* Hide "Dismiss all notifications" as this action will dismiss also hidden | ||
20 | notifications */ | ||
21 | .notification-wrapper .dismiss-all {display: none;} | ||
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 | ||
9 | module.exports = Franz => { | 9 | module.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 | }; |
diff --git a/recipes/roundcube/package.json b/recipes/roundcube/package.json index a9428dc..8ab0479 100644 --- a/recipes/roundcube/package.json +++ b/recipes/roundcube/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "roundcube", | 2 | "id": "roundcube", |
3 | "name": "Roundcube", | 3 | "name": "Roundcube", |
4 | "version": "1.0.0", | 4 | "version": "1.0.1", |
5 | "description": "Roundcube - Free and Open Source Webmail Software", | 5 | "description": "Roundcube - Free and Open Source Webmail Software", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Jonathan Juursema <dev@jonathanj.nl>", | 7 | "author": "Jonathan Juursema <dev@jonathanj.nl>", |
diff --git a/recipes/roundcube/webview.js b/recipes/roundcube/webview.js index 3ab6cf7..cdd025c 100644 --- a/recipes/roundcube/webview.js +++ b/recipes/roundcube/webview.js | |||
@@ -5,11 +5,11 @@ module.exports = Franz => { | |||
5 | let directElements = document.querySelectorAll('.unreadcount'); | 5 | let directElements = document.querySelectorAll('.unreadcount'); |
6 | let direct = 0; | 6 | let direct = 0; |
7 | for (let i = 0; i < directElements.length; i += 1) { | 7 | for (let i = 0; i < directElements.length; i += 1) { |
8 | n = parseInt(directElements[i].innerHTML); | 8 | let n = parseInt(directElements[i].innerHTML); |
9 | direct += isNaN(n) ? 0 : n; | 9 | direct += isNaN(n) ? 0 : n; |
10 | } | 10 | } |
11 | Franz.setBadge(direct); | 11 | Franz.setBadge(direct); |
12 | }; | 12 | }; |
13 | Franz.loop(getMessages); | 13 | Franz.loop(getMessages); |
14 | }; | 14 | }; |
15 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ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