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

62 lines
1.8 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/build/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>
<script>
document.body.setAttribute('data-platform', process.platform);
</script>
<script>
if (process.env.NODE_ENV !== 'development') {
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-9837747-17', 'auto');
ga('send', 'pageview');
}
</script>
</body>
</html>