

Ask YC: How do you build a bookmarklet? - qwestion

I a non-programming founder trying to contribute towards the development of our web app and tonight I was trying to create a javascript bookmarklet to easily submit content to our Social News from my Firefox toolbar. My search skills are not too bad, but I couldn't find something that worked for me. I still have a lot of questions unanswered. Hence I decided to ask you, the all knowing YC crowd.<p>Any help?
======
bazookaaa
Looking at del.icio.us's bookmarklet may be a good start:

    
    
      javascript:location.href='http://del.icio.us/post?v=4;url='+encodeURIComponent(location.href)+';title='+encodeURIComponent(document.title.replace(/%5E%5Cs*%7C%5Cs*$/g,''))
    

Basically, it redirects the browser to <http://del.icio.us/post?v=4> and
passes two parameters to the URL: "url" and "title" which just contains the
url and the website title of the previous website you were on.

------
prakash
This one address your question: [http://betterexplained.com/articles/how-to-
make-a-bookmarkle...](http://betterexplained.com/articles/how-to-make-a-
bookmarklet-for-your-web-application/)

------
ScottWhigham
The obvious choice:
<http://www.google.com/search?q=how+to+build+a+bookmarklet>

------
seregine
Have you seen this wikipedia page? It has some good references:

<http://en.wikipedia.org/wiki/Bookmarklet>

The basic idea is that you create a link on your page that points to a
"javascript:" URL. This link can become a bookmark just like any other link.
The javascript in the link's URL implements your bookmarklet functionality.

