aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/guilded
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/guilded
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/guilded')
-rw-r--r--recipes/guilded/index.js4
-rw-r--r--recipes/guilded/webview.js12
2 files changed, 6 insertions, 10 deletions
diff --git a/recipes/guilded/index.js b/recipes/guilded/index.js
index e8243fb..258da41 100644
--- a/recipes/guilded/index.js
+++ b/recipes/guilded/index.js
@@ -1,3 +1 @@
1"use strict"; module.exports = Franz => Franz;
2
3module.exports = Franz => Franz; \ No newline at end of file
diff --git a/recipes/guilded/webview.js b/recipes/guilded/webview.js
index 371fac8..72a49b4 100644
--- a/recipes/guilded/webview.js
+++ b/recipes/guilded/webview.js
@@ -1,15 +1,13 @@
1"use strict";
2
3module.exports = Franz => { 1module.exports = Franz => {
4 const getMessages = function getMessages() { 2 const getMessages = function getMessages() {
5 var unread = 0 3 let unread = 0;
6 const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0] 4 const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0];
7 if (notificationBadge != undefined) { 5 if (notificationBadge != undefined) {
8 const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0] 6 const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0];
9 unread = innerBadge.innerText; 7 unread = innerBadge.innerText;
10 } 8 }
11 Franz.setBadge(parseInt(unread, 10)); 9 Franz.setBadge(parseInt(unread, 10));
12 }; 10 };
13 11
14 Franz.loop(getMessages); 12 Franz.loop(getMessages);
15}; \ No newline at end of file 13};