Chrome Extension : get the icon of another extension

Viewed 33

I am injecting a widget inside the webpage, and in this widget there is a tab where I want to show all conflicting extensions with their icon, is that possible ?

If yes, then how ?

Thanks

1 Answers

The chrome.management API has the chrome.management.getAll() function, which returns detailed information about all installed extensions. This includes the ID and the icons.

Documentation:

https://developer.chrome.com/docs/extensions/reference/management/

Example:

manifest.json

{
    "manifest_version": 3,
    "name": "Management API (Test Extension)",
    "version": "1.0",
    "action": {
        "default_title": "Management API (Test Extension)"
    },
    "background": {
        "service_worker": "background.js"
    },
    "permissions": [
        "management"
    ]
}

background.js

async function onClicked(tab, onClickData) {
    let result = await chrome.management.getAll();
    console.log(result);
}

chrome.action.onClicked.addListener(onClicked);
Related