{
  "name": "electron-context-menu",
  "version": "0.8.0",
  "description": "Context menu for your Electron app",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git://github.com/sindresorhus/electron-context-menu"
  },
  "author": {
    "name": "Sindre Sorhus",
    "email": "sindresorhus@gmail.com",
    "url": "sindresorhus.com"
  },
  "scripts": {
    "start": "electron fixture.js",
    "test": "xo"
  },
  "files": [
    "index.js"
  ],
  "keywords": [
    "electron",
    "app",
    "context",
    "right-click",
    "menu",
    "extensible",
    "save",
    "image"
  ],
  "dependencies": {
    "electron-dl": "^1.2.0",
    "electron-is-dev": "^0.1.1"
  },
  "devDependencies": {
    "electron": "^1.3.3",
    "xo": "*"
  },
  "xo": {
    "esnext": true,
    "envs": [
      "node",
      "browser"
    ]
  },
  "readme": "# electron-context-menu [![Build Status](https://travis-ci.org/sindresorhus/electron-context-menu.svg?branch=master)](https://travis-ci.org/sindresorhus/electron-context-menu)\n\n> Context menu for your [Electron](http://electron.atom.io) app\n\n<img src=\"screenshot.png\" width=\"125\" align=\"right\">\n\nElectron doesn't have a built-in context menu. You're supposed to handle that yourself. But it's both tedious and hard to get right. This module gives you a nice extensible context menu with items like `Cut`/`Copy`/`Paste` for text, `Save Image` for images, and `Copy Link` for links. It also adds an `Inspect Element` menu item when in development to quickly view items in the inspector like in Chrome.\n\nYou can use this module directly in both the main and renderer process.\n\n\n## Install\n\n```\n$ npm install --save electron-context-menu\n```\n\n\n## Usage\n\n```js\nconst {app, BrowserWindow} = require('electron');\n\nrequire('electron-context-menu')({\n\tprepend: (params, browserWindow) => [{\n\t\tlabel: 'Rainbow',\n\t\t// only show it when right-clicking images\n\t\tvisible: params.mediaType === 'image'\n\t}]\n});\n\nlet win;\n\napp.on('ready', () => {\n\twin = new BrowserWindow();\n});\n```\n\n\n## API\n\n### contextMenu([options])\n\n### options\n\n#### window\n\nType: `BrowserWindow` `WebView`<br>\n\nWindow or WebView to add the context menu to.\n\nWhen not specified, the context menu will be added to all existing and new windows.\n\n#### prepend\n\nType: `Function`\n\nShould return an array of [MenuItem](http://electron.atom.io/docs/api/menu-item/)'s to be prepended to the context menu. The first argument is [this `params` object](http://electron.atom.io/docs/api/web-contents/#event-context-menu). The second argument is the [BrowserWindow](http://electron.atom.io/docs/api/browser-window/) the context menu was requested for.\n\n#### append\n\nType: `Function`\n\nShould return an array of [MenuItem](http://electron.atom.io/docs/api/menu-item/)'s to be appended to the context menu. The first argument is [this `params` object](http://electron.atom.io/docs/api/web-contents/#event-context-menu). The second argument is the [BrowserWindow](http://electron.atom.io/docs/api/browser-window/) the context menu was requested for.\n\n#### showInspectElement\n\nType: `boolean`<br>\nDefault: [Only in development](https://github.com/sindresorhus/electron-is-dev)\n\nForce enable or disable the `Inspect Element` menu item.\n\n#### labels\n\nType: `Object`<br>\nDefault: `{}`\n\nOverwrite labels for the default menu items. Useful for i18n.\n\nFormat:\n\n```js\nlabels: {\n\tcut: 'Configured Cut',\n\tcopy: 'Configured Copy',\n\tpaste: 'Configured Paste',\n\tsave: 'Configured Save Image',\n\tcopyLink: 'Configured Copy Link',\n\tinspect: 'Configured Inspect'\n}\n```\n\n## Related\n\n- [electron-debug](https://github.com/sindresorhus/electron-debug) - Adds useful debug features to your Electron app\n- [electron-config](https://github.com/sindresorhus/electron-config) - Simple config handling for your Electron app or module\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
  "readmeFilename": "readme.md",
  "bugs": {
    "url": "https://github.com/sindresorhus/electron-context-menu/issues"
  },
  "homepage": "https://github.com/sindresorhus/electron-context-menu",
  "_id": "electron-context-menu@0.8.0",
  "_shasum": "60c4b5e29d5514007be8728a6ebdf3cb694c4e3e",
  "_from": "electron-context-menu@^0.8.0",
  "_resolved": "https://registry.npmjs.org/electron-context-menu/-/electron-context-menu-0.8.0.tgz"
}
