diff options
| author | Stephen Blott | 2015-02-23 12:54:29 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-02-23 12:54:29 +0000 |
| commit | b256d8463df4a68b096bf784c9f56899a7b7e57c (patch) | |
| tree | 79324b519dfc01e77bbe09c583eb7cecdc951612 /background_scripts | |
| parent | 14c46e12d385f65db5c905dc57de0b37f80cca7b (diff) | |
| parent | 608f892402869b44f1a3d5d6843cf9ae164bd2ea (diff) | |
| download | vimium-b256d8463df4a68b096bf784c9f56899a7b7e57c.tar.bz2 | |
Merge pull request #1505 from smblott-github/fix-incognito-and-find-history-initialisation
Ensure incognito-mode flag and find-mode-history are initialised.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 1301cb77..9eafc2a2 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -77,11 +77,12 @@ getCurrentTabUrl = (request, sender) -> sender.tab.url # Checks the user's preferences in local storage to determine if Vimium is enabled for the given URL, and # whether any keys should be passed through to the underlying page. # -root.isEnabledForUrl = isEnabledForUrl = (request) -> +root.isEnabledForUrl = isEnabledForUrl = (request, sender) -> rule = Exclusions.getRule(request.url) { isEnabledForUrl: not rule or rule.passKeys passKeys: rule?.passKeys or "" + incognito: sender.tab.incognito } # Retrieves the help dialog HTML template from a file, and populates it with the latest keybindings. @@ -371,7 +372,7 @@ root.updateActiveState = updateActiveState = (tabId) -> if response isCurrentlyEnabled = response.enabled currentPasskeys = response.passKeys - config = isEnabledForUrl({url: tab.url}) + config = isEnabledForUrl { url: tab.url }, { tab: tab } enabled = config.isEnabledForUrl passKeys = config.passKeys if (enabled and passKeys) |
