From 7517a409a1a502c747eb4598492a88cec4e8d58c Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 19 Sep 2021 07:26:25 +0530 Subject: fix: fix js error; styling --- recipes/disqus/package.json | 2 +- recipes/disqus/webview.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'recipes/disqus') 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 @@ { "id": "disqus", "name": "Disqus", - "version": "1.1.1", + "version": "1.1.2", "license": "MIT", "config": { "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 @@ -const getInnerInt = selector => { - const element = document.querySelector(selector); - return element && Ferdi.safeParseInt(element.innerText); -}; - module.exports = Ferdi => { - const getMessages = function getMessages() { + const getInnerInt = selector => { + const element = document.querySelector(selector); + return element && Ferdi.safeParseInt(element.innerText); + }; + + const getMessages = () => { const direct = ( getInnerInt("header div[data-role='unread-notification-count']") || getInnerInt('a.has-notifs div.notif-count') || -- cgit v1.2.3-70-g09d2