Created
April 18, 2023 20:44
-
-
Save cpoile/97f08192e630291fcc9ea90e7f5b442f to your computer and use it in GitHub Desktop.
Electron MAS red transparent window with AMD graphics
This file contains 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
<html> | |
<head> | |
<style> | |
body { | |
width: 100vw; | |
height: 100vh; | |
} | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains 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 electron = require("electron"); | |
electron.app.whenReady().then(() => { | |
const win = new electron.BrowserWindow({ | |
width: 200, | |
height: 100, | |
frame: false, | |
transparent: true, | |
webPreferences: { | |
nodeIntegration: false, | |
contextIsolation: true, | |
}, | |
}); | |
win.loadURL(`file://${process.cwd()}/index.html`); | |
}); |
This file contains 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
{ | |
"name": "abcd", | |
"productName": "abcd", | |
"description": "My Electron application description", | |
"keywords": [], | |
"main": "./main.js", | |
"version": "1.0.0", | |
"author": "cpoile", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
"electron": "24.1.2-mas" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment