Ruby and Rails Related Tips - Back to RailsTips Article - Video Requires Quicktime
<p>
<a href="javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f= 'http://<%= request.host_with_port %>/bookmarks/new',l=d.location,e=encodeURIComponent,p='?v=1&u='+e(l.href)%20+'&t='+e(d.title.replace(/^\s*|\s*$/g,''))%20+'&s='+e(s),u=f+p;location.href=u;">
Bookmarklet
</a>
</p>
@bookmark.title = params[:t]
@bookmark.content = params[:s]
@bookmark.url = params[:u]