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.
2019-01-20 07:22:17 +05:00
|
|
|
console.log(window);
|
|
|
|
var ipc = require("electron").ipcRenderer;
|
|
|
|
|
|
|
|
function checkForUnreads() {
|
|
|
|
unread = parseInt(document.title.split(" ")[0]);
|
2019-01-20 07:47:26 +05:00
|
|
|
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);
|