insomnia/app/app.html
2016-07-07 13:10:55 -07:00

38 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insomnia REST Client</title>
<script src="./external/jsonlint.js"></script>
</head>
<body>
<div id="root"></div>
<script>
(function () {
const script = document.createElement('script');
script.src = (process.env.HOT) ? 'http://localhost:3333/dist/bundle.js' : './bundle.js';
document.write(script.outerHTML);
}());
</script>
<script>
const remote = require('electron').remote;
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;
var menu = new Menu();
menu.append(new MenuItem({label: "Undo", selector: "undo:"}));
menu.append(new MenuItem({label: "Redo", selector: "redo:"}));
menu.append(new MenuItem({type: "separator"}));
menu.append(new MenuItem({label: "Cut", selector: "cut:"}));
menu.append(new MenuItem({label: "Copy", selector: "copy:"}));
menu.append(new MenuItem({label: "Paste", selector: "paste:"}));
menu.append(new MenuItem({label: "Select All", selector: "selectAll:"}));
window.addEventListener('contextmenu', function (e) {
e.preventDefault();
menu.popup(remote.getCurrentWindow());
}, false);
</script>
</body>
</html>