i am dustin diaz

a JavaScriptr...

boosh.

don't worry about it.

Maximize your browser window on a Mac

There are very few things I don't like on a Mac. One of them is the ability to maximize your application windows like the way you can on Microsoft Windows (Yes, the irony (no, actually that's not irony, it makes complete sense)). What a Mac will do when you hit the green "+" maximize button is size your application window to the contents that your window contains. Not helpful. What MS Windows will do is actually size your window to the size of your screen blocking out all other applications. To me this is helpful since I don't like these distractions in the background, and I enjoy the full realestate that I'm working in. Others seem to disagree saying that this Mac version of maximized space allows users to multi-task better. The fact is, I don't want to think about multi-tasking when I don't have to. Furthermore, there is no keyboard shortcut on a Mac to trigger this maximization. On Windows you can hit "alt + space + x".

Fixing it

Actually, there is no real fix (unless Apple builds it into the OS), but I've come up with a hack (work around) for my browser. First thing to do is to create a text file and call it "maximize.html" (you can call it what ever you want, it's only temporary). Then populate it with the following contents.

Maximize code

<html>

  <head>

    <title>maximize</title>

  </head>

  <body>

    <a href="javascript:moveTo(0,0);resizeTo(3000,3000);">

      Maximize

    </a>

  </body>

</html>
It should look like this:

Maximization code screenshot

Next you want to open up this page in Firefox:

Open page in Firefox

You should see a simple page with a link. What you want to do now is bookmark it. You can do this by control + clicking the link to bring up your context menu. Then choose "Bookmark This Link..."

Bookmark this link

Add a keyword shortcut

Obviously, this has been discussed before. If you're using Firefox, you can add a keyword shortcut to make it even easier to use this functionality. Since afterall, this is usually the kind of setting you just want to trigger on the fly without having to use your mouse. To do this, simply track down your bookmark, load up the context menu by control + clicking the bookmark, then choose "Properties"

Properties in Bookmarks

Then type in a short letter into the keyword input box... like "m" (the actual keyword is up to you).

Keyword box

That's it

Try it out. It's not optimal, but it does what I need when browsing the web in full maximum real estate.

this is who i am

Hi, my name is Dustin Diaz and I'm an Engineer @ObviousCorp. Previously @Twitter, @Google, and @Yahoo, author of Strobist® Info co-author of JavaScript Design Patterns, co-creator of the Ender JavaScript Framework, a Photographer, and an amateur Mixologist. This is my website. Welcome!

On this site I write about JavaScript. You can also follow along with my open-source work on Github.

This site is optimized and works best in Microsoft Internet Explorer 6.