Blog

lastChild in Mozilla browsers

· listen

1 minute read

For a while now I've been receiving some complaints about the comments in this blog: people using Mozilla based browsers weren't able to see the BlindDown effect when posting comments, and since they did not receive any other message about the comment being correctly posted, they posted it several times.

The error message received was this:

$(element).style has no properties[Break on this error] $(element).style.height = '0px';effects.js (line 369)

After some heavy Javascript debugging, I found out the bug: Mozilla browsers add nodes for white space (in my case, in between LI elements), so it was calling the wrong node for the BlindDown effect (it was calling a white space). Here goes the original code:

function commentAdded(request) {  new Effect.BlindDown($('commentList').lastChild);  $('commentform').elements[3].value = '';  $('commentform').elements[3].focus();}

The solution was to add a new javascript line before the Effect.BlindDown call, cleaning all white spaces. Here is the corrected code:

function commentAdded(request) {  Element.cleanWhitespace('commentList');  new Effect.BlindDown($('commentList').lastChild);  $('commentform').elements[3].value = '';  $('commentform').elements[3].focus();}

So, the lesson is: every time you use a lastChild call, be aware of the white spaces for the Mozilla browsers. Hope it helps, thanks to all who pointed the bug.

Update: after a lunch conversation, I've decided to post the bug in the Mozilla foundation bugzilla. If you want to, you can check the status by accessing bug #378593.

The filter

· listen

1 minute read

I've spent the morning listening to music from my iTunes, but selected via The Filter. It's a great tool (free download here), which mixes the taste of thousands (like last.fm) but with a huge difference: it does it with my own music.

At the heart of The Filter is a music recommendation engine that is continually learning the listening tastes and choices of tens of thousands of music lovers. This huge collection of information is combined with your own likes and dislikes to create a personal understanding of what songs from your collection you will like to listen to and when.

It can be also used to create fresh playlists for your iPod, and to get a lot information about the music you are listening. It's great, for free, and with versions for Windows, Mac and Nokia phones.

Earn money while searching

· listen

1 minute read

Generation cash is becoming a reality. Now is time for the online search community (everyone of us) to earn some money by using a search engine (just that) or by referring friends.

Zotspot is the new kid on the block, with a disruptive business model: you earn money from using their search engine, earnings that you can keep or donate to one or more causes (e.g., charities or universities).

On top, you can earn even more money by referring Zotspot to friends. And you earn money from friends referred by your friends, and so on, until 3 generations. Confused? See the next image (taken from the Zotspot FAQ):

If you are interested in trying it, please do it by clicking the animated image below. This way you will be helping me pay this site hosting.

zotspot - get paid to search

Happy searching.

Google low-cost transportation

· listen

1 minute read

Do you need to travel from Oporto, Portugal, to New York? Don't want to spend a lot of money on this trip? Well, try this: point your browser to maps.google.com, click on "Get directions" and write "Oporto" to "New York". On the left side of the search results, notice step 51.

Please don't try this trip if you didn't eat your cereals in the morning.

The future is UMPC?

· listen

1 minute read

Via Armando Alves, a great video from Intel, predicting the future?

RSS readers should click here to watch the movie.