October 28th, 2011 by André Gil.
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!
October 18th, 2011 by André Gil.
If you check the profile of all your new followers on Twitter, you’ll notice that many of your followers are just trying to get as many followers as possible by following a lot of people and expecting that they will be followed back.
So I was wondering here, how many real followers do I have? To answer this question, I’ve made this simple tool in 5 minutes to check that for me. This tool will only consider someone “real” when they follow less than 100 people or they follow twice as many followers as they have, at maximum.
So check it out and tell me what you think…
Update: Some Twitter API responses has changed. Code fixed now!
December 4th, 2010 by André Gil.
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!
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. =]
August 26th, 2010 by André Gil.
I’m working in a Flex project and the client asked for some Keyboard Shortcuts. It works great on Google Chrome and IE but, for some reason, Firefox doesn’t handle embedded objects focus correctly sometimes.
To “fix” this problem, I found a really nice workaround. First, you have to open your application on some browser and look at the source code. Then, look for the <object> tag “id” attribute inside it. If you use the default Flex template, it will probably be your Application name. In my case, it’s “index”. So I wrote this JavaScript line to set the focus on your application again:
1
| document.getElementById('index').focus(); |
Now, to use it on your code without rewriting your template, you can do this:
1 2
| navigateToURL(new URLRequest("javascript:try{ document.getElementById('index').focus(); void(0); }catch(err){}"), "_self");
someComponent.setFocus(); |
It works better if you try to identify when your application is loosing the focus (always when I opened a popup, in this case) and put the code after that. I also used a try/catch to avoid problems, like if the user opened the SWF directly.
I hope it helps someone!
Bye o/
April 2nd, 2010 by André Gil.
Sometimes, when I’m reading blogs, I want to watch some embedded video while I keep surfing on the older posts. Some websites give you the option to open the video in a new window, but this option is not always available. That’s why I created this Bookmarklet!
Just right click on this links below and add, or drag them, to your bookmarks. So when you want to pop out some video, or other embedded content, just click on this links on your bookmarks. Always try the first one and, if it doesn’t work, try the second one.
[Popout Flash] [Popout Flash (Alt)]
I hope you like it.. See ya!!