aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/vk
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/vk')
-rw-r--r--recipes/vk/package.json2
-rw-r--r--recipes/vk/webview.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/recipes/vk/package.json b/recipes/vk/package.json
index 19b4225..b46622d 100644
--- a/recipes/vk/package.json
+++ b/recipes/vk/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "vk", 2 "id": "vk",
3 "name": "VK", 3 "name": "VK",
4 "version": "1.1.0", 4 "version": "1.1.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/meetfranz/recipe-vk", 6 "repository": "https://github.com/meetfranz/recipe-vk",
7 "config": { 7 "config": {
diff --git a/recipes/vk/webview.js b/recipes/vk/webview.js
index e48866f..05d703e 100644
--- a/recipes/vk/webview.js
+++ b/recipes/vk/webview.js
@@ -1,8 +1,9 @@
1module.exports = Ferdi => { 1module.exports = Ferdi => {
2 const getMessages = function getMessages() { 2 const getMessages = function getMessages() {
3 let directs = 0; 3 let directs = 0;
4 if (document.getElementsByClassName('left_count').length > 0) { 4 const element = document.getElementsByClassName('left_count');
5 directs = parseInt(document.getElementsByClassName('left_count')[0].innerText, 10); 5 if (element.length > 0) {
6 directs = Ferdi.safeParseInt(element[0].innerText);
6 } 7 }
7 8
8 Ferdi.setBadge(directs); 9 Ferdi.setBadge(directs);