Skip to content

Instantly share code, notes, and snippets.

@vilterp
Created November 4, 2008 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vilterp/22055 to your computer and use it in GitHub Desktop.
Save vilterp/22055 to your computer and use it in GitHub Desktop.
Chyrp Ubiquity command
CmdUtils.makeBookmarkletCommand({
name: "Chyrp this",
url: "javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://thinking-chair.com/notebook/admin/?action=bookmarklet',l=d.location,e=encodeURIComponent,p='&url='+e(l.href)+'&title='+e(d.title)+'&selection='+e(s),u=f+p;a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,status=1,width=450,height=430'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();void(0)"
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment