diff options
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 642913a5..f11b3b4a 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -89,14 +89,20 @@ 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, sender) -> +root.isEnabledForUrl = isEnabledForUrl = (request) ->    rule = Exclusions.getRule(request.url)    {      isEnabledForUrl: not rule or rule.passKeys      passKeys: rule?.passKeys or "" -    incognito: sender.tab.incognito    } +onURLChange = (details) -> +  chrome.tabs.sendMessage details.tabId, name: "checkEnabledAfterURLChange" + +# Re-check whether Vimium is enabled for a frame when the url changes without a reload. +chrome.webNavigation.onHistoryStateUpdated.addListener onURLChange # history.pushState. +chrome.webNavigation.onReferenceFragmentUpdated.addListener onURLChange # Hash changed. +  # Retrieves the help dialog HTML template from a file, and populates it with the latest keybindings.  # This is called by options.coffee.  root.helpDialogHtml = (showUnboundCommands, showCommandNames, customTitle) -> | 
