My Bookmarks For January 11th – January 17th

Jan 17
Posted on January 17, 2009 19:58 in Links

Facebook HTML Uncomment

Jan 17
Posted on January 17, 2009 18:34 in Problems & Solutions, Projects, Software

I had some spare time during Christmas and new Year, reason for me to use my spare time to learn something new. In this case it involves making my first Firefox Extension and using Git.

The project I decided to work in is something very simple. As a Facebook Application Developer I often run into the problem of needing to be able to view part of the source of the HTML response of Facebook. Reason for this is that Facebook embeds server errors on our servers as hidden comments in the HTML. This is handy for developers as they can then see what error their server generated.

The only problem though is that this response is hidden in the source. I therefore decided to make a small bookmarklet that extracts this data, and opens it in a new window. The bookmarklet can be found below:

Bookmarklet: Facebook HTML Uncomment


I also always wanted to make a Firefox extension, so I decided to make my bookmarklet into a Firefox Extension that detects the hidden Facebook HTML Comments and shows the user a small icon that they can they click to view the full server response. It was a bit hard, especially as Firefox extensions have their own flavor of Javascript, but it turned out to be fairly easy (less than a days work).

The result can be found here on the Firefox Add-Ons page but it’s currently still listed as experimental, so leave a comment or feedback to help me make this a public Add-On. For a tutorial on how to use the Add-On or the Bookmarket, see the video below:

 

 

Finally. I decided to add this entire project as Open Source on GitHub. I already had a GitHub account but no projects. I will probably be moving more projects over soon though, so be sure to follow the project for updates or follow me to see more of my projects show up in time.

Video