diff options
Diffstat (limited to 'uncompressed')
-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 |
4 files changed, 13 insertions, 8 deletions
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 | }; |