diff options
Diffstat (limited to 'recipes/dialpad/webview.js')
-rw-r--r-- | recipes/dialpad/webview.js | 16 |
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 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
4 | |||
5 | module.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 | }; | ||