aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/clubhouse/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/clubhouse/webview.js')
-rw-r--r--recipes/clubhouse/webview.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/recipes/clubhouse/webview.js b/recipes/clubhouse/webview.js
index bcb0281..d75dc37 100644
--- a/recipes/clubhouse/webview.js
+++ b/recipes/clubhouse/webview.js
@@ -1,8 +1,18 @@
1module.exports = (Ferdium) => { 1function _interopRequireDefault(obj) {
2 return obj && obj.__esModule ? obj : { default: obj };
3}
4
5const _path = _interopRequireDefault(require('path'));
6
7module.exports = Ferdium => {
2 const getMessages = () => { 8 const getMessages = () => {
3 const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible'); 9 const hasNotifications = document
10 .querySelector('#notifications-link .badge')
11 .classList.contains('visible');
4 Ferdium.setBadge(0, hasNotifications ? 1 : 0); 12 Ferdium.setBadge(0, hasNotifications ? 1 : 0);
5 } 13 };
6 14
7 Ferdium.loop(getMessages); 15 Ferdium.loop(getMessages);
16
17 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
8}; 18};