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
    5 Ways that CSS and JavaScript Interact That You May Not Know About

    CSS and JavaScript:  the lines seemingly get blurred by each browser release.  They have always done a very different job but in the end they are both front-end technologies so they need do need to work closely.  We have our .js files and our .css, but...

  • By
    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...

Incredible Demos

  • By
    WebKit-Specific Style:  -webkit-appearance

    I was recently scoping out the horrid source code of the Google homepage when I noticed the "Google Search" and "I'm Feeling Lucky" buttons had a style definition I hadn't seen before:  -webkit-appearance.  The value assigned to the style was "push-button."  They are buttons so that...

  • By
    iPad Detection Using JavaScript or PHP

    The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. In Apple's...

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!