/
fixture.js
47 lines (44 loc) · 833 Bytes
/
fixture.js
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
'use strict';
const path = require('path');
const {app, BrowserWindow} = require('electron');
const contextMenu = require('.');
contextMenu({
labels: {
cut: 'Configured Cut',
copy: 'Configured Copy',
paste: 'Configured Paste',
save: 'Configured Save Image',
saveImageAs: 'Configured Save Image As…',
copyLink: 'Configured Copy Link',
inspect: 'Configured Inspect'
},
prepend: () => [
{
label: 'Unicorn'
},
{
type: 'separator'
},
{
type: 'separator'
},
{
label: 'Invisible',
visible: false
},
{
type: 'separator'
},
{
type: 'separator'
}
],
append: () => {},
showCopyImageAddress: true,
showSaveImageAs: true,
showInspectElement: false
});
(async () => {
await app.whenReady();
await (new BrowserWindow()).loadFile(path.join(__dirname, 'fixture.html'));
})();