aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2018-09-04 13:16:26 +0100
committerStephen Blott2018-09-04 13:16:28 +0100
commit339f37fb5c19f5129c7757294d8c5968be9c9db2 (patch)
treed583112e1befd1fa42e8d0f2c510699958db407f
parent09b6be12a1eb7fa839509b1e7fa9fb594827cf3e (diff)
downloadvimium-339f37fb5c19f5129c7757294d8c5968be9c9db2.tar.bz2
Use function directly.
If Vimium becomes disabled, then we remove this listener. So we better add the actual function we want to (later) remove, rather than creating a new function (which will never be removed.
-rw-r--r--content_scripts/vimium_frontend.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 6fa118cf..ff27c8a4 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -176,7 +176,7 @@ onFocus = forTrusted (event) ->
# 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", -> checkEnabledAfterURLChange()
+window.addEventListener "hashchange", checkEnabledAfterURLChange
initializeOnDomReady = ->
# Tell the background page we're in the domReady state.