aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932015-06-02 16:57:11 +0100
committermrmr19932015-06-10 17:21:23 +0100
commit36fe16dcafd57484bf4219262c67cc5612bad722 (patch)
treec0873cab7c9ffe28f8d5d2be99196f4f37dac685
parent673cd268223cdbf1c8ecd47a5826291a91b955d6 (diff)
downloadvimium-36fe16dcafd57484bf4219262c67cc5612bad722.tar.bz2
Make FindModeHistory independent of the rest of vimium_frontend
-rw-r--r--content_scripts/vimium_frontend.coffee7
1 files changed, 4 insertions, 3 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index e5a0f61a..295736c6 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -630,15 +630,16 @@ window.FindModeHistory =
key: "findModeRawQueryList"
max: 50
rawQueryList: null
+ isIncognitoMode: chrome.extension.inIncognitoContext
init: ->
unless @rawQueryList
@rawQueryList = [] # Prevent repeated initialization.
- @key = "findModeRawQueryListIncognito" if isIncognitoMode
+ @key = "findModeRawQueryListIncognito" if @isIncognitoMode
@storage.get @key, (items) =>
unless chrome.runtime.lastError
@rawQueryList = items[@key] if items[@key]
- if isIncognitoMode and not items[@key]
+ if @isIncognitoMode and not items[@key]
# This is the first incognito tab, so we need to initialize the incognito-mode query history.
@storage.get "findModeRawQueryList", (items) =>
unless chrome.runtime.lastError
@@ -657,7 +658,7 @@ window.FindModeHistory =
newSetting = {}; newSetting[@key] = @rawQueryList
@storage.set newSetting
# If there are any active incognito-mode tabs, then propagte this query to those tabs too.
- unless isIncognitoMode
+ unless @isIncognitoMode
@storage.get "findModeRawQueryListIncognito", (items) =>
if not chrome.runtime.lastError and items.findModeRawQueryListIncognito
@storage.set