aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2018-02-04 12:37:54 +0000
committerStephen Blott2018-02-04 12:37:58 +0000
commita5e0f989c3f02c2bbe16517ae67a3e151860c1cc (patch)
treedf4fc85eaccb91b537f80d89110654fd4f2f10ac
parent3a4db76703e852670ca1078b2205edffcaa3efcf (diff)
downloadvimium-a5e0f989c3f02c2bbe16517ae67a3e151860c1cc.tar.bz2
Tweak #2941.
-rw-r--r--content_scripts/injected.coffee7
1 files changed, 3 insertions, 4 deletions
diff --git a/content_scripts/injected.coffee b/content_scripts/injected.coffee
index 00b083b0..5b614763 100644
--- a/content_scripts/injected.coffee
+++ b/content_scripts/injected.coffee
@@ -13,9 +13,8 @@ injectedCode = () ->
addEventListener = (type, listener, useCapture) ->
if type == "click" and this instanceof EL
- try
- unless this instanceof Anchor # just skip <a>
- @setAttribute "_vimium-has-onclick-listener", ""
+ unless this instanceof Anchor # Just skip <a>.
+ try @setAttribute "_vimium-has-onclick-listener", ""
_addEventListener?.apply this, arguments
newToString = () ->
@@ -28,7 +27,7 @@ injectedCode = () ->
# Libraries like Angular/Zone and CKEditor check if element.addEventListener is native,
# so here we hook it to tell outsides it is exactly native.
# This idea is from https://github.com/angular/zone.js/pull/686,
- # and see more discussions in https://github.com/ckeditor/ckeditor5-build-classic/issues/34
+ # and see more discussions in https://github.com/ckeditor/ckeditor5-build-classic/issues/34.
Function::toString = newToString
script = document.createElement "script"