diff options
| author | Stephen Blott | 2015-03-25 12:26:43 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-03-25 12:26:43 +0000 |
| commit | 43c59c238bb1b141c9664e7902a275814cc46258 (patch) | |
| tree | 7d17f7bb6613e1a737b52dcafbb7af7a5ddc0637 /content_scripts/vimium_frontend.coffee | |
| parent | 5abde2faa3cbcf070de82c5dffef93c553c7ad02 (diff) | |
| download | vimium-43c59c238bb1b141c9664e7902a275814cc46258.tar.bz2 | |
Check isEnabledForURL on hash change.
If an exclusion rule depends on the hash/anchor, then we're not picking
it up. Here's a concrete example of this:
- https?://ca*.computing.dcu.ie/[0-9]*-*#*
(which matches slides prepared via "slidy"). The initial URL does not
include the anchor/hash, so we miss the exclusion rule. The page is
bounced immediately to an anchor/hash for which the rule should apply,
and we miss it.
(There may be other ways in which the URL can change (WebNavigation?),
we need to look into this.)
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index f3bbb868..2c157978 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -223,9 +223,10 @@ onFocus = (event) -> chrome.runtime.sendMessage handler: "frameFocused", frameId: frameId, url: window.location.toString() checkIfEnabledForUrl() -# We install this listener directly (that is, we don't use installListener) because we still need to receive +# We install these listeners directly (that is, we don't use installListener) because we still need to receive # events when Vimium is not enabled. window.addEventListener "focus", onFocus +window.addEventListener "hashchange", onFocus # # Initialization tasks that must wait for the document to be ready. |
