diff options
author | 2020-09-22 20:56:48 +0200 | |
---|---|---|
committer | 2020-09-22 19:56:48 +0100 | |
commit | 6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch) | |
tree | 9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /recipes/plurk/webview.js | |
parent | Updated logos for Outlook/OWA (diff) | |
download | ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip |
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'recipes/plurk/webview.js')
-rw-r--r-- | recipes/plurk/webview.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes/plurk/webview.js b/recipes/plurk/webview.js new file mode 100644 index 0000000..b20e0b3 --- /dev/null +++ b/recipes/plurk/webview.js | |||
@@ -0,0 +1,19 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | function getMessages() { | ||
5 | let direct = 0; | ||
6 | |||
7 | const np = document.querySelector('#noti_np_count'); | ||
8 | const re = document.querySelector('#noti_re_count'); | ||
9 | |||
10 | if (np || re) { | ||
11 | direct = parseInt(np.innerHTML) + parseInt(re.innerHTML); | ||
12 | } | ||
13 | |||
14 | Franz.setBadge(direct); | ||
15 | } | ||
16 | |||
17 | Franz.loop(getMessages, 10000); | ||
18 | }; | ||
19 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBsdXJrL3dlYnZpZXcuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56IiwiZ2V0TWVzc2FnZXMiLCJkaXJlY3QiLCJucCIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsInJlIiwicGFyc2VJbnQiLCJpbm5lckhUTUwiLCJzZ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