diff options
Diffstat (limited to 'recipes/github')
-rw-r--r-- | recipes/github/index.js | 4 | ||||
-rw-r--r-- | recipes/github/webview.js | 17 |
2 files changed, 8 insertions, 13 deletions
diff --git a/recipes/github/index.js b/recipes/github/index.js index 5c2d144..6889e69 100644 --- a/recipes/github/index.js +++ b/recipes/github/index.js | |||
@@ -1,4 +1,2 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; | 1 | module.exports = Franz => Franz; |
4 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdpdGh1Yi9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQU9DLE9BQVAsR0FBaUJDLFNBQVNBLEtBQTFCIiwiZmlsZSI6ImdpdGh1Yi9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gRnJhbnogPT4gRnJhbno7XG4iXX0= \ No newline at end of file | 2 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdpdGh1Yi9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQU9DLE9BQVAsR0FBaUJDLFNBQVNBLEtBQTFCIiwiZmlsZSI6ImdpdGh1Yi9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gRnJhbnogPT4gRnJhbno7XG4iXX0= |
diff --git a/recipes/github/webview.js b/recipes/github/webview.js index c3e8729..3b5a286 100644 --- a/recipes/github/webview.js +++ b/recipes/github/webview.js | |||
@@ -1,20 +1,17 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | 1 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
5 | const directCountElement = document.querySelector('.filter-list .count'); | 3 | const directCountElement = document.querySelector('.filter-list .count'); |
6 | const indirectCountElement = document.querySelector('[class*="mail-status unread"]') | 4 | const indirectCountElement = document.querySelector('[class*="mail-status unread"]'); |
7 | let directCount, indirectCount | 5 | let directCount; |
6 | let indirectCount; | ||
8 | if (directCountElement) { | 7 | if (directCountElement) { |
9 | directCount = parseInt(directCountElement.innerHTML, 10); | 8 | directCount = parseInt(directCountElement.innerHTML, 10); |
10 | } else { | 9 | } else if (indirectCountElement) { |
11 | if (indirectCountElement) { | 10 | indirectCount = 1; |
12 | indirectCount = 1; | ||
13 | } | ||
14 | } | 11 | } |
15 | Franz.setBadge(directCount, indirectCount); | 12 | Franz.setBadge(directCount, indirectCount); |
16 | }; | 13 | }; |
17 | 14 | ||
18 | Franz.loop(getMessages); | 15 | Franz.loop(getMessages); |
19 | } | 16 | }; |
20 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJnaXRodWIvd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= \ No newline at end of file | 17 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJnaXRodWIvd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= |