diff options
author | 2021-09-12 16:22:08 +0530 | |
---|---|---|
committer | 2021-09-12 10:52:08 +0000 | |
commit | 149217d5c5d4ecda76f36833de8dffbbf72c8e19 (patch) | |
tree | fbb8a700de7d3fa4aaadab86c353e7c916fe6926 /recipes/drive/webview.js | |
parent | New recipe: 'coinbase' (#697) (diff) | |
download | ferdium-recipes-149217d5c5d4ecda76f36833de8dffbbf72c8e19.tar.gz ferdium-recipes-149217d5c5d4ecda76f36833de8dffbbf72c8e19.tar.zst ferdium-recipes-149217d5c5d4ecda76f36833de8dffbbf72c8e19.zip |
New recipe: 'drive' (#698)
Diffstat (limited to 'recipes/drive/webview.js')
-rw-r--r-- | recipes/drive/webview.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes/drive/webview.js b/recipes/drive/webview.js new file mode 100644 index 0000000..ed32d8e --- /dev/null +++ b/recipes/drive/webview.js | |||
@@ -0,0 +1,20 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
4 | |||
5 | module.exports = (Franz) => { | ||
6 | function getMessages() { | ||
7 | let direct = 0; | ||
8 | let indirect = 0; | ||
9 | const data = document.querySelector('#FranzMessages').dataset; | ||
10 | if (data) { | ||
11 | direct = data.direct; | ||
12 | indirect = data.indirect; | ||
13 | } | ||
14 | |||
15 | Franz.setBadge(direct, indirect); | ||
16 | } | ||
17 | |||
18 | Franz.loop(getMessages); | ||
19 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
20 | } | ||