aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/github/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'uncompressed/github/webview.js')
-rw-r--r--uncompressed/github/webview.js14
1 files changed, 12 insertions, 2 deletions
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
3module.exports = Franz => { 3module.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