Skip to content

Instantly share code, notes, and snippets.

@rmateu
Last active March 15, 2017 04:37
Show Gist options
  • Save rmateu/a8d02a4605ab92021c1cdd488c37ad95 to your computer and use it in GitHub Desktop.
Save rmateu/a8d02a4605ab92021c1cdd488c37ad95 to your computer and use it in GitHub Desktop.
Bookmarklet: Send URL and Title to LaunchBar
(function bookmarklet() {
var url = location.origin + location.pathname,
title = encodeURIComponent(document.title),
text = encodeURIComponent(window.getSelection().toString()),
TextCopy = title + '%0A' + url + '%0A' + text;
window.location='x-launchbar:select?string='+TextCopy;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment