Skip to content

Commit 339f37f

Browse files
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.
1 parent 09b6be1 commit 339f37f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content_scripts/vimium_frontend.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ onFocus = forTrusted (event) ->
176176
# We install these listeners directly (that is, we don't use installListener) because we still need to receive
177177
# events when Vimium is not enabled.
178178
window.addEventListener "focus", onFocus
179-
window.addEventListener "hashchange", -> checkEnabledAfterURLChange()
179+
window.addEventListener "hashchange", checkEnabledAfterURLChange
180180

181181
initializeOnDomReady = ->
182182
# Tell the background page we're in the domReady state.

0 commit comments

Comments
 (0)