Created
February 3, 2012 07:33
-
-
Save gerald-kim/1728779 to your computer and use it in GitHub Desktop.
pinboard search bookmarklet
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
coffee -c pinboard.coffee ; echo -n 'javascript:'; cat pinboard.js | tr '\n' ' ' | sed 's/ / /g' | sed 's/ / /g' |
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
q = prompt('Search') | |
l = window.location.href | |
t = 'https://pinboard.in/search/?mine=Search+Mine&query=' + encodeURIComponent(q) | |
if (l != '' && !l.match('^about:') && !l.match('pinboard.in')) | |
window.open(t) | |
else | |
location.href = t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment