I'm trying to modify an old FireFox extension that was custom written by someone who is long gone (Firefox 50 -Please no comments about how old it is)
I need to add to the extension the ability to determine if it is in a regular browser window or a private window.
According to this post I should be able to use console.log(browser.extension.inIncognitoContext);
When I try it in the web console, I get 'ReferenceError: browser is not defined'
I also found this extension.inIncognitoContext but couldnt get let isPrivate = browser.extension.inIncognitoContext; to work either.
Some help getting my extension to determine browser mode woudld 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 browser mode.