# Context Menu Item

The Context Menu action lets you add items to your browser’s context menu. The menu item will appear when you right-click on a web page or in certain contexts.&#x20;

### What does the Context Menu look like

<figure><img src="/files/a9nhfeQ2RzBZSbbU2AMG" alt=""><figcaption></figcaption></figure>

### Create a Context Menu

**Follow these steps to create and configure a new Context Menu item:**

1. [Open the PixieBrix Page Editor](/platform-overview/page-editor/open-the-page-editor.md).
2. In the left panel, click **New Mod** > **Context Menu**.<br>

   <figure><img src="/files/3lb64oBhb9BCcnSaLqWI" alt=""><figcaption></figcaption></figure>
3. Go to the middle panel and edit a name in the **Name** field to something that will describe your entire mod. *For example: `Scrape LinkedIn Profile`.*

### Configure a Context Menu

In the sections below the Name, enter the following information:

<table><thead><tr><th width="147">Field</th><th>Description</th></tr></thead><tbody><tr><td>Title</td><td>If desired, edit the default context menu name. This is the name that displays in the context menu options.<br><br>Alternatively, you can click on the selected text shortcut link to insert the %s placeholder automatically. For example, if a user selects "Amazon" on a page, the browser automatically inserts "Amazon" in the context menu.</td></tr><tr><td>Menu context</td><td>Specify when the context menu item should display by selecting the appropriate context:<br>Menu context<br>• page - Excludes links, frames, images, and selected text.<br>• all - Displays in all contexts, meaning that it always displays.<br>• frame - Displays the menu item on frames (e.g., iframes within a page)<br>• selection - Displays the menu item when right-clicking on selected text.<br>• link - Displays the menu item when right-clicking on a link.<br>• image - Displays the menu item when right-clicking on an image.</td></tr><tr><td>Sites</td><td>When you specify the sites you want the context menu to display, PixieBrix runs faster and more accurately. To do so, enter the URL in the Sites field. Make sure that at least one URL matches the pattern(s) you added.<br><br>You can also:<br>• Click the Site, Domain, HTTPS, or All URLs shortcuts to insert URLs automatically.<br>• Click Add Site to add more sites.<br>• Click ABC > Remove to remove a site from the list.<br><br>Learn more about <a data-mention href="/pages/rFVVCRgosBrD72s5ayA4">/pages/rFVVCRgosBrD72s5ayA4</a></td></tr></tbody></table>

<figure><img src="/files/PfMy2kgRz8XXkJ66zs4m" alt=""><figcaption></figcaption></figure>

If needed, go to the Advanced section and enter the following information.

{% hint style="danger" %}
This is optional information. In many cases, you may not need to configure any of these settings unless you're trying to do something specific.
{% endhint %}

<table><thead><tr><th width="238">Field</th><th>Description</th></tr></thead><tbody><tr><td>Target Mode</td><td>• Select eventTarget to provide the Context Menu element clicked as the source of the action.<br>• Select document to provide the entire HTML document as the source of the action.<br>• Legacy. This option is deprecated. Do not select this option.</td></tr><tr><td>Automatic Permissions</td><td>Add the URL location(s) where the context menu items should display.<br><br>• Click the Site, Domain, HTTPS, or All URLs shortcut to insert URLs automatically.<br>• Click Add Site to add more sites. In most cases, users display the context menu item on one site, but you can enter more than one URL to display it on multiple sites.<br>• Click ABC Text > Remove to remove a site from the list.</td></tr></tbody></table>

6. URL match patterns determine which extensions run on a site or call an API. You can add URL match patterns in the **Advanced: Extra Permissions** section if the extension performs actions on a target tab not included in the site match patterns or calls an API without using an Integration. To do so:

* Click the **Add Allowed Origin** button in the **Sites/APIs**:
* Click the **Site**, **Domain**, **HTTPS**, or **All URLs** shortcut to insert URLs automatically.

Learn more about [What Are URL Match Patterns?](/developing-mods/developer-concepts/types-of-mods/what-are-url-match-patterns.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/types-of-mods/context-menu-item.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
