According to this post https://stackoverflow.com/questions/41709369/detect-incognito-mode-in-an-content-script should be able to use
- Code: Select all
console.log(browser.extension.inIncognitoContext);
When I try it in the web console or in my extension, I get 'ReferenceError: browser is not defined'
Some help getting my extension to determine browser mode would be appreciated. Either using above idea, or I saw in my searching there was mention (but no examples) of API's that extensions could use to determine if they were in private mode.