0

I am looking for a way to detect, within an extension, if a Chrome browser install CAN be opened in Incognito mode: I need to find the value of IncognitoModeAvailability.

I am not looking to find out if the browser IS in Incognito mode. Nor am I looking to find out if the extension will work in Incognito. Nor am I trying to make an extension work in Incognito.

I'd like the Chrome extension to be able to detect if the Chrome browser install even HAS an incognito mode as a possibility. Having trouble finding anything that speaks to this.

Any assistance is appreciated!

gcdev
  • 1,406
  • 3
  • 17
  • 30
  • 1
    Assuming you want to detect if it was disabled via [IncognitoModeAvailability](https://www.chromium.org/administrators/policy-list-3#IncognitoModeAvailability) policy, there's no API for extensions for that. You'll have to write a separate utility, which you'll invoke using [nativeMessaging](https://developer.chrome.com/extensions/nativeMessaging), so it checks the various policy configs (like Windows Registry) directly and reports back to the extension. – wOxxOm May 16 '19 at 06:06
  • Have you check [this SO post (Can you determine if Chrome is in incognito mode via a script?)](https://stackoverflow.com/questions/2909367/can-you-determine-if-chrome-is-in-incognito-mode-via-a-script)? – MαπμQμαπkγVπ.0 May 16 '19 at 08:28
  • wOxxOm, determining IncognitoModeAvailability was exactly what I was looking for, yes, though I need to be able to do it entirely within an extension rather than having a user install something else first. – gcdev May 16 '19 at 11:51

0 Answers0