Friday, February 9th, 2007
Hacking Digg With Firebug and jQuery
John Resig has posted a screencast of him “taking an introductory look at the Firebug Firefox Extension and the jQuery JavaScript Library – combining the two to build a reusable bookmarklet that can manipulate Digg Posts and Comments.”
The presentation shows a couple of bookmarklets:
In the presentation, I refer to a bookmarklet that you can use to introduce jQuery into a web page. Drag these bookmarklets to your Bookmark toolbar to use them.





Thanks for posting this Dion! :o)
Fun with javascript-Bookmarks:
“);document.body.appendChild(s);}void(s);”>Yay Cookies :)
Ok, js-links not allowed in comments (good idea). Next try:
javascript:var%20s;if(s=document.getElementById("CookieWatcher")){s.parentNode.removeChild(s);}else{s=document.createElement("div");s.setAttribute("style","position:absolute;top:0px;left:0px;background-color:white;border:1px%20dotted%20grey;color:black;font-family:mono;");s.setAttribute("id","CookieWatcher");s.innerHTML=document.cookie.replace(/%20*;%20*/g,"");document.body.appendChild(s);}void(s);
The bookmarklet doesn’t need to load jQuery. Digg uses Prototype already:
javascript:$$('li.c-bury').invoke('remove')
Rock On Digg! I didn’t know it used Prototype. Makes me happy 8)
Like Anonymous said, Digg uses Prototype already. It’s simply redundant to load jQuery.
How ironic. The very ajax library which formed the crux of this article and which became the reason for its inclusion in this blog, is actually a redundant component and creates more complexity than was previously necessary!
I guess you could add Prototype to the categories… sorry jQuery
While using Digg as the example in this case is possibly silly (though more probable of getting dugg), the example of including jQuery or Dojo or any other toolkit with bookmarklets is pretty cool in and of itself.
@Dylan: Glad the point of the screencast wasn’t lost on everyone. Seems like everyone was more focused on Prototype than the ability to be able to do something like this with the library of your choice.
A lot of usefull info . Thanks
Please correct me if I’m wrong, but won’t these bookmarklets hit the jquery.com servers every time you use them? If so, this seems like a very Bad Thing for a couple of reasons.