From 11edb6e00385b1a0accddf7651610d71510bd779 Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Sun, 26 Jun 2022 05:12:16 +0530 Subject: New recipe: 'pushover' (#80) --- recipes/pushover/icon.svg | 7 +++++++ recipes/pushover/index.js | 1 + recipes/pushover/package.json | 14 ++++++++++++++ recipes/pushover/webview.js | 16 ++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 recipes/pushover/icon.svg create mode 100644 recipes/pushover/index.js create mode 100644 recipes/pushover/package.json create mode 100644 recipes/pushover/webview.js (limited to 'recipes') diff --git a/recipes/pushover/icon.svg b/recipes/pushover/icon.svg new file mode 100644 index 0000000..35250c1 --- /dev/null +++ b/recipes/pushover/icon.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/recipes/pushover/index.js b/recipes/pushover/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/pushover/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/pushover/package.json b/recipes/pushover/package.json new file mode 100644 index 0000000..9616852 --- /dev/null +++ b/recipes/pushover/package.json @@ -0,0 +1,14 @@ +{ + "id": "pushover", + "name": "Pushover", + "version": "1.0.0", + "license": "MIT", + "repository": "https://github.com/jdwhite/franz-recipe-pushover", + "config": { + "serviceURL": "https://client.pushover.net", + "hasNotificationSound": true, + "hasDirectMessages": true, + "hasIndirectMessages": false, + "hasTeamId": false + } +} diff --git a/recipes/pushover/webview.js b/recipes/pushover/webview.js new file mode 100644 index 0000000..b37b9e4 --- /dev/null +++ b/recipes/pushover/webview.js @@ -0,0 +1,16 @@ +const _path = _interopRequireDefault(require('path')); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +module.exports = Ferdium => { + const getMessages = () => { + const totalMessages = document.querySelector('#app_0 > div.app_counter').innerHTML; + Ferdium.setBadge(totalMessages); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; -- cgit v1.2.3-54-g00ecf