diff options
| author | mrmr1993 | 2014-12-18 10:40:33 +0000 |
|---|---|---|
| committer | mrmr1993 | 2014-12-18 10:48:13 +0000 |
| commit | 4e6513c47b6be2e771b2a8db6d5506d157368602 (patch) | |
| tree | abe8db4e24f061a6ef141ad4dd80de74ccb7fb7c | |
| parent | 855e9a4e19ab0926f5531c37272f00a715f45ed8 (diff) | |
| download | vimium-4e6513c47b6be2e771b2a8db6d5506d157368602.tar.bz2 | |
Add link hint support for jsaction event listeners
This was adapted from PR #1316, commit
846a19efe51bfc639ae1ee84e18a5f2d3e12aaff
| -rw-r--r-- | content_scripts/link_hints.coffee | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 721070bb..231e4ecd 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -157,6 +157,13 @@ LinkHints = element.getAttribute("contentEditable")?.toLowerCase() in ["", "contentEditable", "true"]) isClickable = true + # Check for jsaction event listeners on the element. + if element.hasAttribute "jsaction" + jsactionRules = element.getAttribute("jsaction").split(";") + for jsactionRule in jsactionRules + ruleSplit = jsactionRule.split ":" + isClickable = true if ruleSplit[0] == "click" or (ruleSplit.length == 1 and ruleSplit[0] != "none") + # Check for tagNames which are natively clickable. switch tagName when "a" |
