Last active
July 22, 2021 20:30
-
-
Save MrAmericanMike/c703ddf47cd1281986d876159ba8854a to your computer and use it in GitHub Desktop.
Whatsapp Web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { app, BrowserWindow } = require("electron"); | |
| function init() { | |
| const win = new BrowserWindow({ | |
| width: 1280, | |
| height: 720 | |
| }); | |
| win.loadURL("https://web.whatsapp.com/"); | |
| }; | |
| app.on("window-all-closed", () => { | |
| if (process.platform !== "darwin") { | |
| app.quit(); | |
| } | |
| }); | |
| app.whenReady().then(() => { | |
| init(); | |
| app.on("activate", () => { | |
| if (BrowserWindow.getAllWindows().length === 0) { | |
| init(); | |
| } | |
| }) | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment