Dojo Toolkit API Bookmarklet

By  on  

You probably know by know that I enjoy using JavaScript-powered bookmarklets to retrieve information.  I create a jQuery documentation bookmarklet, a MooTools class sniffer bookmarklet, and a  even a bookmarklet to allow you to submit articles to Script & Style.  I work extensively with Dojo on a day to day basis so I end up needing to review documentation often.  I got tired of using the API's search methods and instead chose to create a bookmarklet to get quick access to what I want.

The JavaScript

(function()%7Bvar%20d=document,w=window,ds=d.getSelection,ws=w.getSelection,ss=d.selection;t=(ws)%3Fws():(ds)%3Fds():(ss)%3Fss.createRange().text:'';t=(t.toString().length)%3Ft:prompt('Please select the Dojo resource you would like to research.','');if(t)%7Ba='http://dojotoolkit.org/api/';u=a+t.split('.').join('/');f=function()%7Bx=w.open(u,'dwin','scrollbars=1,toolbar=0,resizable=1,status=1,width=600,height=600');if(!x)w.location.href=u;%7D;if(/Firefox/.test(navigator.userAgent))setTimeout(f,0);else%20f();%7D%7D)();

What a mess!  Don't worry about it -- it's compact because your browsers want it that way. You may simply click the bookmarklet and type in the class name you want to find (ex: dijit.layout.TabContainer), or highlight a class name in the page and click the bookmarklet.

Have fun with this bookmarklet -- it may save you some time.

Recent Features

  • By
    JavaScript Promise API

    While synchronous code is easier to follow and debug, async is generally better for performance and flexibility. Why "hold up the show" when you can trigger numerous requests at once and then handle them when each is ready?  Promises are becoming a big part of the JavaScript world...

  • By
    5 More HTML5 APIs You Didn’t Know Existed

    The HTML5 revolution has provided us some awesome JavaScript and HTML APIs.  Some are APIs we knew we've needed for years, others are cutting edge mobile and desktop helpers.  Regardless of API strength or purpose, anything to help us better do our job is a...

Incredible Demos

  • By
    Digg-Style Dynamic Share Widget Using the Dojo Toolkit

    I've always seen Digg as a very progressive website. Digg uses experimental, ajaxified methods for comments and mission-critical functions. One nice touch Digg has added to their website is their hover share widget. Here's how to implement that functionality on your site...

  • By
    Xbox Live Gamer API

    My sharpshooter status aside, I've always been surprised upset that Microsoft has never provided an API for the vast amount of information about users, the games they play, and statistics within the games. Namely, I'd like to publicly shame every n00b I've baptized with my...

Discussion

  1. 虫子樱桃

    well done!thx!

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!