diff options
author | 2019-11-15 16:34:27 +0100 | |
---|---|---|
committer | 2019-11-15 16:34:27 +0100 | |
commit | 67f193af924fcebacf59a99bb18ea8ab17718900 (patch) | |
tree | 25b950d519aad5ca11b79b5f4535f035dfee85b4 | |
parent | Serve recipe icons from recipe repo (diff) | |
download | ferdium-recipes-67f193af924fcebacf59a99bb18ea8ab17718900.tar.gz ferdium-recipes-67f193af924fcebacf59a99bb18ea8ab17718900.tar.zst ferdium-recipes-67f193af924fcebacf59a99bb18ea8ab17718900.zip |
Update GMail recipe
-rw-r--r-- | all.json | 2 | ||||
-rw-r--r-- | gmail.tar.gz | bin | 2174 -> 65356 bytes | |||
-rw-r--r-- | uncompressed/gmail/index.js | 5 | ||||
-rw-r--r-- | uncompressed/gmail/package.json | 2 | ||||
-rw-r--r-- | uncompressed/gmail/service.css | 3 | ||||
-rw-r--r-- | uncompressed/gmail/webview.js | 11 |
6 files changed, 14 insertions, 9 deletions
@@ -136,7 +136,7 @@ | |||
136 | "featured": false, | 136 | "featured": false, |
137 | "id": "gmail", | 137 | "id": "gmail", |
138 | "name": "Gmail", | 138 | "name": "Gmail", |
139 | "version": "1.1.1", | 139 | "version": "1.2.0", |
140 | "icons": { | 140 | "icons": { |
141 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/gmail/icon.png", | 141 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/gmail/icon.png", |
142 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/gmail/icon.svg" | 142 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/gmail/icon.svg" |
diff --git a/gmail.tar.gz b/gmail.tar.gz index e27cb2a..13eb348 100644 --- a/gmail.tar.gz +++ b/gmail.tar.gz | |||
Binary files differ | |||
diff --git a/uncompressed/gmail/index.js b/uncompressed/gmail/index.js index e8243fb..46f936f 100644 --- a/uncompressed/gmail/index.js +++ b/uncompressed/gmail/index.js | |||
@@ -1,3 +1,2 @@ | |||
1 | "use strict"; | 1 | // just pass through Franz |
2 | 2 | module.exports = Franz => Franz; | |
3 | module.exports = Franz => Franz; \ No newline at end of file | ||
diff --git a/uncompressed/gmail/package.json b/uncompressed/gmail/package.json index 9af00ed..7546d19 100644 --- a/uncompressed/gmail/package.json +++ b/uncompressed/gmail/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "gmail", | 2 | "id": "gmail", |
3 | "name": "Gmail", | 3 | "name": "Gmail", |
4 | "version": "1.1.1", | 4 | "version": "1.2.0", |
5 | "description": "Gmail", | 5 | "description": "Gmail", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
diff --git a/uncompressed/gmail/service.css b/uncompressed/gmail/service.css new file mode 100644 index 0000000..1af9dfd --- /dev/null +++ b/uncompressed/gmail/service.css | |||
@@ -0,0 +1,3 @@ | |||
1 | .UC.bAp.cd .vh { | ||
2 | display: none !important; | ||
3 | } \ No newline at end of file | ||
diff --git a/uncompressed/gmail/webview.js b/uncompressed/gmail/webview.js index 521d4ad..febf64b 100644 --- a/uncompressed/gmail/webview.js +++ b/uncompressed/gmail/webview.js | |||
@@ -1,6 +1,6 @@ | |||
1 | "use strict"; | 1 | import path from 'path'; |
2 | 2 | ||
3 | module.exports = Franz => { | 3 | module.exports = (Franz) => { |
4 | const getMessages = function getMessages() { | 4 | const getMessages = function getMessages() { |
5 | let count = 0; | 5 | let count = 0; |
6 | 6 | ||
@@ -10,14 +10,17 @@ module.exports = Franz => { | |||
10 | } | 10 | } |
11 | } | 11 | } |
12 | 12 | ||
13 | // Just incase we don't end up with a number, set it back to zero (parseInt can return NaN) | ||
13 | count = parseInt(count, 10); | 14 | count = parseInt(count, 10); |
14 | |||
15 | if (isNaN(count)) { | 15 | if (isNaN(count)) { |
16 | count = 0; | 16 | count = 0; |
17 | } | 17 | } |
18 | 18 | ||
19 | // set Franz badge | ||
19 | Franz.setBadge(count); | 20 | Franz.setBadge(count); |
20 | }; | 21 | }; |
21 | 22 | ||
23 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
24 | // check for new messages every second and update Franz badge | ||
22 | Franz.loop(getMessages); | 25 | Franz.loop(getMessages); |
23 | }; \ No newline at end of file | 26 | }; |