microblog About

Bookmarklets for text manipulation — LaunchBar edition

A few years ago, I posted a few bookmarklets for copying the Title and Url of websites in different formats.

I still use them frequently, but in many cases I drop the resulting text to LaunchBar via its Instant Send functionality. By combining the old bookmarklets with the x-launchbar URL Scheme these new bookmarklets save me 1 step — and make me feel kinda cool.

Classic bookmarklet installation applies, just drag the ↗LBxx links below to your bookmark bar1:

  1. Send Markdown link to LaunchBar: <a href=javascript:void%20function()%7B(function()%7Bvar%20n=location.origin+location.pathname,o=document.title,t=window.getSelection().toString(),i=%22%5B%22+o+%22%5D(%22+n+%22)%250A%22+t;window.location=%22x-launchbar:select%3Fstring=%22+i%7D)()%7D();>↗LB𝙢𝙙

    [Make time for time - 5typos.net by Roberto Mateu](http://5typos.net/259/make-time-for-time)
  2. Send Markdown Reference link to LaunchBar: <a href=javascript:void%20function()%7B(function()%7Bvar%20n=location.origin+location.pathname,o=(document.title,location.host),o=o.replace(/%5Ewww./,%22%22),o=o.substring(0,4);text=window.getSelection().toString(),markdownLinkblog=%22%5B%22+o+%22%5D:%20%22+n+‘%20%22’+document.title+‘%22’,window.location=%22x-launchbar:select%3Fstring=%22+markdownLinkblog%7D)()%7D();>↗LB[𝙢𝙙]

[5typ]: http://5typos.net/259/make-time-for-time "Make time for time - 5typos.net by Roberto Mateu"
  1. Send Title and URL to LaunchBar: <a href=javascript:void%20function(){(function(){var%20n=location.origin+location.pathname,o=encodeURIComponent(document.title),t=encodeURIComponent(window.getSelection().toString()),e=o+%22%250A%22+n+%22%250A%22+t;window.location=%22x-launchbar:select%3Fstring=%22+e})()}();>↗LB𝘵𝘹
Make time for time - 5typos.net by Roberto Mateu

This last one is my current favorite. Since it works in Chrome, I can click on any page and easily invoke Share using Reminders or Share using Notes. Since Chrome doesn’t support OSX 10.11 share functionality, it cuts even more steps from my flow.

2016-05-12: Fixed an issue with the 3rd bookmarket, it woould not work if the text selected had a space in Chrome.

  1. For some reason I can only make the Title and URL ones work with Chrome. I’ll come back to the other two and try to figure out why. All three seems to work fine in Safari and Firefox.

Posted on May 11, 2016   #Productivity     #Bookmarklet     #tools  

← Next post    ·    Previous post →