Skip to content

Instantly share code, notes, and snippets.

@oz
Created April 14, 2011 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oz/920837 to your computer and use it in GitHub Desktop.
Save oz/920837 to your computer and use it in GitHub Desktop.
A few bookmarklets I converted to Pentadactyl commands...
" Bookmark page with Pinboard.in
com -nargs=0 pin execute "open " + function(doc) { if(doc.getSelection){s=doc.getSelection();}else{s='';}; return 'https://pinboard.in/add?next=same&url='+encodeURIComponent(doc.location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(doc.title) }(content.document)
" Read page later with Instapaper.com
com -nargs=0 readlater javascript (function(d){var z=d.createElement('scr'+'ipt'),b=d.body;try{if(!b)throw(0);d.title='(Saving...)'+d.title;z.setAttribute('src','http://www.instapaper.com/j/CJFRXrpfV0rU');b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}void(0)})(content.document)
" Have more? :)
@emlun
Copy link

emlun commented Sep 30, 2014

This one saves you from having to reach for the mouse to vote on Stack Overflow and the like. ;D (:vote and then f up)

group -description "Stack Exchange network" -locations=stackexchange.com,stackoverflow.com,superuser.com stackexchange
command -description "Make Stack Exchange vote buttons clickable" -group stackexchange -nargs=0 vote javascript (function() { $('.vote a').attr('href', 'javascript:void(0)'); })()

Here's a gist too, to make it easier for Google etc. to find it: https://gist.github.com/emlun/4ea148b1166ec7b1e6dc

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