Get list of chrome extensions allowed in Incognito Mode

365 views Asked by At

By using chrome API it is available to get list of all installed extensions.

I am using this code:

chrome.management.getAll(function (list) {
    for (var i = list.length - 1; i >= 0; i--) {
        var extension = list[i];
        console.log(extension); // contains id, enabled, name, version, type, ...
    }
});

The problem is, extensions can be allowed to run in Incognito Mode. But there is no property to check if a specified extension is allowed?

I need to know if user is in incognito mode, and a specified extension is enable, is it allowed in incognito mode too?

As a final bullet, Get a list of icons in menu bar can do the trick (Not allowed extension will not show in menubar) but couldn't find anything.

Any suggestion will be greatly appreciated.

1

There are 1 answers

1
Haibara Ai On

To know if user is in incognito mode, inject a content script and call chrome.extension.inIncognitoContext should help; as for detect the state of other extensions, seems no workarounds at present.