Skip to content

Instantly share code, notes, and snippets.

@Ddorda
Created May 2, 2019 17:31
Show Gist options
  • Save Ddorda/ed5a97f897941742b9261dd14677d736 to your computer and use it in GitHub Desktop.
Save Ddorda/ed5a97f897941742b9261dd14677d736 to your computer and use it in GitHub Desktop.
Template of the default Electron menu
[{
label: "File",
accelerator: null,
role: "filemenu",
commandId: 2,
submenu: [{
"label": "Quit",
accelerator: null,
role: "quit",
commandId: 1,
submenu: null
}]
}, {
label: "Edit",
accelerator: null,
role: "editmenu",
commandId: 12,
submenu: [{
"label": "Undo",
accelerator: null,
role: "undo",
commandId: 3,
submenu: null
}, {
label: "Redo",
accelerator: null,
role: "redo",
commandId: 4,
submenu: null
}, {
label: "",
accelerator: null,
role: null,
commandId: 5,
submenu: null
}, {
label: "Cut",
accelerator: null,
role: "cut",
commandId: 6,
submenu: null
}, {
label: "Copy",
accelerator: null,
role: "copy",
commandId: 7,
submenu: null
}, {
label: "Paste",
accelerator: null,
role: "paste",
commandId: 8,
submenu: null
}, {
label: "Delete",
accelerator: null,
role: "delete",
commandId: 9,
submenu: null
}, {
label: "",
accelerator: null,
role: null,
commandId: 10,
submenu: null
}, {
label: "Select All",
accelerator: null,
role: "selectall",
commandId: 11,
submenu: null
}]
}, {
label: "View",
accelerator: null,
role: "viewmenu",
commandId: 22,
submenu: [{
"label": "Reload",
accelerator: null,
role: "reload",
commandId: 13,
submenu: null
}, {
label: "Force Reload",
accelerator: null,
role: "forcereload",
commandId: 14,
submenu: null
}, {
label: "Toggle Developer Tools",
accelerator: null,
role: "toggledevtools",
commandId: 15,
submenu: null
}, {
label: "",
accelerator: null,
role: null,
commandId: 16,
submenu: null
}, {
label: "Actual Size",
accelerator: null,
role: "resetzoom",
commandId: 17,
submenu: null
}, {
label: "Zoom In",
accelerator: null,
role: "zoomin",
commandId: 18,
submenu: null
}, {
label: "Zoom Out",
accelerator: null,
role: "zoomout",
commandId: 19,
submenu: null
}, {
label: "",
accelerator: null,
role: null,
commandId: 20,
submenu: null
}, {
label: "Toggle Full Screen",
accelerator: null,
role: "togglefullscreen",
commandId: 21,
submenu: null
}]
}, {
label: "Window",
accelerator: null,
role: "windowmenu",
commandId: 26,
submenu: [{
"label": "Minimize",
accelerator: null,
role: "minimize",
commandId: 23,
submenu: null
}, {
label: "Zoom",
accelerator: null,
role: "zoom",
commandId: 24,
submenu: null
}, {
label: "Close",
accelerator: null,
role: "close",
commandId: 25,
submenu: null
}]
}, {
label: "Help",
accelerator: null,
role: "help",
commandId: 31,
submenu: [{
"label": "Learn More",
accelerator: null,
role: null,
commandId: 27,
submenu: null
}, {
label: "Documentation",
accelerator: null,
role: null,
commandId: 28,
submenu: null
}, {
label: "Community Discussions",
accelerator: null,
role: null,
commandId: 29,
submenu: null
}, {
label: "Search Issues",
accelerator: null,
role: null,
commandId: 30,
submenu: null
}]
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment