Insert Dojo and YUI bookmarklets
I’ve talked about having fun with jQuery using Jash and Firebug before after seeing Simon throw the Google homepage around at barcamp. I’m no more a one javascript framework person than a one programming language person and recently I’ve seen cool things I want to play with in lots of the main contenders.
I’ve put together a couple of bookmarklets which load YUI or Dojo from their respective content delivery networks and insert them into your current browser context. You can then play around with them in Jash or Firebug or any other Javascript console.
Dojo is particularly interesting here due to it’s cunning loading mechanism for additional parts of the framework. Basically you can gain access to the entire (huge) framework simply by using the bookmarklet and then dynamically loading the rest via the command line.
Insert Dojojavascript:void(function(){
var%20s=document.createElement('script');
s.src='http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js';
document.getElementsByTagName('head')[0].appendChild(s);
}())
Insert YUI
javascript:void(function(){
var%20s=document.createElement('script');
s.src='http://yui.yahooapis.com/2.4.0/build/yahoo-dom-event/yahoo-dom-event.js';
document.getElementsByTagName('head')[0].appendChild(s);
}())
The code simply inserts a script element into the page which loads the relevant framework. I’ve shown the code on multiple lines for the sake of the example, but your bookmarklet should be on one line. Alternatively you can drag the Insert YUI or Insert Dojo links to your bookmark bar.
Comments
Insert Prototype
javascript:void(function(){
var%20s=document.createElement(‘script’);
s.src=‘http://svn.rubyonrails.org/rails/spinoffs/scriptaculous/lib/prototype.js’;;
document.getElementsByTagName(‘head’)0.appendChild(s);
}())
Martin Ström - 9th December 2007
[...] Insert Dojo and YUI bookmarklets – Morethanseven Two cool little bookmarklets that allow you to add Dojo or YUI into any page. Very handy in combination with Jash. (tags: Dojo YUI Bookmarklets javascript) [...]
Cristiano on Tech/Life > links for 2007-12-10 - 9th December 2007
[...] the natural extension of Gareth Rushgrove’s bookmarklets for inserting the Dojo or YUI Javascript toolkits mentioned by Simon, here’s a tidying-up of [...]
Graceful Exits > Insert any Javascript bookmarklet - 9th December 2007
[...] Morethanseven » Insert Dojo and YUI bookmarklets Between Jash and these, it’s getting easier and easier to insert your javascript toolkit of choice into arbitrary pages and explore/change to your heart’s content (tags: dojo jash javascript jquery remix yui) [...]
a work on process > links for 2007-12-10 - 9th December 2007
[...] Morethanseven » Insert Dojo and YUI bookmarklets (tags: javascript Development yui lazycoder) Post a comment — Trackback URI RSS 2.0 feed for these comments This entry (permalink) was posted on Monday, December 10, 2007, at 3:21 am by Scott and categorized in General. [...]
links for 2007-12-10 | Lazycoder - 10th December 2007
[...] Morethanseven » Insert Dojo and YUI bookmarklets A simple bookmarklet to insert Dojo into the page you’re viewing. Combine this with Jash and you have access to all kinds of debugging and manipulation power. (tags: bookmarklets debugging dojo javascript webdev) [...]
Blue Sky On Mars > Blog Archive > links for 2007-12-12 - 12th December 2007
[...] for Loading YUI: Gareth Rushgrove blogs about a bookmarklet he created to insert YUI or Dojo on any page you’re browsing: "I’ve put together a couple of bookmarklets which load YUI or Dojo from their [...]
In the Wild for December 12th > Yahoo! User Interface Blog - 12th December 2007
[...] Insert Dojo and YUI bookmarklets [...]
20071217 網摘 - Blog-you 將關站 - 網絡暴民 Jacky’s Blog - 16th December 2007
Insert Scriptaculous ( Effects for fun :) )
javascript:void(function(){
var%20s=document.createElement(‘script’);
s.src=’http://svn.rubyonrails.org/rails/spinoffs/scriptaculous/src/effects.js’;
document.getElementsByTagName(‘head’)0.appendChild(s);
}())
araba - 19th May 2008
Comments are now closed.