Skip to content

Instantly share code, notes, and snippets.

@gerald-kim
Created February 3, 2012 07:33
Show Gist options
  • Save gerald-kim/1728779 to your computer and use it in GitHub Desktop.
Save gerald-kim/1728779 to your computer and use it in GitHub Desktop.
pinboard search bookmarklet
coffee -c pinboard.coffee ; echo -n 'javascript:'; cat pinboard.js | tr '\n' ' ' | sed 's/ / /g' | sed 's/ / /g'
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