Bugzilla and Attached Images

I hate Bugzilla… It’s ugly, hard to use and has one of the the worst UI and UX that I know of. But the thing that annoys me most is when you have some image attached, you cannot open it. When you click at the link, it will download the image and then, you’ll be able to open it.

I know that’s configurable, and it’s for a security reason, but this is the default behavior and most admins don’t change it! So I’ve made this simple bookmarklet to solve the problem. Just create a bookmark for the link bellow and, when you open some bug, just click the link:

1
javascript:(function(){var d;var c=0;while(d=document.getElementById("c"+c)){var b=d.getElementsByTagName("a");for(i=0;i<b.length;i++){var a=b[i].href;if(a.indexOf("attachment.cgi")>-1&&a.indexOf("action=edit")==-1){d.innerHTML+='<img src="'+a+'"/><br/>'}}c++}})();


And if you are interested in the simple unobfuscated code, here it is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(function(){
   
    var commentDiv;
    var commentId = 0;
   
    while( commentDiv = document.getElementById("c" + commentId) ) {
   
        var links = commentDiv.getElementsByTagName("a");
       
        for ( i=0; i < links.length; i++ ) {
           
            var href = links[i].href;
           
            if( href.indexOf("attachment.cgi") > -1 && href.indexOf("action=edit") == -1 ) {
               
                commentDiv.innerHTML += "<img src=\"" + href + "\"/><br/>";
            }
        }
       
        commentId++;
    }

})();

Enjoy! ;)

DownFlickr – Flickr Downloader

I always loved photography, since I was young. And since Flickr is probably the best place on the internet to find great photos and inspiration, I always spent a lot of time there looking for great photos and photographers.

One thing that I never liked on Flickr, is how hard it is to download photos. You have to open the photo, click on the “All sizes” option, choose the best quality, right click it and save. Imagine that if you want to save a whole Set of photos? It’s a nightmare!

DownFlickr - Flickr Downloader

That’s why I’ve created DownFlickr! It’s a Google Chrome extension, that helps me to download single photos or full sets automatically. I’ve programmed it at one night, just because I wanted to download a Set with more than 100 photos and I never thought it would help so many people. It’s not even that good, it’s just really helpful. But now it has 2200+ users and it’s featured on first page when you search for “flickr” on Chrome Extensions page.

So I’ve decided to share the code with you guys on Github. You can download the extension or get the source code, fork it and help with bug fixes or new features. =]