Skip to content

Commit 881a6fd

Browse files
"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 philc#3123.
1 parent 0c1c9ae commit 881a6fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content_scripts/link_hints.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ COPY_LINK_URL =
3131
indicator: "Copy link URL to Clipboard"
3232
linkActivator: (link) ->
3333
if link.href?
34-
HUD.copyToClipboard link.href
3534
url = link.href
35+
url = url[7..] if url[...7] == "mailto:"
36+
HUD.copyToClipboard url
3637
url = url[0..25] + "...." if 28 < url.length
3738
HUD.showForDuration "Yanked #{url}", 2000
3839
else

0 commit comments

Comments
 (0)