aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authormrmr19932016-01-30 19:13:50 +0000
committermrmr19932016-01-30 19:13:50 +0000
commit4f77df0084ede4cf0c35b196b9139f412c37c496 (patch)
tree15c586d829c61e2b8a4c0c86bf550d657f94040d /content_scripts
parent07e2bd2fbb0e404af1bb5dfabef94299565171bd (diff)
downloadvimium-4f77df0084ede4cf0c35b196b9139f412c37c496.tar.bz2
Rework unhovering to occur automatically for all simulated hovers
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/link_hints.coffee12
1 files changed, 1 insertions, 11 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index fad6b839..13e2a17b 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -93,7 +93,6 @@ class LinkHintsMode
else
@hintMode.setIndicator "Open multiple links in new tabs."
@linkActivator = (link) ->
- @unhoverLast link
# When "clicking" on a link, dispatch the event with the appropriate meta key (CMD on Mac, CTRL on
# windows) to open it in a new tab if necessary.
DomUtils.simulateClick link,
@@ -118,13 +117,10 @@ class LinkHintsMode
else if @mode is DOWNLOAD_LINK_URL
@hintMode.setIndicator "Download link URL."
@linkActivator = (link) ->
- @unhoverLast link
DomUtils.simulateClick link, altKey: true, ctrlKey: false, metaKey: false
else # OPEN_IN_CURRENT_TAB
@hintMode.setIndicator "Open link in current tab."
- @linkActivator = (link) ->
- @unhoverLast link
- DomUtils.simulateClick link
+ @linkActivator = DomUtils.simulateClick.bind DomUtils
#
# Creates a link marker for the given link.
@@ -381,12 +377,6 @@ class LinkHintsMode
else
@deactivateMode delay
- unhoverLast: do ->
- lastHoveredElement = null
- (element) ->
- DomUtils.simulateUnhover lastHoveredElement if lastHoveredElement?
- lastHoveredElement = element
-
#
# Shows the marker, highlighting matchingCharCount characters.
#