aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/dialpad/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 13:24:51 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-12 07:54:51 +0000
commit6d520ff1ddb74e7257e1d943f8e91117079db675 (patch)
tree541a784f0c249a1b1ddf29fcac44834752d223da /recipes/dialpad/webview.js
parentNew recipe: 'teamweek' (#694) (diff)
downloadferdium-recipes-6d520ff1ddb74e7257e1d943f8e91117079db675.tar.gz
ferdium-recipes-6d520ff1ddb74e7257e1d943f8e91117079db675.tar.zst
ferdium-recipes-6d520ff1ddb74e7257e1d943f8e91117079db675.zip
New recipe: 'dialpad' (#695)
Diffstat (limited to 'recipes/dialpad/webview.js')
-rw-r--r--recipes/dialpad/webview.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes/dialpad/webview.js b/recipes/dialpad/webview.js
new file mode 100644
index 0000000..2bf23f3
--- /dev/null
+++ b/recipes/dialpad/webview.js
@@ -0,0 +1,16 @@
1const _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5module.exports = (Ferdi) => {
6 function getMessages() {
7 var unreadCount = 0;
8 $.each($('[data-qa-has-unreads]'), (idx, item) => unreadCount += Ferdi.safeParseInt(item.attributes["data-qa-has-unreads"].value));
9
10 Ferdi.setBadge(unreadCount);
11 }
12
13 Ferdi.loop(getMessages);
14
15 Ferdi.injectCSS(_path.default.join(__dirname, 'whitemode.css'));
16};