This repository has been archived on 2022-06-29. You can view files and clone it, but cannot push or open issues or pull requests.
yandexmail-desktop/renderer.js

13 lines
328 B
JavaScript
Raw Normal View History

2019-01-20 07:22:17 +05:00
console.log(window);
var ipc = require("electron").ipcRenderer;
function checkForUnreads() {
unread = parseInt(document.title.split(" ")[0]);
if (typeof (unread) != NaN && unread > 0) {
ipc.send('has-unread', unread);
2019-01-20 07:22:17 +05:00
} else {
ipc.send('has-no-unread');
};
}
setInterval(checkForUnreads, 1000);