From 8a659af44a8205f39e4c0e04146978447ca3f38e Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Fri, 24 Apr 2015 12:02:09 +0100 Subject: Get incognto state directly from chrome.extensions.inIncognitoContext --- content_scripts/vimium_frontend.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 6c09ab72..7b99287e 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -12,7 +12,7 @@ findModeInitialRange = null isShowingHelpDialog = false keyPort = null isEnabledForUrl = true -isIncognitoMode = false +isIncognitoMode = chrome.extension.inIncognitoContext passKeys = null keyQueue = null # The user's operating system. @@ -551,9 +551,7 @@ checkIfEnabledForUrl = -> url = window.location.toString() chrome.runtime.sendMessage { handler: "isEnabledForUrl", url: url }, (response) -> - isEnabledForUrl = response.isEnabledForUrl - passKeys = response.passKeys - isIncognitoMode = response.incognito + {isEnabledForUrl, passKeys} = response if isEnabledForUrl initializeWhenEnabled() else if HUD.isReady() -- cgit v1.2.3