diff options
Diffstat (limited to 'recipes/webex-teams')
-rw-r--r-- | recipes/webex-teams/README.md | 3 | ||||
-rw-r--r-- | recipes/webex-teams/icon.png | bin | 0 -> 55062 bytes | |||
-rw-r--r-- | recipes/webex-teams/icon.svg | 1 | ||||
-rw-r--r-- | recipes/webex-teams/index.js | 1 | ||||
-rw-r--r-- | recipes/webex-teams/package.json | 14 | ||||
-rw-r--r-- | recipes/webex-teams/webview.js | 22 |
6 files changed, 41 insertions, 0 deletions
diff --git a/recipes/webex-teams/README.md b/recipes/webex-teams/README.md new file mode 100644 index 0000000..c928ff8 --- /dev/null +++ b/recipes/webex-teams/README.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # Webex Teams for Ferdi | ||
2 | |||
3 | This is a Ferdi recipe for Cisco Webex Teams. \ No newline at end of file | ||
diff --git a/recipes/webex-teams/icon.png b/recipes/webex-teams/icon.png new file mode 100644 index 0000000..02514ae --- /dev/null +++ b/recipes/webex-teams/icon.png | |||
Binary files differ | |||
diff --git a/recipes/webex-teams/icon.svg b/recipes/webex-teams/icon.svg new file mode 100644 index 0000000..944fdad --- /dev/null +++ b/recipes/webex-teams/icon.svg | |||
@@ -0,0 +1 @@ | |||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#6ebe4a;}.cls-3{fill:#d541d8;}.cls-4{fill:#fbab18;}.cls-5{fill:#005073;}.cls-6{fill:#ff3d67;}.cls-7{fill:#00bceb;}</style></defs><title>WebexTeams_Icon_CB01</title><circle class="cls-1" cx="51.95" cy="53.05" r="36.47"/><path class="cls-2" d="M82.89,21.92A43,43,0,0,0,71,13.41,43.11,43.11,0,0,1,13.34,70.93a42.9,42.9,0,0,0,8.15,11.52l.37.37a43.11,43.11,0,0,0,61-60.9Z"/><path class="cls-3" d="M22.08,31.7A9.56,9.56,0,0,1,15.3,15.38,52.3,52.3,0,0,1,52.5,0a9.57,9.57,0,1,1,0,19.13A33.28,33.28,0,0,0,28.85,28.9,9.54,9.54,0,0,1,22.08,31.7Z"/><path class="cls-4" d="M54.16.15a9.56,9.56,0,0,1-.47,18.9A33.55,33.55,0,0,1,86.05,52.5a9.48,9.48,0,0,1,19,0A52.5,52.5,0,0,0,54.16.15Z"/><path class="cls-5" d="M95.53,43.05a9.46,9.46,0,0,0-9.48,9.45A33.55,33.55,0,0,1,53.69,86a9.56,9.56,0,0,1,.47,18.9A52.5,52.5,0,0,0,105,52.5,9.46,9.46,0,0,0,95.53,43.05Z"/><path class="cls-6" d="M28,29.64A9.57,9.57,0,0,1,14.13,16.8a52.16,52.16,0,0,0,0,71.4A9.57,9.57,0,0,1,28,75.36a33.34,33.34,0,0,1,0-45.72Z"/><path class="cls-7" d="M52.5,105A52.3,52.3,0,0,1,15.3,89.62,9.57,9.57,0,0,1,28.85,76.1,33.28,33.28,0,0,0,52.5,85.87a9.57,9.57,0,1,1,0,19.13Z"/></svg> \ No newline at end of file | |||
diff --git a/recipes/webex-teams/index.js b/recipes/webex-teams/index.js new file mode 100644 index 0000000..415aeea --- /dev/null +++ b/recipes/webex-teams/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdi => Ferdi; \ No newline at end of file | |||
diff --git a/recipes/webex-teams/package.json b/recipes/webex-teams/package.json new file mode 100644 index 0000000..170ba50 --- /dev/null +++ b/recipes/webex-teams/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "webex-teams", | ||
3 | "name": "Webex Teams", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Cisco Webex Teams", | ||
6 | "main": "index.js", | ||
7 | "author": "Rok Bertoncelj <rok.bertoncelj@gmail.com>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://web.webex.com", | ||
11 | "hasNotificationSound": true, | ||
12 | "hasDirectMessages": true | ||
13 | } | ||
14 | } | ||
diff --git a/recipes/webex-teams/webview.js b/recipes/webex-teams/webview.js new file mode 100644 index 0000000..bcce61b --- /dev/null +++ b/recipes/webex-teams/webview.js | |||
@@ -0,0 +1,22 @@ | |||
1 | module.exports = (Franz) => { | ||
2 | const getMessages = function getMessages() { | ||
3 | let count = 0; | ||
4 | |||
5 | let span = document.getElementsByClassName('navigation-list-item--badgeCount'); | ||
6 | |||
7 | if (span.length == 0) { | ||
8 | span = document.getElementsByClassName('navigation-list-item--badgeCount-minimized'); | ||
9 | } | ||
10 | |||
11 | if (span.length > 0) { | ||
12 | count = parseInt(span[0].innerText, 10) | ||
13 | } | ||
14 | |||
15 | if (Number.isNaN(count)) { | ||
16 | count = 0; | ||
17 | } | ||
18 | |||
19 | Franz.setBadge(count); | ||
20 | }; | ||
21 | Franz.loop(getMessages); | ||
22 | }; \ No newline at end of file | ||