with Imagination: by Dustin Diaz

./with Imagination

A JavaScript, CSS, XHTML web log focusing on usability and accessibility by Dustin Diaz

Maximize your browser window on a Mac

Wednesday, April 16th, 2008

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.

20 Responses to “Maximize your browser window on a Mac”

  1. borta

    Sorry, why would you want to do this? Mac is all based on drag and dropping, when you maximize you lose this ability.

    Also, switching applications is much easier when you don’t maximize. Peeping your buddy list requires 0 clicks.

    Even on Windows I never maximize. About distraction, you can only focus in one thing at once anyway, so that shouldn’t really be a problem.

    Also interaction with the middle of the screen is much easier. When you maximize, content get to the edges, making eye and mouse tracking more difficult (unless it’s on the very edge, which is why apple menu is on the upper edge)

    So, just don’t maximize.

  2. Brian Dillard

    Couldn’t agree more about this annoyance in OS X. I like your hack, but here’s an alternative:

    http://lifehacker.com/software/distraction/download-of-the-day-isolator-mac-239746.php

    Isolator throws a solid-color shim behind the currently active application window. The effect is very much like the Windows maximize command. You see only one application window at a time. You can set the program to launch at startup and set a keyboard command to toggle it on and off. I find this enormously helpful in programs such as Photoshop where the workspace lets background windows show through.

  3. Marc Grabanski

    I have also been frustrated with Mac’s ability to maximize windows - it was the first thing I noticed when getting my mac. That said, thanks for the tip.

  4. Andy

    I’m not sure about other browsers, but I use a variety of javascript bookmarks in Firefox. Instead of actually creating a file with a link, create a bookmark titled ‘Maximize’ with the following as its URL:


    javascript:moveTo(0,0);resizeTo(3000,3000);

  5. Shawn Wilsher

    At least with Firefox 3, it seems to maximize to full screen for me.

  6. Elliot Swan

    Cool little trick…I’d also think that it should be possible via an AppleScript, thus making it work for any application?

  7. Elliot Swan

    Mm I did a search, and it seems there is one: http://bbs.macscripter.net/viewtopic.php?id=14236

  8. Neville

    You could also put that same raw javascript [ie, without html] into a bookmark on the toolbar, which is the approach google takes to add a feed to google reader

  9. Frode Danielsen

    Well, if it’s because you don’t need distractions from other applications, you always have the shortcut cmd+alt+H, which hides all applications other than the active one (as opposed to just hitting cmd+H).

    Other than that, I guess it’s a lot up to taste and what you’re used to. Myself, I almost feel claustrophobic if an application takes up the whole screen. Even more so in Photoshop on Windows where it’s not even content taking up the space.

    And regarding Photoshop, @Brian Dillard: You can get Photoshop to cover the whole screen by hitting F - although I know that’s more for working on one photo at a time.

  10. Jim

    Dustin,

    Once again we prove to be much alike. While I love having my large screen able to be filled with multiple apps for the sake of multitasking, I often want one window to fill the screen. And even when I do that, having my Mighty Mouse side buttons set to launch Exposé keeps multitasking a mouse squeeze away. :)

    Jim

  11. shabunc

    well, it is rather simple to write a *.scpt script that will maximize current window (via emulating green button click)

  12. Brad

    I used to use the simbl plugin called megazoomer for this same thing before Leopard killed it: http://ianhenderson.org/megazoomer.html

    If you’re not on Leopard, give it a shot, its awesome.

  13. Andyed

    You might appreciate a firefox extension / toolbar button that makes it easy to stack two firefox windows side by side for full screen coverage:
    http://surfmind.com/lab/mozilla/bigscreen

  14. Patrick

    There is a “real” fix for this and it’s called Stoplight (http://lifehacker.com/software/mac-os-x/download-of-the-day-stoplight-mac-202621.php)

    It let’s you define the behavior of the buttons and I’ve mine configured as “maximize”.

    Should work in ALL Cocoa apps.

    Greetings

  15. Robert

    I wrote myself a bookmarklet for this same thing a while back. Works quite well for my purposes:

    javascript:window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight)

    I keep it in a folder on the bookmarks bar with some others.

  16. H5N1

    I’ve just read some “disagreement” comment: some people seems to be enthusiast of multitasking.
    I think that an O.S. don’t have to decide what’s better for the user but leave the user the freedom to choose.
    It’s the same matter about developing web pages :)
    If the user wants a bigger/smaller font or wants to reduce the dimension of web browser we should develop webpages that fits with it!
    I hope to have been understandable :D

  17. Farouk

    I have found that using Safari 3.1 on the mac, once I manually maximize my window, and open a new window with COMMAND-N, Safari “remembers” this and creates fully maximized windows from then on. If I shrink the size of the window, Safari also “remembers” this.

  18. 5 year mac user

    cmd+alt+H doesn’t hide my desktop full of big colourful icons or my beautifully distracting background image.

    … makes using photoshop a bit uncomfortable.

  19. John Athayde

    Two things that shut out the background noise of working in a busy OS X work space:

    Writeroom - all black screen and text. Write to your heart’s content.

    Backdrop - color wash your background behind whatever you’re focused on.

    I personally like the noise and jumble of the system, but for those who don’t, these are both good system wide options (as opposed to limiting the blockout function to your web browser). Great JS solution tho!

  20. Mauvis

    borta’s (first responder) response is ridiculous. If he wants to full-screen let him full-screen. I was giving a presentation through the web the other day on my mac and also could have used this feature. When I’m showing off just one application, I want to show just that application to my audience, full-screened - it’s not big deal.

    Additionally, my regular working environment consists of one mac and 2-screens - eclipse full-screened on one and firefox or another browser full-screened on the other. Anything else on the screen is wasting space and I can easily call another app (already open or not) in active state by using Quicksilver, so no multitasking ability is lost whatsoever.

Leave a Reply

Phone Number:

If you're about to post code in your comment, please wrap your code with the tag-combo <pre><code>. Also please escape your html entities - otherwise they will be stripped out. I recommend using postable.

Get "JavaScript Design Patterns"

"As a web developer, you'll already know that JavaScript™ is a powerful language, allowing you to add an impressive array of dynamic functionality to otherwise static web sites. But there is more power waiting to be unlocked--JavaScript is capable of full object-oriented capabilities, and by applying OOP principles, best practices, and design patterns to your code, you can make it more powerful, more efficient, and easier to work with alone or as part of a team."

Buy JS Design Patterns from Amazon.com Buy JS Design Patterns from Apress

Flickr

Submit a Prototype

All content copyright © 2003 - 2007 under the Creative Commons License. Wanna know something? Just ask.

About | Archives | Blog Search

[x] close

Loading...

Submit a prototype

By checking this prototype I agree that I am not submitting false credentials, pornography, or a hate crime website. I also understand that by submitting my entry I may or may not be accepted, and if accepted, my entry may be taken down at any given time if I violate these terms.