diff options
author | Amine <amine@mouafik.fr> | 2020-04-22 07:13:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-22 07:13:51 +0000 |
commit | 911d1ded846165a4b420efa2b58668ad27c9f2c7 (patch) | |
tree | 01d75a16ac89da73b6e28ce730a44ba0a0809f29 | |
parent | Switch back to original Telegram, add Telegram React (#132) (diff) | |
download | ferdium-recipes-911d1ded846165a4b420efa2b58668ad27c9f2c7.tar.gz ferdium-recipes-911d1ded846165a4b420efa2b58668ad27c9f2c7.tar.zst ferdium-recipes-911d1ded846165a4b420efa2b58668ad27c9f2c7.zip |
Use GitHub notifications center and direct notifications (#133)
-rw-r--r-- | all.json | 4 | ||||
-rw-r--r-- | archives/github.tar.gz | bin | 34953 -> 35062 bytes | |||
-rw-r--r-- | uncompressed/github/package.json | 8 | ||||
-rw-r--r-- | uncompressed/github/webview.js | 14 |
4 files changed, 18 insertions, 8 deletions
@@ -187,11 +187,11 @@ | |||
187 | } | 187 | } |
188 | }, | 188 | }, |
189 | { | 189 | { |
190 | "author": "Sudhir Ganesan", | 190 | "author": "Amine Mouafik", |
191 | "featured": false, | 191 | "featured": false, |
192 | "id": "github", | 192 | "id": "github", |
193 | "name": "GitHub", | 193 | "name": "GitHub", |
194 | "version": "1.0.4", | 194 | "version": "2.0.0", |
195 | "icons": { | 195 | "icons": { |
196 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/github/icon.png", | 196 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/github/icon.png", |
197 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/github/icon.svg" | 197 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/github/icon.svg" |
diff --git a/archives/github.tar.gz b/archives/github.tar.gz index 1cd9229..b582a1b 100644 --- a/archives/github.tar.gz +++ b/archives/github.tar.gz | |||
Binary files differ | |||
diff --git a/uncompressed/github/package.json b/uncompressed/github/package.json index 38ec914..535c1d9 100644 --- a/uncompressed/github/package.json +++ b/uncompressed/github/package.json | |||
@@ -1,15 +1,15 @@ | |||
1 | { | 1 | { |
2 | "id": "github", | 2 | "id": "github", |
3 | "name": "GitHub", | 3 | "name": "GitHub", |
4 | "version": "1.0.4", | 4 | "version": "2.0.0", |
5 | "description": "GitHub", | 5 | "description": "GitHub", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Sudhir Ganesan", | 7 | "author": "Amine Mouafik", |
8 | "license": "MIT", | 8 | "license": "MIT", |
9 | "config": { | 9 | "config": { |
10 | "serviceURL": "https://github.com/", | 10 | "serviceURL": "https://github.com/notifications", |
11 | "hasNotificationSound": false, | 11 | "hasNotificationSound": false, |
12 | "hasDirectMessages": false, | 12 | "hasDirectMessages": true, |
13 | "hasIndirectMessages": true | 13 | "hasIndirectMessages": true |
14 | } | 14 | } |
15 | } | 15 | } |
diff --git a/uncompressed/github/webview.js b/uncompressed/github/webview.js index 0543d1f..c3e8729 100644 --- a/uncompressed/github/webview.js +++ b/uncompressed/github/webview.js | |||
@@ -2,9 +2,19 @@ | |||
2 | 2 | ||
3 | module.exports = Franz => { | 3 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 4 | const getMessages = function getMessages() { |
5 | Franz.setBadge(document.querySelector('[class*="mail-status unread"]') !== null ? 1 : 0); | 5 | const directCountElement = document.querySelector('.filter-list .count'); |
6 | const indirectCountElement = document.querySelector('[class*="mail-status unread"]') | ||
7 | let directCount, indirectCount | ||
8 | if (directCountElement) { | ||
9 | directCount = parseInt(directCountElement.innerHTML, 10); | ||
10 | } else { | ||
11 | if (indirectCountElement) { | ||
12 | indirectCount = 1; | ||
13 | } | ||
14 | } | ||
15 | Franz.setBadge(directCount, indirectCount); | ||
6 | }; | 16 | }; |
7 | 17 | ||
8 | Franz.loop(0, getMessages); | 18 | Franz.loop(getMessages); |
9 | } | 19 | } |
10 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJnaXRodWIvd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= \ No newline at end of file | 20 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJnaXRodWIvd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= \ No newline at end of file |