aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/vk/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/vk/webview.js')
-rw-r--r--recipes/vk/webview.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/recipes/vk/webview.js b/recipes/vk/webview.js
index decec13..6756363 100644
--- a/recipes/vk/webview.js
+++ b/recipes/vk/webview.js
@@ -9,5 +9,21 @@ module.exports = Ferdi => {
9 Ferdi.setBadge(directs); 9 Ferdi.setBadge(directs);
10 }; 10 };
11 11
12 Ferdi.loop(getMessages); 12 const getActiveDialogTitle = () => {
13 const element = [
14 document.querySelector(
15 '.FCWindow--active .FCWindow__title .ConvoTitle__title',
16 ),
17 document.querySelector('.im-page_history-show ._im_page_peer_name'),
18 ].find(Boolean);
19
20 Ferdi.setDialogTitle(element ? element.textContent : null);
21 };
22
23 const loopFunc = () => {
24 getMessages();
25 getActiveDialogTitle();
26 };
27
28 Ferdi.loop(loopFunc);
13}; 29};