Last active
May 12, 2016 02:42
-
-
Save rmateu/8473716a1d193988502c236d516b5dea to your computer and use it in GitHub Desktop.
Bookmarklet Send to Launchbar Markdown Reference Link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function bookmarklet() { | |
var url = location.origin + location.pathname, | |
title = encodeURIComponent(document.title), | |
site = location.host, | |
site = site.replace(/^www./,''), | |
site = site.substring(0, 4); | |
text = window.getSelection().toString(), | |
markdownLinkblog = '[' + site + ']' + ': ' + url + ' "' + title + '"'; | |
window.location='x-launchbar:select?string='+markdownLinkblog; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment