mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
66 lines
1.9 KiB
HTML
66 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Insomnia</title>
|
|
<script src="./external/jsonlint.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script>
|
|
const {longName} = require('./app.json');
|
|
document.title = `${longName}`;
|
|
</script>
|
|
<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>
|