diff options
author | 2020-02-19 11:41:14 +0100 | |
---|---|---|
committer | 2020-02-19 11:41:14 +0100 | |
commit | 65d526d5439c88ffdabe4084dee1e6ce88fdfdc7 (patch) | |
tree | b0f25027b99375f441e9a90c4abb3de196728189 /uncompressed/pulseSMS/webview.js | |
parent | Update mailbox.org recipe (diff) | |
parent | Merge pull request #44 from dpeukert/master (diff) | |
download | ferdium-recipes-65d526d5439c88ffdabe4084dee1e6ce88fdfdc7.tar.gz ferdium-recipes-65d526d5439c88ffdabe4084dee1e6ce88fdfdc7.tar.zst ferdium-recipes-65d526d5439c88ffdabe4084dee1e6ce88fdfdc7.zip |
Merge branch 'master' of https://github.com/getferdi/recipes
Diffstat (limited to 'uncompressed/pulseSMS/webview.js')
-rw-r--r-- | uncompressed/pulseSMS/webview.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/uncompressed/pulseSMS/webview.js b/uncompressed/pulseSMS/webview.js index 0a56c11..a4c7f43 100644 --- a/uncompressed/pulseSMS/webview.js +++ b/uncompressed/pulseSMS/webview.js | |||
@@ -1,10 +1,8 @@ | |||
1 | "use strict"; | 1 | module.exports = (Franz) => { |
2 | function getMessages() { | ||
3 | Franz.setBadge(document.querySelector("#unread_count").innerHTML.replace(/\s/g,'')); | ||
4 | } | ||
2 | 5 | ||
3 | module.exports = Franz => { | 6 | // check for new messages every second and update Franz badge |
4 | const getMessages = function getMessages() { | ||
5 | var count = document.getElementsByClassName("conversation-title mdl-card__supporting-text bold").length; | ||
6 | Franz.setBadge(count); | ||
7 | }; | ||
8 | Franz.loop(getMessages); | 7 | Franz.loop(getMessages); |
9 | }; | 8 | }; |
10 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInB1bHNlc21zL3dlYnZpZXcuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56IiwiZ2V0TWVzc2FnZXMiLCJjb3VudCIsImRvY3VtZW50IiwiZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSIsImxlbmd0aCIsInNldEJhZGdlIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFrQkMsS0FBRCxJQUFXO0FBQzFCLFFBQU1DLGNBQWMsU0FBU0EsV0FBVCxHQUF1QjtBQUN6QyxRQUFJQyxRQUFRQyxTQUFTQyxzQkFBVCxDQUFnQyxtREFBaEMsRUFBcUZDLE1BQWpHO0FBQ0FMLFVBQU1NLFFBQU4sQ0FBZUosS0FBZjtBQUVELEdBSkQ7QUFLQUYsUUFBTU8sSUFBTixDQUFXTixXQUFYO0FBQ0QsQ0FQRCIsImZpbGUiOiJwdWxzZXNtcy93ZWJ2aWV3LmpzIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAoRnJhbnopID0+IHtcbiAgY29uc3QgZ2V0TWVzc2FnZXMgPSBmdW5jdGlvbiBnZXRNZXNzYWdlcygpIHtcbiAgICB2YXIgY291bnQgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKFwiY29udmVyc2F0aW9uLXRpdGxlIG1kbC1jYXJkX19zdXBwb3J0aW5nLXRleHQgYm9sZFwiKS5sZW5ndGg7XG4gICAgRnJhbnouc2V0QmFkZ2UoY291bnQpO1xuICAgIFxuICB9O1xuICBGcmFuei5sb29wKGdldE1lc3NhZ2VzKTtcbn07XG4iXX0= \ No newline at end of file | ||