Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages. * available since Chrome 30 * https://developer.chrome.com/apps/contextMenus
(create create-properties)
Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in chrome.runtime.lastError.
|create-properties| - https://developer.chrome.com/apps/contextMenus#property-create-createProperties.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/contextMenus#method-create.
Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in chrome.runtime.lastError. |create-properties| - https://developer.chrome.com/apps/contextMenus#property-create-createProperties. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/contextMenus#method-create.
(get-action-menu-top-level-limit)
The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored.
https://developer.chrome.com/apps/contextMenus#property-ACTION_MENU_TOP_LEVEL_LIMIT.
The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored. https://developer.chrome.com/apps/contextMenus#property-ACTION_MENU_TOP_LEVEL_LIMIT.
(remove menu-item-id)
Removes a context menu item.
|menu-item-id| - The ID of the context menu item to remove.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/contextMenus#method-remove.
Removes a context menu item. |menu-item-id| - The ID of the context menu item to remove. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/contextMenus#method-remove.
(remove-all)
Removes all context menu items added by this extension.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/contextMenus#method-removeAll.
Removes all context menu items added by this extension. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/contextMenus#method-removeAll.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.context-menus namespace.
Taps all valid non-deprecated events in chromex.app.context-menus namespace.
(tap-on-clicked-events channel & args)
Fired when a context menu item is clicked.
Events will be put on the |channel| with signature [::on-clicked [info tab]] where:
|info| - Information about the item clicked and the context where the click happened. |tab| - The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/contextMenus#event-onClicked.
Fired when a context menu item is clicked. Events will be put on the |channel| with signature [::on-clicked [info tab]] where: |info| - Information about the item clicked and the context where the click happened. |tab| - The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/contextMenus#event-onClicked.
(update id update-properties)
Updates a previously created context menu item.
|id| - The ID of the item to update. |update-properties| - The properties to update. Accepts the same values as the 'contextMenus.create' function.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/contextMenus#method-update.
Updates a previously created context menu item. |id| - The ID of the item to update. |update-properties| - The properties to update. Accepts the same values as the 'contextMenus.create' function. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/contextMenus#method-update.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close