Absolutely Tech

Undo recent facebook style changes

Recently facebook made its font smaller. It worried lots of people with weaker eye sight. The font looks ugly as well. They reduced it all the way to 11px from 13px. And changed its color to #000 from #333. I made a quick greasemonkey script as it works cross-browser to fix the issue until facebook does something about it.

You can install the script from the following link:
http://userscripts.org/scripts/show/89552

Google Chrome: Chrome doesn’t need any extension for this to work. It’ll install the script right away.
Firefox: You need to install greasemonkey extension from https://addons.mozilla.org/en-US/firefox/addon/748/

Opera: It has its own Userjs API. This script might work on Opera. However, it has not yet been tested.

I don’t recommend using any version of IE, hence no instructions for that.

Debugging Javascript In Internet Explorer

Internet explorer has always been a programmer’s nightmare. You have finished a wonderful looking site, full of javascript effects just to find out that it doesn’t work in Internet Explorer. Its a real pain in the neck to find out which part of the script is causing errors in Internet Explorer.

In Firefox, we have tons of debugging option including the default error-console, firebug, etc which are very good tools. But in IE, the default error reporting mechanism shows wrong line no. most of the time, so its pretty useless.
Read the rest of this entry »

An alternative to cross-domain AJAX, sort of

Recently, I got a project to make an ad system for a website. The ad system was such that, when the page displaying ad was loaded for the first time, it would create a random link and store them in database. From then on, it would display the same link on same page.

So, I made a javascript file which would create and xmlobject for AJAX request. It would query php file on a server and get the link. But cross domain AJAX just doesn’t work. I tried to edit some parts of it, but it just wouldn’t work. Cross domain ajax requests aren’t allowed for security purposes.

So I had to think of something else. First I thought of renaming php file to js and then addind a code to .htaccess to make it behave like php. Then I thought of making image links dynamically using php’s GD library.
Read the rest of this entry »