diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/github/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/github/webview.js')
-rw-r--r-- | recipes/github/webview.js | 17 |
1 files changed, 7 insertions, 10 deletions
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= |