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 --- all.json | 2 +- archives/github.tar.gz | Bin 34792 -> 34833 bytes uncompressed/github/package.json | 7 +++++-- uncompressed/github/webview.js | 8 ++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/all.json b/all.json index 1d4a784..9a66d88 100644 --- a/all.json +++ b/all.json @@ -191,7 +191,7 @@ "featured": false, "id": "github", "name": "GitHub", - "version": "1.0.1", + "version": "1.0.3", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/github/icon.png", "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 0800001..c60e5f2 100644 Binary files a/archives/github.tar.gz and b/archives/github.tar.gz differ 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