diff --git a/electron/index.js b/electron/index.js index ab90388..19b6d5c 100644 --- a/electron/index.js +++ b/electron/index.js @@ -1,5 +1,5 @@ // ElectronJS -const {app, BrowserWindow, Menu} = require('electron') +const {app, BrowserWindow, Menu, Notification} = require('electron') // Dependenies by Korbs Studio const glasstron = require('glasstron-clarity') @@ -22,9 +22,9 @@ log.transports.console.format = '\x1b[34m[electron]:\x1b[37m' console.log = log.log // Use the correct icon depending on the operating system -if /* If macOS */ (process.platform == 'darwin') {global.AppIcon = 'public/images/icons/app/macOS.icns' } +if /* If macOS */ (process.platform == 'darwin') {global.AppIcon = 'public/images/icons/app/macOS.icns' } else if /* If Windows */ (process.platform == 'win32') {global.AppIcon = 'public/images/icons/app/Windows.png' } -else /* If Linux */ {global.AppIcon = 'public/images/icons/app/Linux.png' } +else /* If Linux */ {global.AppIcon = 'public/images/icons/app/Linux.png' } function createWindow () { mainWindow = new glasstron.BrowserWindow({ @@ -60,11 +60,16 @@ function createWindow () { setTimeout(() => { Pushy.setNotificationListener((data) => { - mainWindow.webContents.executeJavaScript(` - document.querySelector("body > div > div.sidebar > div.sidebar-bottom").insertAdjacentHTML("afterBegin",'
${data.title}
${data.title}