Skip to content

Instantly share code, notes, and snippets.

@xiongchiamiov
Created December 17, 2010 09:28
Show Gist options
  • Save xiongchiamiov/744705 to your computer and use it in GitHub Desktop.
Save xiongchiamiov/744705 to your computer and use it in GitHub Desktop.
Pinboard.in bookmarklet for accessing bookmarks
// Assuming a keyword of 'pin',
// 'pin' will retrieve all bookmarks
// 'pin linux' will retrieve all bookmarks tagged 'linux'
// 'pin linux tools' will retrieve all bookmarks tagged both 'linux' and 'tools'
javascript:params='%s';url='http://pinboard.in/u:xiong.chiamiov';if(params!=''){tags=params.split('%20');for(i=0;i<tags.length;i++){url+='/t:'+tags[i];}}location.href=url;
@xiongchiamiov
Copy link
Author

Took me quite a while to realize that %s needed to be in quotes. If someone finds out where to get debug information on bookmarklets, please let me know.

I've only tested this in my current browser, which is a Firefox 4 nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment