diff options
author | 2020-10-07 21:21:55 +0700 | |
---|---|---|
committer | 2020-10-07 15:21:55 +0100 | |
commit | 3272d41820aae2e5d17413de523bc09c0b49d59f (patch) | |
tree | 163e158ac75b8831378f9addc900d4e6854a3449 /recipes/youtrack/webview.js | |
parent | Merge pull request #311 from getferdi/add-some-recipes (diff) | |
download | ferdium-recipes-3272d41820aae2e5d17413de523bc09c0b49d59f.tar.gz ferdium-recipes-3272d41820aae2e5d17413de523bc09c0b49d59f.tar.zst ferdium-recipes-3272d41820aae2e5d17413de523bc09c0b49d59f.zip |
Add recipe for YouTrack (#318)
Diffstat (limited to 'recipes/youtrack/webview.js')
-rw-r--r-- | recipes/youtrack/webview.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/recipes/youtrack/webview.js b/recipes/youtrack/webview.js new file mode 100644 index 0000000..2c53f1d --- /dev/null +++ b/recipes/youtrack/webview.js | |||
@@ -0,0 +1,14 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | var _path = _interopRequireDefault(require("path")); | ||
4 | |||
5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
6 | |||
7 | module.exports = Ferdi => { | ||
8 | const getMessages = function getMessages() { | ||
9 | const unread = document.querySelectorAll('.header__bell-wrapper_unread'); | ||
10 | Ferdi.setBadge(unread.length>0 ? 1 : 0); | ||
11 | }; | ||
12 | |||
13 | Ferdi.loop(getMessages); | ||
14 | }; | ||