Use actions to put icons in the main Google Chrome toolbar, to the right of the address bar. Actions can be set to take action on all pages (default_state: enabled) or only the current page (default_state: disabled). If an action is default disabled, the action appears grayed out when inactive. In addition to its icon, an action can also have a tooltip, a badge, and a popup.
Use actions to put icons in the main Google Chrome toolbar, to the right of the address bar. Actions can be set to take action on all pages (default_state: enabled) or only the current page (default_state: disabled). If an action is default disabled, the action appears grayed out when inactive. In addition to its icon, an action can also have a tooltip, a badge, and a popup. * available since Chrome 86 * https://developer.chrome.com/extensions/action
(disable)
(disable tab-id)
Disables the action for a tab.
|tab-id| - The id of the tab for which you want to modify the action.
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/extensions/action#method-disable.
Disables the action for a tab. |tab-id| - The id of the tab for which you want to modify the action. 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/extensions/action#method-disable.
(enable)
(enable tab-id)
Enables the action for a tab. By default, actions are enabled.
|tab-id| - The id of the tab for which you want to modify the action.
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/extensions/action#method-enable.
Enables the action for a tab. By default, actions are enabled. |tab-id| - The id of the tab for which you want to modify the action. 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/extensions/action#method-enable.
(get-badge-background-color details)
Gets the background color of the action.
|details| - https://developer.chrome.com/extensions/action#property-getBadgeBackgroundColor-details.
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 [result] where:
|result| - https://developer.chrome.com/extensions/action#property-callback-result.
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/extensions/action#method-getBadgeBackgroundColor.
Gets the background color of the action. |details| - https://developer.chrome.com/extensions/action#property-getBadgeBackgroundColor-details. 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 [result] where: |result| - https://developer.chrome.com/extensions/action#property-callback-result. 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/extensions/action#method-getBadgeBackgroundColor.
(get-badge-text details)
Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned.
|details| - https://developer.chrome.com/extensions/action#property-getBadgeText-details.
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 [result] where:
|result| - https://developer.chrome.com/extensions/action#property-callback-result.
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/extensions/action#method-getBadgeText.
Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned. |details| - https://developer.chrome.com/extensions/action#property-getBadgeText-details. 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 [result] where: |result| - https://developer.chrome.com/extensions/action#property-callback-result. 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/extensions/action#method-getBadgeText.
(get-popup details)
Gets the html document set as the popup for this action.
|details| - https://developer.chrome.com/extensions/action#property-getPopup-details.
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 [result] where:
|result| - https://developer.chrome.com/extensions/action#property-callback-result.
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/extensions/action#method-getPopup.
Gets the html document set as the popup for this action. |details| - https://developer.chrome.com/extensions/action#property-getPopup-details. 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 [result] where: |result| - https://developer.chrome.com/extensions/action#property-callback-result. 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/extensions/action#method-getPopup.
(get-title details)
Gets the title of the action.
|details| - https://developer.chrome.com/extensions/action#property-getTitle-details.
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 [result] where:
|result| - https://developer.chrome.com/extensions/action#property-callback-result.
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/extensions/action#method-getTitle.
Gets the title of the action. |details| - https://developer.chrome.com/extensions/action#property-getTitle-details. 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 [result] where: |result| - https://developer.chrome.com/extensions/action#property-callback-result. 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/extensions/action#method-getTitle.
(set-badge-background-color details)
Sets the background color for the badge.
|details| - https://developer.chrome.com/extensions/action#property-setBadgeBackgroundColor-details.
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/extensions/action#method-setBadgeBackgroundColor.
Sets the background color for the badge. |details| - https://developer.chrome.com/extensions/action#property-setBadgeBackgroundColor-details. 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/extensions/action#method-setBadgeBackgroundColor.
(set-badge-text details)
Sets the badge text for the action. The badge is displayed on top of the icon.
|details| - https://developer.chrome.com/extensions/action#property-setBadgeText-details.
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/extensions/action#method-setBadgeText.
Sets the badge text for the action. The badge is displayed on top of the icon. |details| - https://developer.chrome.com/extensions/action#property-setBadgeText-details. 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/extensions/action#method-setBadgeText.
(set-icon details)
Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
|details| - https://developer.chrome.com/extensions/action#property-setIcon-details.
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/extensions/action#method-setIcon.
Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified. |details| - https://developer.chrome.com/extensions/action#property-setIcon-details. 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/extensions/action#method-setIcon.
(set-popup details)
Sets the html document to be opened as a popup when the user clicks on the action's icon.
|details| - https://developer.chrome.com/extensions/action#property-setPopup-details.
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/extensions/action#method-setPopup.
Sets the html document to be opened as a popup when the user clicks on the action's icon. |details| - https://developer.chrome.com/extensions/action#property-setPopup-details. 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/extensions/action#method-setPopup.
(set-title details)
Sets the title of the action. This shows up in the tooltip.
|details| - https://developer.chrome.com/extensions/action#property-setTitle-details.
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/extensions/action#method-setTitle.
Sets the title of the action. This shows up in the tooltip. |details| - https://developer.chrome.com/extensions/action#property-setTitle-details. 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/extensions/action#method-setTitle.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.action namespace.
Taps all valid non-deprecated events in chromex.ext.action namespace.
(tap-on-clicked-events channel & args)
Fired when an action icon is clicked. This event will not fire if the action has a popup.
Events will be put on the |channel| with signature [::on-clicked [tab]] where:
|tab| - https://developer.chrome.com/extensions/action#property-onClicked-tab.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/action#event-onClicked.
Fired when an action icon is clicked. This event will not fire if the action has a popup. Events will be put on the |channel| with signature [::on-clicked [tab]] where: |tab| - https://developer.chrome.com/extensions/action#property-onClicked-tab. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/action#event-onClicked.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close