sheetUp – BookyWooky - A bookmarklet/favelet manager

BookyWooky. <-- Try clicking it now. Works best with Firefox if dragged onto the Bookmarks Toolbar.

Karl Swedberg's jQueryify gave me an idea. I wanted to extend it to allow a user to easily load up any library or tool they wanted. I've quickly tested it on IE6/7, Opera 10, Firefox 3 and Chrome/Safari.





Modifying BookyWooky

You can customise it to use other bookmarklets.



Your generated bookmark: BookyWooky



Custom Loading Function

If the bookmarklet requres a special function to load. e.g. it might need to run an init function like Firebug does. A forth paramenter can be added to bookyMerge.

The defaults array that the custom settings gets merged into are the following, notice the Firebug init func:


var defaults = {
    Firebug:    {name: "Firebug 1.2",           
    url:        "",
    loaded:     function() {return document.getElementById("_firebugConsole") !== null || typeof firebug !== "undefined"},
    docs:       "http://getfirebug.com/docs.html",
    func:       function() {
                    document.location.href = "javascript:"+
                    "var firebug=document.createElement('script');"+
                    "firebug.setAttribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js');"+
                    "document.body.appendChild(firebug);"+
                    "(function(){if(window.firebug.version){firebug.init();document.getElementById('bookyDiv').innerHTML "+
                    "+= '<div class=\"bookyLoaded\">Loaded Firebug</div>';}else{setTimeout(arguments.callee);}})();"+
                    "void(firebug);";}},

    jQuery:     {name:  "jQuery 1.2.6",          
                url:    "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js",
                loaded: function() {return typeof jQuery !== "undefined"},
                docs:   "http://docs.jquery.com/"},

    Prototype:  {name:  "Prototype 1.6.0.3",     
                url:    "http://prototypejs.org/assets/2008/9/29/prototype-1.6.0.3.js",
                loaded: function() {return typeof Prototype !== "undefined"},
                docs:   "http://prototypejs.org/api"},

    MooTools:   {name:  "MooTools 1.2.1 ",       
                url:    "http://mootools.net/download/get/mootools-1.2.1-core-yc.js",
                loaded: function() {return typeof MooTools !== "undefined"},
                docs:   "http://mootools.net/docs/"},

    sheetUp:   {name:   "sheetUp 0.1.1",         
                url:    "http://sheetup.com/js/sheetup.packed.js",
                loaded: function() {return typeof sheetUp !== "undefined"},
                docs:   "http://code.google.com/p/sheetup/w/list"}
};