aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authormrmr19932015-04-24 12:02:09 +0100
committermrmr19932015-04-24 14:08:54 +0100
commit8a659af44a8205f39e4c0e04146978447ca3f38e (patch)
tree46d1441df41944e47b868590d496997d5f896662 /content_scripts/vimium_frontend.coffee
parentef44d0ff49cec17a758b65c10ba4c0ecbc0c2ece (diff)
downloadvimium-8a659af44a8205f39e4c0e04146978447ca3f38e.tar.bz2
Get incognto state directly from chrome.extensions.inIncognitoContext
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee6
1 files changed, 2 insertions, 4 deletions
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()