aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/guilded/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-09-19 07:26:25 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-09-19 09:11:55 +0530
commit7517a409a1a502c747eb4598492a88cec4e8d58c (patch)
tree7b6b603b0831845ac07fe6ab8e4c52bf19c8e850 /recipes/guilded/webview.js
parentMerge pull request #713 from kris7t/fix-api-access (diff)
downloadferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.tar.gz
ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.tar.zst
ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.zip
fix: fix js error; styling
Diffstat (limited to 'recipes/guilded/webview.js')
-rw-r--r--recipes/guilded/webview.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/guilded/webview.js b/recipes/guilded/webview.js
index 5d56d39..c8d33f2 100644
--- a/recipes/guilded/webview.js
+++ b/recipes/guilded/webview.js
@@ -1,10 +1,10 @@
1module.exports = Ferdi => { 1module.exports = Ferdi => {
2 const getMessages = function getMessages() { 2 const getMessages = () => {
3 let unread = 0; 3 let unread = 0;
4 const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0]; 4 const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0];
5 if (notificationBadge != undefined) { 5 if (notificationBadge != undefined) {
6 const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0]; 6 const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0];
7 unread = innerBadge.innerText; 7 unread = Ferdi.safeParseInt(innerBadge.innerText);
8 } 8 }
9 Ferdi.setBadge(unread); 9 Ferdi.setBadge(unread);
10 }; 10 };