Skip to content

Instantly share code, notes, and snippets.

@parro-it
Last active April 7, 2016 07:06
Show Gist options
  • Save parro-it/e03dfa1c8fb707454f773cebfeba6cfa to your computer and use it in GitHub Desktop.
Save parro-it/e03dfa1c8fb707454f773cebfeba6cfa to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title>example</title>
<script>
const inputMenu = require('electron-input-menu');
const context = require('electron-contextmenu-middleware');
context.use(inputMenu);
context.activate();
</script>
</head>
<body>
<input type="text">
<h1>Hola</h1>
<img src="https://avatars1.githubusercontent.com/u/11197111?v=3&s=96">
</body>
</html>
'use strict';
const electron = require('electron');
electron.app.on('ready', () => {
const win = new electron.BrowserWindow({
show: true
});
win.loadURL('file://' + __dirname + '/example.html');
});
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "electron index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron-contextmenu-middleware": "^1.0.1",
"electron-input-menu": "^1.0.2",
"electron-prebuilt": "^0.37.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment