Tuesday, April 28, 2009

Firefox change default alt option to open in new tabs

Firefox by default opens items typed in url bar, in the same tab. It is possible to change this by doing the following which changes the Alt key behaviour so that the default be opening in new tabs.

1. Download & instal the userChromeJS-1.0.xpi OR userChromeJS-1.1.xpi.

2. Create a userChrome.js file in the firefox chrome folder. ( see Profile_folder_-_Firefox , Chrome_folder). Paste the following code in the userChrome.js file so created :

(function() {
urlbar = document.getElementById("urlbar");
eval("urlbar.handleCommand = " + urlbar.handleCommand.toString().replace("&& aTriggeringEvent.altKey","&& !aTriggeringEvent.altKey"));
})();

This will change the default behaviour w.r.to Alt key in Firefox. It works from Firefox version 3.1 to Firefox 3.5 beta 4 version.