-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
70 lines (58 loc) · 2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CrypTag Notes</title>
<!-- bower:css -->
<link rel="stylesheet" href="static/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="static/lib/font-awesome/css/font-awesome.css" />
<!-- endbower -->
<link rel="stylesheet" href="node_modules/react-widgets/dist/css/react-widgets.css" />
<!-- inject:css -->
<link rel="stylesheet" href="static/css/editor.css">
<link rel="stylesheet" href="static/css/styles.css">
<!-- endinject -->
</head>
<body>
<div id="root" class="mousetrap"></div>
</body>
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- bower:js -->
<script src="static/lib/jquery/dist/jquery.js"></script>
<script src="static/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="node_modules/mousetrap/mousetrap.js"></script>
<!-- endbower -->
<!-- inject:js -->
<!-- endinject -->
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<script>
// From https://github.com/electron/electron/issues/1344#issuecomment-171516636
// Open links externally by default:
var shell = require('electron').shell;
$(document).on('click', 'a[href^="http"]', function(event) {
event.preventDefault();
shell.openExternal(this.href);
});
</script>
<script>
Mousetrap.bind('mod+p', function() {
console.log('Mousetrap.bind: pressed mod+p');
document.getElementById('preview-tab').click();
return false;
})
</script>
<script>
Mousetrap.bind('mod+e', function() {
console.log('Mousetrap.bind: pressed mod+e');
document.getElementById('edit-tab').click();
$(".MDEditor_editor .CodeMirror").find('textarea').focus();
return false;
})
</script>
<script>
// You can also require other files to run in this process
require('babel-register');
require('./renderer.js')
</script>
</html>