diff options
Diffstat (limited to 'recipes/sogo')
-rw-r--r-- | recipes/sogo/icon.svg | 20 | ||||
-rw-r--r-- | recipes/sogo/index.js | 1 | ||||
-rw-r--r-- | recipes/sogo/package.json | 10 | ||||
-rw-r--r-- | recipes/sogo/webview.js | 20 |
4 files changed, 51 insertions, 0 deletions
diff --git a/recipes/sogo/icon.svg b/recipes/sogo/icon.svg new file mode 100644 index 0000000..80b0994 --- /dev/null +++ b/recipes/sogo/icon.svg | |||
@@ -0,0 +1,20 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Generator: Adobe Illustrator 28.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
3 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
4 | viewBox="0 0 464 464" style="enable-background:new 0 0 464 464;" xml:space="preserve"> | ||
5 | <style type="text/css"> | ||
6 | .st0{fill:#50BD37;} | ||
7 | </style> | ||
8 | <g> | ||
9 | <g> | ||
10 | <g> | ||
11 | <path class="st0" d="M231.9,288.4c-32.9,0-56.3-24.1-56.3-56.4c0-32.3,23.4-56.4,56.3-56.4c33.2,0,56.5,24.1,56.5,56.4 | ||
12 | C288.4,264.3,265,288.4,231.9,288.4z M231.8,120.4c-65.1,0-111.4,47.6-111.4,111.6c0,63.9,46.3,111.6,111.4,111.6 | ||
13 | c65.6,0,111.8-47.6,111.8-111.6C343.6,168.1,297.3,120.4,231.8,120.4z M231.7,401.4c-98.9,0-169.1-72.3-169.1-169.4 | ||
14 | c0-97.1,70.2-169.4,169.1-169.4c99.5,0,169.7,72.3,169.7,169.4C401.4,329.1,331.2,401.4,231.7,401.4z M231.5,0 | ||
15 | C96.2,0,0,99.1,0,232C0,365,96.2,464,231.5,464C367.8,464,464,365,464,232C464,99.1,367.8,0,231.5,0z"/> | ||
16 | </g> | ||
17 | </g> | ||
18 | </g> | ||
19 | <script id="bw-fido2-page-script" xmlns=""></script> | ||
20 | </svg> | ||
diff --git a/recipes/sogo/index.js b/recipes/sogo/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/sogo/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdium => Ferdium; | |||
diff --git a/recipes/sogo/package.json b/recipes/sogo/package.json new file mode 100644 index 0000000..b7e6656 --- /dev/null +++ b/recipes/sogo/package.json | |||
@@ -0,0 +1,10 @@ | |||
1 | { | ||
2 | "id": "sogo", | ||
3 | "name": "SOGo", | ||
4 | "version": "1.0.0", | ||
5 | "license": "MIT", | ||
6 | "config": { | ||
7 | "hasCustomUrl": true, | ||
8 | "hasNotificationSound": true | ||
9 | } | ||
10 | } | ||
diff --git a/recipes/sogo/webview.js b/recipes/sogo/webview.js new file mode 100644 index 0000000..158fcb6 --- /dev/null +++ b/recipes/sogo/webview.js | |||
@@ -0,0 +1,20 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | ||
8 | const getMessages = () => { | ||
9 | let count = 0; | ||
10 | for (const e of document.querySelectorAll('.sg-counter-badge')) { | ||
11 | if (e.textContent && e.textContent !== '') { | ||
12 | count += Number.parseInt(e.textContent); | ||
13 | } | ||
14 | } | ||
15 | Ferdium.setBadge(count, 0); | ||
16 | }; | ||
17 | Ferdium.loop(getMessages); | ||
18 | |||
19 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
20 | }; | ||