diff options
author | 2021-10-08 10:03:42 -0500 | |
---|---|---|
committer | 2021-10-08 20:33:42 +0530 | |
commit | 0d1b7496271979557f9e979bc7d5cbec5b73d5f2 (patch) | |
tree | 30ce98b383b6ae2d4a906a745a305741e700efe0 /recipes/meetup/webview.js | |
parent | fix: discord does not show notifications (#734) (diff) | |
download | ferdium-recipes-0d1b7496271979557f9e979bc7d5cbec5b73d5f2.tar.gz ferdium-recipes-0d1b7496271979557f9e979bc7d5cbec5b73d5f2.tar.zst ferdium-recipes-0d1b7496271979557f9e979bc7d5cbec5b73d5f2.zip |
Diffstat (limited to 'recipes/meetup/webview.js')
-rw-r--r-- | recipes/meetup/webview.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes/meetup/webview.js b/recipes/meetup/webview.js new file mode 100644 index 0000000..b8ba1fa --- /dev/null +++ b/recipes/meetup/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 hasNotifications = document.querySelector(".counterBadge"); | ||
10 | |||
11 | Ferdi.setBadge(0, hasNotifications ? 1 : 0); | ||
12 | }; | ||
13 | Ferdi.loop(getMessages); | ||
14 | |||
15 | Ferdi.injectCSS(_path.default.join(__dirname, "service.css")); | ||
16 | }; | ||