diff options
| author | Stephen Blott | 2018-09-04 13:16:26 +0100 |
|---|---|---|
| committer | Stephen Blott | 2018-09-04 13:16:28 +0100 |
| commit | 339f37fb5c19f5129c7757294d8c5968be9c9db2 (patch) | |
| tree | d583112e1befd1fa42e8d0f2c510699958db407f | |
| parent | 09b6be12a1eb7fa839509b1e7fa9fb594827cf3e (diff) | |
| download | vimium-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.coffee | 2 |
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. |
