diff options
author | Tania R. Zúñiga <25267490+TanZng@users.noreply.github.com> | 2021-10-15 12:00:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 22:30:24 +0530 |
commit | 9c2fd0f355d94aaef3f1ada5fc94c4e86da0a12e (patch) | |
tree | f16bafe14082be70b265181ee59fe62c810e14b5 /recipes/netlify/webview.js | |
parent | upgrade 'node' to '14.18.1' (#745) (diff) | |
download | ferdium-recipes-9c2fd0f355d94aaef3f1ada5fc94c4e86da0a12e.tar.gz ferdium-recipes-9c2fd0f355d94aaef3f1ada5fc94c4e86da0a12e.tar.zst ferdium-recipes-9c2fd0f355d94aaef3f1ada5fc94c4e86da0a12e.zip |
Add new service: Netlify (#746)
Diffstat (limited to 'recipes/netlify/webview.js')
-rw-r--r-- | recipes/netlify/webview.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes/netlify/webview.js b/recipes/netlify/webview.js new file mode 100644 index 0000000..9a74683 --- /dev/null +++ b/recipes/netlify/webview.js | |||
@@ -0,0 +1,16 @@ | |||
1 | var _path = _interopRequireDefault(require("path")); | ||
2 | |||
3 | function _interopRequireDefault(obj) { | ||
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
6 | |||
7 | module.exports = (Ferdi) => { | ||
8 | const getMessages = () => { | ||
9 | const notifications = document.querySelectorAll("circle"); | ||
10 | |||
11 | Ferdi.setBadge(0, notifications.length > 0 ? 1 : 0); | ||
12 | }; | ||
13 | Ferdi.loop(getMessages); | ||
14 | |||
15 | Ferdi.injectCSS(_path.default.join(__dirname, "service.css")); | ||
16 | }; | ||