aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/plurk/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/plurk/webview.js')
-rw-r--r--recipes/plurk/webview.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/recipes/plurk/webview.js b/recipes/plurk/webview.js
index 6f20458..0136c24 100644
--- a/recipes/plurk/webview.js
+++ b/recipes/plurk/webview.js
@@ -5,8 +5,11 @@ module.exports = Ferdi => {
5 const np = document.querySelector('#noti_np_count'); 5 const np = document.querySelector('#noti_np_count');
6 const re = document.querySelector('#noti_re_count'); 6 const re = document.querySelector('#noti_re_count');
7 7
8 if (np || re) { 8 if (np) {
9 direct = parseInt(np.innerHTML) + parseInt(re.innerHTML); 9 direct += Ferdi.safeParseInt(np.innerHTML);
10 }
11 if (re) {
12 direct += Ferdi.safeParseInt(re.innerHTML);
10 } 13 }
11 14
12 Ferdi.setBadge(direct); 15 Ferdi.setBadge(direct);