From 2f926c9a2b5bb8f46809e88215859506e80c510e Mon Sep 17 00:00:00 2001 From: Jake Lee Date: Mon, 13 Apr 2020 15:46:42 +0100 Subject: Updates Nextdoor to 1.0.1: Fixes notification disappearing --- uncompressed/nextdoor/README.md | 6 +++++- uncompressed/nextdoor/package.json | 2 +- uncompressed/nextdoor/webview.js | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'uncompressed') diff --git a/uncompressed/nextdoor/README.md b/uncompressed/nextdoor/README.md index c137e14..f1fec15 100644 --- a/uncompressed/nextdoor/README.md +++ b/uncompressed/nextdoor/README.md @@ -1,5 +1,9 @@ # Nextdoor for Ferdi This is the unofficial Ferdi recipe for Nextdoor +### Release notes +1.0.1: Fixes notification not disappearing. +1.0.0: First version + ### How to create your own Ferdi recipes: -* [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) +* [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) \ No newline at end of file diff --git a/uncompressed/nextdoor/package.json b/uncompressed/nextdoor/package.json index e7789c6..93dabb8 100644 --- a/uncompressed/nextdoor/package.json +++ b/uncompressed/nextdoor/package.json @@ -1,7 +1,7 @@ { "id": "nextdoor", "name": "Nextdoor", - "version": "1.0.0", + "version": "1.0.1", "description": "Nextdoor", "main": "index.js", "author": "Jake Lee ", diff --git a/uncompressed/nextdoor/webview.js b/uncompressed/nextdoor/webview.js index c17e99d..e20c6b5 100644 --- a/uncompressed/nextdoor/webview.js +++ b/uncompressed/nextdoor/webview.js @@ -2,7 +2,11 @@ module.exports = Franz => { const getMessages = function getMessages() { - const unread = document.getElementsByClassName('notification-badge')[0].innerText; + var unread = 0 + const notificationBadge = document.getElementsByClassName('notification-badge')[0] + if (notificationBadge != undefined) { + unread = notificationBadge.innerText; + } Franz.setBadge(parseInt(unread, 10)); }; -- cgit v1.2.3-54-g00ecf