diff options
author | 2022-06-15 16:18:44 +0200 | |
---|---|---|
committer | 2022-06-15 14:18:44 +0000 | |
commit | 247b9c7588ab2b51c6eab41affb9696cf61110fd (patch) | |
tree | 50a1d9ac222c0ba637ff436e7c10b668583de0ad /recipes/tchap/webview.js | |
parent | Fix broken faq url [skip ci] (diff) | |
download | ferdium-recipes-247b9c7588ab2b51c6eab41affb9696cf61110fd.tar.gz ferdium-recipes-247b9c7588ab2b51c6eab41affb9696cf61110fd.tar.zst ferdium-recipes-247b9c7588ab2b51c6eab41affb9696cf61110fd.zip |
Adding Tchap service (#40)
Co-authored-by: André Oliveira <oliveira.andrerodrigues95@gmail.com>
Diffstat (limited to 'recipes/tchap/webview.js')
-rw-r--r-- | recipes/tchap/webview.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/recipes/tchap/webview.js b/recipes/tchap/webview.js new file mode 100644 index 0000000..bc24fe6 --- /dev/null +++ b/recipes/tchap/webview.js | |||
@@ -0,0 +1,8 @@ | |||
1 | module.exports = Ferdium => { | ||
2 | const getMessages = () => { | ||
3 | let count = document.querySelector('.mx_RoomSubList_badge').innerHTML | ||
4 | Ferdium.setBadge(count); | ||
5 | }; | ||
6 | |||
7 | Ferdium.loop(getMessages); | ||
8 | }; \ No newline at end of file | ||