aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/instagram/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
commitdfae2d231e39c81827d08fd8834d736c5b3005b1 (patch)
tree5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/instagram/webview.js
parentNew recipe: odoo (diff)
downloadferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.gz
ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.zst
ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.zip
refactor: Use Ferdi.safeParseInt to ensure that parsing is done consistently in all recipes.
Diffstat (limited to 'recipes/instagram/webview.js')
-rw-r--r--recipes/instagram/webview.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js
index b6d9aa3..8db5852 100644
--- a/recipes/instagram/webview.js
+++ b/recipes/instagram/webview.js
@@ -5,7 +5,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
5module.exports = (Ferdi) => { 5module.exports = (Ferdi) => {
6 const getMessages = function getMessages() { 6 const getMessages = function getMessages() {
7 const element = document.querySelector('a[href^="/direct/inbox"]'); 7 const element = document.querySelector('a[href^="/direct/inbox"]');
8 Ferdi.setBadge(element ? parseInt(element.innerText, 10) : 0); 8 Ferdi.setBadge(element ? Ferdi.safeParseInt(element.innerText) : 0);
9 }; 9 };
10 10
11 Ferdi.loop(getMessages); 11 Ferdi.loop(getMessages);