aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/riseup/webview.js
diff options
context:
space:
mode:
authorLibravatar Dan Feder <dan.feder@civicactions.com>2020-05-18 12:32:32 -0400
committerLibravatar Dan Feder <dan.feder@civicactions.com>2020-05-18 12:32:32 -0400
commita4f8e8e1a74fe05655963674851c35d582f7cb78 (patch)
tree9a48884b4a808b54bc906b0d775b2b76b413e4d0 /uncompressed/riseup/webview.js
parentPackage recipe (diff)
downloadferdium-recipes-a4f8e8e1a74fe05655963674851c35d582f7cb78.tar.gz
ferdium-recipes-a4f8e8e1a74fe05655963674851c35d582f7cb78.tar.zst
ferdium-recipes-a4f8e8e1a74fe05655963674851c35d582f7cb78.zip
Add Riseup.net recipe
Diffstat (limited to 'uncompressed/riseup/webview.js')
-rw-r--r--uncompressed/riseup/webview.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/uncompressed/riseup/webview.js b/uncompressed/riseup/webview.js
new file mode 100644
index 0000000..705a0ba
--- /dev/null
+++ b/uncompressed/riseup/webview.js
@@ -0,0 +1,18 @@
1"use strict";
2
3var _path = _interopRequireDefault(require("path"));
4
5function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
7module.exports = Ferdi => {
8 const getMessages = function getMessages() {
9 var unread = 0
10 const notificationBadge = document.getElementsByClassName('unreadcount')[0]
11 if (notificationBadge != undefined) {
12 unread = notificationBadge.innerText;
13 }
14 Ferdi.setBadge(parseInt(unread, 10));
15 };
16
17 Ferdi.loop(getMessages);
18};