Sunday, March 15, 2009

Prevent Website Javascript from Disabling/Hiding Browser Menu and Address Bar in Firefox

Using Firefox, I was trying to print a transaction list from my bank's website. Once I selected the date range for the transactions to be printed, I'd hit a button on the report web page that says "Continue". After hitting that button, a new window appeared with an icon and a link that says "Print this page". When I clicked on it, the Windows print dialog box popped up. But I wanted to print preview first. The problem was that the new window listing the transactions was missing the menu bar. Normally I'd go to File, and then select Print Preview before I print in Firefox, but without the menu bar I was lost. So I looked for a hotkey for Firefox to do the print preview, and apparently it's Alt-F, then V. It didn't work in this menu-less window- I guess that since the menu bar was gone, the hotkey(s) to access it were of no use.

The bank website obviously was using javascript to disable the menu bar- why- I don't really know- to annoy customers like me perhaps. I couldn't disable javascript because then I couldn't even log into the site. I then went to Tools, Options, and unchecked the box that says Scripts will be allowed to do the following for "Disable or replace context menus". No go. I then went on the Firefox Addons site and found an addon called "Javascript Options", version 1.2.6.

After installing the Firefox extension and restarting the browser, I noticed new options in the same Javascript options area of Firefox. In the "Windows" section of the options window, several boxes were checked including "Hide the menubar", "Hide the toobar", "Hide the location bar", and "Hide the scrollbars". I unchecked all of them, then tried again (no need to restart Firefox) and voila, the new transaction window I was trying to print now has the menu bar so I can do a print preview on it.

This is a great extension, and I recommend everyone to look at the print preview first before printing web pages and documents. You can find that something doesn't look right- text getting cut off, or see that you can actually fit that extra line in the second page onto the first page by playing with the scaling options. Save some paper here and there, save the planet ;-)

3 comments:

Anonymous said...

While the add-on exists for the Windows version, it doesn't include the option of preventing sites from hiding the menu bar. Or, I'm stupid and can't read the screen.

Anonymous said...

Never mind. I am stupid and can't read the screen. You can dump my comment.

Anonymous said...

This may be off the topic..But I have searched repeatedly to no avail....How can I enable a menu bar on a website...I am trying to log into a site that I have had access to , but I am now seeing a message under the menu bar that reads "This menu has been disabled".
Can someone disable that remotely?

Thanks.