diff options
-rw-r--r-- | recipes/google-groups/icon.svg | 1 | ||||
-rw-r--r-- | recipes/google-groups/index.js | 1 | ||||
-rw-r--r-- | recipes/google-groups/package.json | 9 | ||||
-rw-r--r-- | recipes/google-groups/webview.js | 19 |
4 files changed, 30 insertions, 0 deletions
diff --git a/recipes/google-groups/icon.svg b/recipes/google-groups/icon.svg new file mode 100644 index 0000000..553c8ab --- /dev/null +++ b/recipes/google-groups/icon.svg | |||
@@ -0,0 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="480px" height="480px"><path fill="#CFD8DC" d="M39,6H9C7.343,6,6,7.343,6,9v33l8.556-7H39c1.656,0,3-1.344,3-3V9C42,7.343,40.656,6,39,6z"/><path fill="#42A5F5" d="M12,9h24c1.656,0,3,1.343,3,3v30L27,32H12c-1.657,0-3-1.344-3-3V12C9,10.343,10.343,9,12,9z"/><path fill="#BBDEFB" d="M31 19c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2S31 17.896 31 19M33 24.667c0 0-1.107-2.667-4-2.667s-4 2.667-4 2.667V26h8V24.667z"/><g><path fill="#E3F2FD" d="M24 17c0 1.656-1.343 3-3 3s-3-1.344-3-3 1.343-3 3-3S24 15.344 24 17M27 24.334c0 0-1.66-3.334-6-3.334s-6 3.334-6 3.334V26h12V24.334z"/></g></svg> \ No newline at end of file | |||
diff --git a/recipes/google-groups/index.js b/recipes/google-groups/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/google-groups/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdium => Ferdium; | |||
diff --git a/recipes/google-groups/package.json b/recipes/google-groups/package.json new file mode 100644 index 0000000..7628fbf --- /dev/null +++ b/recipes/google-groups/package.json | |||
@@ -0,0 +1,9 @@ | |||
1 | { | ||
2 | "id": "google-groups", | ||
3 | "name": "Google Groups", | ||
4 | "version": "1.0.0", | ||
5 | "license": "MIT", | ||
6 | "config": { | ||
7 | "serviceURL": "https://groups.google.com" | ||
8 | } | ||
9 | } | ||
diff --git a/recipes/google-groups/webview.js b/recipes/google-groups/webview.js new file mode 100644 index 0000000..7006eef --- /dev/null +++ b/recipes/google-groups/webview.js | |||
@@ -0,0 +1,19 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { | ||
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
6 | |||
7 | module.exports = Ferdium => { | ||
8 | const getMessages = () => { | ||
9 | let countImportant = 0; | ||
10 | const unReadConversationCount = document.querySelectorAll('.NHlkZc'); | ||
11 | if (unReadConversationCount.length > 0) { | ||
12 | countImportant = Ferdium.safeParseInt(unReadConversationCount[0].textContent); | ||
13 | } | ||
14 | Ferdium.setBadge(countImportant, 0); | ||
15 | }; | ||
16 | Ferdium.loop(getMessages); | ||
17 | |||
18 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
19 | }; | ||