diff options
Diffstat (limited to 'uncompressed/irccloud/webview.js')
-rw-r--r-- | uncompressed/irccloud/webview.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/uncompressed/irccloud/webview.js b/uncompressed/irccloud/webview.js new file mode 100644 index 0000000..de57ffd --- /dev/null +++ b/uncompressed/irccloud/webview.js | |||
@@ -0,0 +1,15 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const path = require('path'); | ||
4 | |||
5 | module.exports = Franz => { | ||
6 | const getMessages = function getMessages() { | ||
7 | var directMessages = document.getElementsByClassName("buffer conversation active unread activeBadge").length; | ||
8 | var indirectMessages = document.getElementsByClassName("buffer channel active unread").length; | ||
9 | |||
10 | Franz.setBadge(directMessages, indirectMessages); | ||
11 | }; | ||
12 | |||
13 | Franz.loop(getMessages); | ||
14 | }; | ||
15 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlyY2Nsb3VkL3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsImRpcmVjdE1lc3NhZ2VzIiwiZG9jdW1lbnQiLCJnZXRFbGVtZW50c0J5Q2xhc3NOYW1lIiwibGVuZ3RoIiwiaW5kaXJlY3RNZXNzYWdlcyIsInNldEJhZGdlIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxPQUFPQyxRQUFRLE1BQVIsQ0FBYjs7QUFFQUMsT0FBT0MsT0FBUCxHQUFrQkMsS0FBRCxJQUFXO0FBQzFCLFFBQU1DLGNBQWMsU0FBU0EsV0FBVCxHQUF1QjtBQUN6QyxRQUFJQyxpQkFBaUJDLFNBQVNDLHNCQUFULENBQWdDLCtDQUFoQyxFQUFpRkMsTUFBdEc7QUFDQSxRQUFJQyxtQkFBbUJILFNBQVNDLHNCQUFULENBQWdDLDhCQUFoQyxFQUFn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