From b5ee4c5549125c1fdc61ad3f0f19f759f6bb5647 Mon Sep 17 00:00:00 2001 From: "Tania R. Zúñiga" <25267490+TanZng@users.noreply.github.com> Date: Wed, 13 Oct 2021 18:39:13 -0500 Subject: Add Dropbox recipe #369 (#739) --- all.json | 9 +++++++++ recipes/dropbox/icon.svg | 8 ++++++++ recipes/dropbox/index.js | 1 + recipes/dropbox/package.json | 10 ++++++++++ recipes/dropbox/service.css | 1 + recipes/dropbox/webview.js | 16 ++++++++++++++++ 6 files changed, 45 insertions(+) create mode 100644 recipes/dropbox/icon.svg create mode 100644 recipes/dropbox/index.js create mode 100644 recipes/dropbox/package.json create mode 100644 recipes/dropbox/service.css create mode 100644 recipes/dropbox/webview.js diff --git a/all.json b/all.json index c94110d..9c11887 100644 --- a/all.json +++ b/all.json @@ -320,6 +320,15 @@ "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/dockerhub/icon.svg" } }, + { + "featured": false, + "id": "dropbox", + "name": "Dropbox", + "version": "1.0.0", + "icons": { + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/dropbox/icon.svg" + } + }, { "featured": false, "id": "easy-redmine", diff --git a/recipes/dropbox/icon.svg b/recipes/dropbox/icon.svg new file mode 100644 index 0000000..1933e14 --- /dev/null +++ b/recipes/dropbox/icon.svg @@ -0,0 +1,8 @@ + + Dropbox-svg + + + \ No newline at end of file diff --git a/recipes/dropbox/index.js b/recipes/dropbox/index.js new file mode 100644 index 0000000..325d5ec --- /dev/null +++ b/recipes/dropbox/index.js @@ -0,0 +1 @@ +module.exports = (Ferdi) => class Dropbox extends Ferdi {}; diff --git a/recipes/dropbox/package.json b/recipes/dropbox/package.json new file mode 100644 index 0000000..f8df28b --- /dev/null +++ b/recipes/dropbox/package.json @@ -0,0 +1,10 @@ +{ + "id": "dropbox", + "name": "Dropbox", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.dropbox.com/home", + "hasIndirectMessages": true + } +} diff --git a/recipes/dropbox/service.css b/recipes/dropbox/service.css new file mode 100644 index 0000000..38dcab0 --- /dev/null +++ b/recipes/dropbox/service.css @@ -0,0 +1 @@ +/* Insert custom styles you want to insert here */ \ No newline at end of file diff --git a/recipes/dropbox/webview.js b/recipes/dropbox/webview.js new file mode 100644 index 0000000..0cfbc7d --- /dev/null +++ b/recipes/dropbox/webview.js @@ -0,0 +1,16 @@ +var _path = _interopRequireDefault(require("path")); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +module.exports = (Ferdi) => { + const getMessages = () => { + const hasNotifications = document.querySelector(".dig-NotificationBadge"); + + Ferdi.setBadge(0, hasNotifications ? 1 : 0); + }; + Ferdi.loop(getMessages); + + Ferdi.injectCSS(_path.default.join(__dirname, "service.css")); +}; -- cgit v1.2.3-54-g00ecf