Skip to content

Instantly share code, notes, and snippets.

@ckerr
Last active January 26, 2021 15:54
Show Gist options
  • Save ckerr/7985be12498d49847bc2055723ecee1e to your computer and use it in GitHub Desktop.
Save ckerr/7985be12498d49847bc2055723ecee1e to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
</head>
<body>
<!-- note: this is just a random test pdf.
the test behaves the same with local files, but gist.github.com doesn't seem to like to store pdf files -->
<embed src="http://www.episcenter.psu.edu/sites/default/files/Presentations/empty.pdf" style="width:100%;height:400px">
</body>
</html>
const { app, BrowserWindow, session } = require('electron');
const { join } = require('path');
// uncomment this line to break the PDF Viewer
//app.commandLine.appendSwitch('disable-site-isolation-trials');
async function ready() {
const mainWindow = new BrowserWindow({
x: 0,
y: 0,
width: 800,
height: 800,
show: true,
});
mainWindow.loadURL(join("file://", __dirname, "main.html"));
}
app.whenReady().then(ready);
{
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron .",
"start2": "electron --disable-site-isolation-trials ."
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
"Electron",
"quick",
"start",
"tutorial",
"demo"
],
"author": "GitHub",
"license": "CC0-1.0",
"devDependencies": {
"electron": "^11.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment