aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/disqus
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/disqus
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/disqus')
-rw-r--r--recipes/disqus/package.json2
-rw-r--r--recipes/disqus/webview.js12
2 files changed, 7 insertions, 7 deletions
diff --git a/recipes/disqus/package.json b/recipes/disqus/package.json
index 73f9a24..11ce689 100644
--- a/recipes/disqus/package.json
+++ b/recipes/disqus/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "disqus", 2 "id": "disqus",
3 "name": "Disqus", 3 "name": "Disqus",
4 "version": "1.1.1", 4 "version": "1.1.2",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://disqus.com/home/" 7 "serviceURL": "https://disqus.com/home/"
diff --git a/recipes/disqus/webview.js b/recipes/disqus/webview.js
index b5c1902..a79f5e7 100644
--- a/recipes/disqus/webview.js
+++ b/recipes/disqus/webview.js
@@ -1,10 +1,10 @@
1const getInnerInt = selector => {
2 const element = document.querySelector(selector);
3 return element && Ferdi.safeParseInt(element.innerText);
4};
5
6module.exports = Ferdi => { 1module.exports = Ferdi => {
7 const getMessages = function getMessages() { 2 const getInnerInt = selector => {
3 const element = document.querySelector(selector);
4 return element && Ferdi.safeParseInt(element.innerText);
5 };
6
7 const getMessages = () => {
8 const direct = ( 8 const direct = (
9 getInnerInt("header div[data-role='unread-notification-count']") || 9 getInnerInt("header div[data-role='unread-notification-count']") ||
10 getInnerInt('a.has-notifs div.notif-count') || 10 getInnerInt('a.has-notifs div.notif-count') ||