Skip to content

Instantly share code, notes, and snippets.

@bfritz
Forked from oz/pentadactylrc
Created September 19, 2012 02:11
Show Gist options
  • Save bfritz/3747238 to your computer and use it in GitHub Desktop.
Save bfritz/3747238 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 pinboard 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 -desc 'Send current page to Instapaper' try { let doc = content.document; dactyl.assert(doc.body); doc.title = '(Saving...) ' + doc.title; doc.body.appendChild( DOM.fromJSON(["script", {type: "application/javascript", src: "http://www.instapaper.com/j/CJFRXrpfV0rU"}], doc)); } catch(e) { dactyl.echoerr('Please wait until the page has loaded.' + e); }
" Have more? :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment