diff options
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 | ||