This page shows you how to quickly and easily create a Javascript bookmarklet and how to save the Javascript bookmarklet to your web browsers bookmarks. This makes it so all you have to do click the bookmarklet from the web browser bookmarks section to run your Javascript code.

All a Javascript bookmarklet is is Javascript code that is wrapped with the following: javascript:(function() { // javascript code goes in here }());. Here is an explanation:

  • The first part javascript: is telling the web browser that what follows is javascript code.
  • The rest of the wrapper (function() { }()); is so your Javascript bookmarket code does not clash with any other Javascript code on the current web page. (the // javascript code goes here is just a javascript comment and does nothing) Although you are not going to break the internet, without that wrapper code, your Javascript bookmarklet code won't ...