From 6b9c3196193df37fa8fe25005aded6e01e61a07c Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Sun, 12 Sep 2021 08:46:35 +0530 Subject: New recipe: 'producthunt' (#687) --- recipes/producthunt/icon.svg | 1 + recipes/producthunt/index.js | 1 + recipes/producthunt/package.json | 11 +++++++++++ recipes/producthunt/webview.js | 7 +++++++ 4 files changed, 20 insertions(+) create mode 100644 recipes/producthunt/icon.svg create mode 100644 recipes/producthunt/index.js create mode 100644 recipes/producthunt/package.json create mode 100644 recipes/producthunt/webview.js (limited to 'recipes/producthunt') diff --git a/recipes/producthunt/icon.svg b/recipes/producthunt/icon.svg new file mode 100644 index 0000000..c77d20b --- /dev/null +++ b/recipes/producthunt/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/producthunt/index.js b/recipes/producthunt/index.js new file mode 100644 index 0000000..7af3013 --- /dev/null +++ b/recipes/producthunt/index.js @@ -0,0 +1 @@ +module.exports = Ferdi => Ferdi diff --git a/recipes/producthunt/package.json b/recipes/producthunt/package.json new file mode 100644 index 0000000..293f110 --- /dev/null +++ b/recipes/producthunt/package.json @@ -0,0 +1,11 @@ +{ + "id": "producthunt", + "name": "Product Hunt", + "version": "1.0.0", + "license": "MIT", + "repository": "https://github.com/alexdevero/franz-producthunt-recipe", + "config": { + "serviceURL": "https://www.producthunt.com/", + "hasIndirectMessages": true + } +} diff --git a/recipes/producthunt/webview.js b/recipes/producthunt/webview.js new file mode 100644 index 0000000..69dcc95 --- /dev/null +++ b/recipes/producthunt/webview.js @@ -0,0 +1,7 @@ +module.exports = (Ferdi) => { + const getMessages = function getMessages() { + Ferdi.setBadge(document.querySelector('[class*=header_] [class*=content_] [class*=actions_] [class*=notificationsButton_]').innerText) + } + + Ferdi.loop(getMessages) +} -- cgit v1.2.3-70-g09d2