aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-04-25 09:47:49 +0100
committerStephen Blott2015-04-25 10:12:42 +0100
commit7b3b3b4b7e9b9b39cf583e857c4f384a4fff7fb1 (patch)
treeaed331da03230c14ce50b1ecfbe1f5cfeb05131d /background_scripts/main.coffee
parentb1c27ca32fd3aa365990b959f22888c1d8d802ca (diff)
downloadvimium-7b3b3b4b7e9b9b39cf583e857c4f384a4fff7fb1.tar.bz2
Remove requirement for Chrome 41.
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee10
1 files changed, 4 insertions, 6 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 6fac032c..f11b3b4a 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -96,14 +96,12 @@ root.isEnabledForUrl = isEnabledForUrl = (request) ->
passKeys: rule?.passKeys or ""
}
-isEnabledForUpdatedUrl = (details) ->
- message = isEnabledForUrl details
- message.name = "updateEnabledForUrlState"
- chrome.tabs.sendMessage details.tabId, message, {frameId: details.frameId}
+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 isEnabledForUpdatedUrl # history.pushState.
-chrome.webNavigation.onReferenceFragmentUpdated.addListener isEnabledForUpdatedUrl # Hash changed.
+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.