blob: bcea4e71615e7f9cda4866e9f760e7d176c71c5d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
const _path = _interopRequireDefault(require('path'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
module.exports = Ferdi => {
const getMessages = () => {
const inbox = document.querySelector(
'.v-MailboxSource--inbox .v-MailboxSource-badge',
);
const messages = inbox ? Ferdi.safeParseInt(inbox.textContent) : 0;
Ferdi.setBadge(messages);
};
Ferdi.loop(getMessages);
Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js'));
};
|