diff options
author | 2019-09-28 12:10:25 +0200 | |
---|---|---|
committer | 2019-09-28 12:10:25 +0200 | |
commit | 728d339739b63e9bb59e457e4a84fe9a65b93fc9 (patch) | |
tree | a0fc6180ea26fa9ef397458e8eb6491031d6437d /uncompressed/plurk/webview.js | |
parent | Add list of recipes (diff) | |
download | ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.gz ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.zst ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.zip |
Add uncompressed recipes
Diffstat (limited to 'uncompressed/plurk/webview.js')
-rw-r--r-- | uncompressed/plurk/webview.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/uncompressed/plurk/webview.js b/uncompressed/plurk/webview.js new file mode 100644 index 0000000..b20e0b3 --- /dev/null +++ b/uncompressed/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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBsdXJrL3dlYnZpZXcuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56IiwiZ2V0TWVzc2FnZXMiLCJkaXJlY3QiLCJucCIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsInJlIiwicGFyc2VJbnQiLCJpbm5lckhUTUwiLCJzZXRCYWRnZSIsImxvb3AiXSwibWFwcGluZ3MiOiI7O0F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