From 0f49db845a6b697739357beec7825714e56f252c Mon Sep 17 00:00:00 2001 From: Feiko Joosten Date: Tue, 21 Apr 2020 21:35:57 +0200 Subject: Adds notifications for GitHub (#129) * Added notifications for github. * Changed the notification count to use indirect notifications Changed the notification count to use indirect notifications instead of direct notifications --- uncompressed/github/package.json | 7 +++++-- uncompressed/github/webview.js | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'uncompressed') diff --git a/uncompressed/github/package.json b/uncompressed/github/package.json index b9e329c..ca82897 100644 --- a/uncompressed/github/package.json +++ b/uncompressed/github/package.json @@ -1,12 +1,15 @@ { "id": "github", "name": "GitHub", - "version": "1.0.1", + "version": "1.0.3", "description": "GitHub", "main": "index.js", "author": "Sudhir Ganesan", "license": "MIT", "config": { - "serviceURL": "https://github.com/" + "serviceURL": "https://github.com/", + "hasNotificationSound": false, + "hasDirectMessages": false, + "hasIndirectMessages": true } } diff --git a/uncompressed/github/webview.js b/uncompressed/github/webview.js index 0cd6361..0543d1f 100644 --- a/uncompressed/github/webview.js +++ b/uncompressed/github/webview.js @@ -1,2 +1,10 @@ "use strict"; + +module.exports = Franz => { + const getMessages = function getMessages() { + Franz.setBadge(document.querySelector('[class*="mail-status unread"]') !== null ? 1 : 0); + }; + + Franz.loop(0, getMessages); +} //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJnaXRodWIvd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= \ No newline at end of file -- cgit v1.2.3-70-g09d2