aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2018-09-05 04:57:40 +0100
committerStephen Blott2018-09-05 04:57:40 +0100
commit881a6fdc3644f55fc02ad56454203f654cc76618 (patch)
treeeb8e5bd8dadd7af253a279762fc9130419447e30
parent0c1c9aec195889b7ce8a26dff637179e395e7a89 (diff)
downloadvimium-881a6fdc3644f55fc02ad56454203f654cc76618.tar.bz2
"Make yf strip any leading "mailto:".
When yanking an email URL with `yf`, it's likely to be more useful to strip the leading "mailto:". Fixes #3123.
-rw-r--r--content_scripts/link_hints.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 86cc4e4f..231f65ef 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -31,8 +31,9 @@ COPY_LINK_URL =
indicator: "Copy link URL to Clipboard"
linkActivator: (link) ->
if link.href?
- HUD.copyToClipboard link.href
url = link.href
+ url = url[7..] if url[...7] == "mailto:"
+ HUD.copyToClipboard url
url = url[0..25] + "...." if 28 < url.length
HUD.showForDuration "Yanked #{url}", 2000
else