From 43c59c238bb1b141c9664e7902a275814cc46258 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 25 Mar 2015 12:26:43 +0000 Subject: 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.) --- content_scripts/vimium_frontend.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3