blob: 46bad0d793015d0dd6a19d75cab054c128fee85f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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');
if (!inbox) {
return;
}
const messages = Number(inbox.innerText);
Ferdi.setBadge(messages);
};
Ferdi.loop(getMessages);
Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js'));
};
|