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

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);
} else {
ipc.send('has-no-unread');
};
}
setInterval(checkForUnreads, 1000);