diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/mysms/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/mysms/webview.js')
-rw-r--r-- | recipes/mysms/webview.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/recipes/mysms/webview.js b/recipes/mysms/webview.js index 20e82ac..c069cb9 100644 --- a/recipes/mysms/webview.js +++ b/recipes/mysms/webview.js | |||
@@ -1,12 +1,10 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | 1 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
5 | const elements = document.getElementsByClassName('unread'); | 3 | const elements = document.getElementsByClassName('unread'); |
6 | 4 | ||
7 | let count = 0; | 5 | let count = 0; |
8 | for (let i = 0; i < elements.length; i++) { | 6 | for (let i = 0; i < elements.length; i++) { |
9 | let count_line = parseInt(elements[i].innerText.replace(/[^0-9.]/g, "")); | 7 | const count_line = parseInt(elements[i].innerText.replace(/[^0-9.]/g, '')); |
10 | if (count_line > 0) { | 8 | if (count_line > 0) { |
11 | count++; // count 1 per channel with messages | 9 | count++; // count 1 per channel with messages |
12 | } | 10 | } |
@@ -17,4 +15,4 @@ module.exports = Franz => { | |||
17 | 15 | ||
18 | Franz.loop(getMessages); | 16 | Franz.loop(getMessages); |
19 | }; | 17 | }; |
20 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm15c21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kb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCd1bnJlYWQnKTtcblxuICBcdGxldCBjb3VudCA9IDA7XG4gIFx0Zm9yKGxldCBpID0gMDsgaSA8IGVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gIFx0XHRsZXQgY291bnRfbGluZSA9IHBhcnNlSW50KGVsZW1lbnRzW2ldLmlubmVyVGV4dC5yZXBsYWNlKC9bXjAtOS5dL2csIFwiXCIpKTtcbiAgXHRcdGlmIChjb3VudF9saW5lID4gMCkge1xuICBcdFx0XHRjb3VudCsrOyAvLyBjb3VudCAxIHBlciBjaGFubmVsIHdpdGggbWVzc2FnZXNcbiAgXHRcdH1cbiAgXHR9XG5cbiAgICBGcmFuei5zZXRCYWRnZShjb3VudCk7XG4gIH07XG5cbiAgRnJhbnoubG9vcChnZXRNZXNzYWdlcyk7XG59O1xuIl19 \ No newline at end of file | 18 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm15c21zL3dlYnZpZXcuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56IiwiZ2V0TWVzc2FnZXMiLCJlbGVtZW50cyIsImRvY3VtZW50IiwiZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSIsImNvdW50IiwiaSIsImxlbmd0aCIsImNvdW50X2xpbmUiLCJwYXJzZUludCIsImlubmVyVGV4dCIsInJlcGxhY2UiLCJzZXRCYWRnZSIsImxvb3AiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQU9DLE9BQVAsR0FBa0JDLEtBQUQsSUFBVztBQUMxQixRQUFNQyxjQUFjLFNBQVNBLFdBQVQsR0FBdUI7QUFDekMsVUFBTUMsV0FBV0MsU0FBU0Msc0JBQVQsQ0FBZ0MsUUFBaEMsQ0FBakI7O0FBRUQsUUFBSUMsUUFBUSxDQUFaO0FBQ0EsU0FBSSxJQUFJQyxJQUFJLENBQVosR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