From 343f2329f35fc164946c4dda0819ba53414c3bdf Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 8 Apr 2015 18:53:51 -0300 Subject: More link copy commands --- pentadactylrc.dot.link | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pentadactylrc.dot.link b/pentadactylrc.dot.link index 9294509..8921d6f 100644 --- a/pentadactylrc.dot.link +++ b/pentadactylrc.dot.link @@ -21,6 +21,15 @@ set go+=n " Thanks to https://github.com/laurentb/public-dotfiles/blob/master/desktop/.pentadactyl/main.penta command yt :yank :echo document.title.replace(/ - Firefox$/, ''); +" Copy page as a Markdown link +command ymark :yank :echo '[' + document.title.replace(/ - Firefox$/, '') + '](' + buffer.URL + ')'; + +" Copy page as a Trac wiki link +command ytrac :yank :echo '[' + buffer.URL + ' ' + document.title.replace(/ - Firefox$/, '') + ']'; + +" Copy page for sharing +command yshare :yank :echo document.title.replace(/ - Firefox$/, '') + ' - ' + buffer.URL; + " Open a new tab or the homepage map e :tabopen about:newtab map h gH -- cgit v1.2.3