title: How to create Bookmarklet for my website which requires user authentication
body: <p>I want to create a bookmarklet for my website. I just want to do same as <a href="http://readitlaterlist.com/" rel="nofollow">Readitlater</a> or as  <a href="http://delicious.com/" rel="nofollow">delicious</a>. 
  Whenever you click on <strong>Read It Later</strong> or <strong>save on delicious</strong> bookmarklet if user is  not logged in, it asks user to login to continue &amp; then save the bookmark. Otherwise if user is  logged in then it  directly saves the bookmark for user.</p>
  
  <p>I want to implement exactly the same in my website &amp; I am working on Ruby on Rails platform.
  I have following javascript code for bookmarklet</p>
  
  <pre><code>&lt;a href="javascript:u=document.location.href;t=document.title; s=window.getSelection();
  void(window.open('http://www.example.com/node/add/web2ob?edit[title]='+escape(t)+
  '&amp;edit[body_field][body]='+escape(s)+'&amp;edit[field_link][0][url]='+escape(u),
  '_blank','width=600,height=500,status=yes,resizable=yes,scrollbars=yes'));"&gt;
  Add to my list&lt;/a&gt;
  </code></pre>
  
  <p>I am new to this stuff so please guide me.
  Thank you!</p>