Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a Mac-friendly Firefox window resize bookmark Web Browsers
It has always bothered me that hitting the green "maximize" button in Firefox makes the window take up the entire screen, instead of just maximizing it vertically. However, by reading this how-to and combining it with this javascript from the Mozilla documentation, I found a work-around:
  1. Open the Bookmarks manager.
  2. Create a new bookmark on your bookmarks bar with the Name set to resize and the Location set to this string:
    javascript:self.moveTo(0,0);self.resizeTo(window.innerWidth+window.scrollMaxX,screen.availHeight);
There you go -- you're done! The bookmark should be in your bookmarks bar, so you can just click on the bookmark and it will resize your window to its maximum vertical size.
    •    
  • Currently 2.33 / 5
  You rated: 3 / 5 (9 votes cast)
 
[16,964 views]  

Create a Mac-friendly Firefox window resize bookmark | 15 comments | Create New Account
Click here to return to the 'Create a Mac-friendly Firefox window resize bookmark' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a Mac-friendly Firefox window resize bookmark
Authored by: kd35a on Dec 02, '08 08:01:29AM

And is there a way to make all other programs work like Firefox - maximize over the entire screen?? Thats what I would like :p



[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: Toadling on Dec 02, '08 08:30:12AM

AppleScript



[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: tog on Dec 02, '08 10:06:16AM

I agree - it always bugs me that "maximize" doesn't do exactly that!



[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: Flooey on Dec 02, '08 10:43:00AM

That's because the green button isn't maximize, it's zoom, which theoretically resizes the window to display as much content as possible, but not any bigger than that.

The problem with web browsers, and a huge number of other apps nowadays, is that they adjust their content to fit the current window size. Combine that with a button that's supposed to adjust the window to fit the content, and you end up with a schizophrenic button that has completely unpredictable behavior.



[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: hedbngr on Dec 02, '08 11:58:35AM
Picked up this javascript from here. It expands Safari just like clicking the green button in Firefox.

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

[ Reply to This | # ]

Create a Mac-friendly Firefox window resize bookmark
Authored by: nvdingo on Dec 02, '08 08:05:08AM

i was just testing this with and without the +window.scrollMaxX
i don't see any difference. What is it supposed to be doing?



[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: lowbatteries on Dec 02, '08 04:57:57PM

That variable represents how much the page can be scrolled horizontally. If your browser is already wide enough for the current page, it will be zero.

Try minimizing the window very small (so it has vertical and horizontal scrollbars) and try again.

Of course, I think my bookmarklet I posted in the main comments is a bit more versatile (repositions the window if needed, and will shrink the window width down if it can).



[ Reply to This | # ]
Try the Web Developer Toolbar
Authored by: giulio on Dec 02, '08 12:01:02PM
The Web Developer Toolbar has lots of resize functions, including custom sizes. It's probably easier than fussing with scripts and what-not:
http://chrispederick.com/work/web-developer/

---
Freelance web development
WebVeteran.com

[ Reply to This | # ]

Create a Mac-friendly Firefox window resize bookmark
Authored by: MurphyM on Dec 02, '08 01:41:55PM
I made this bookmarklet that does stuff like remove the toolbars in addition to setting the size and location. I used to use it for Remote Buddy.

http://murphymac.com/set-safari-window-sizes-with-bookmarklets/

[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: unforeseen:X11 on Dec 02, '08 04:27:11PM

Seriously, who wants to run Browser Windows fullscreen on screens above 1200 pixels width? Makes no sense.

---
this is not the sig you`re looking for.



[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: palahala on Jan 08, '09 03:16:09AM
Who wants to run Browser Windows fullscreen? Even worse, I often find it hard to convince professional web designers that the screen size as reported by Google Analytics*censored*suis has nothing to do with the size of the window people use. "Only 8% percent of visitors [mainly from developing countries for that site] uses 800x600 screens" -- hoho, this says nothing about the preferred size for those who have better screens!

I've always hated sites that were built for exactly 800 or 1024 pixels wide, implying one should indeed use "maximize window" on Windows, to gain a few extra pixels as a result of hiding the window borders, and thus to avoid the horizontal scrollbar.

Likewise, I strongly dislike the new Firefox zoom function, which no longer zooms text but zooms the whole window (including margins, images, and so on). I really think that the old behavior, which only increased the font size, was better. Too bad...

As for this hint: I doubt https://bugzilla.mozilla.org/show_bug.cgi?id=232919 will ever be implemented :-(

[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: lowbatteries on Dec 02, '08 04:52:58PM

There is an open bug to fix the zoom button in firefox:

https://bugzilla.mozilla.org/show_bug.cgi?id=232919

The green button is not a maximize button. Running all your applications full screen all the time completely ruins a lot of the usefulness and elegance of OS X, like drag-n-drop. The green button is a zoom-to-fit-the-contents button, and is infinitely more useful than a 'maximize' button. That said, it would be nice if "ctrl+zoom button" did maximize the window.

The javascript provided above will only make pages bigger, not smaller, and also won't reposition them if they are hanging off the edge of the screen.

Here is the bookmarklet I use, which tries to replicate the zooming that Safari does (you may need to replace line breaks with spaces):


javascript:zoomWindow = function(){
h=Math.max(300,screen.availHeight-window.screenY)
window.resizeTo(800,h);setTimeout("h="+h+";
w=window.innerWidth+window.scrollMaxX;window.resizeTo(w,h);
dx=Math.min(0,window.screenX+w-window.screen.availWidth);
dy=Math.min(0,window.screenY+h-window.screen.availHeight);
window.moveBy(dx,dy)", 100) }; void(zoomWindow());
Or you can go to this page to easily install it: http://lowbatteries.com/zoom-bookmarklet.html

[ Reply to This | # ]
Create a Mac-friendly Firefox window resize bookmark
Authored by: chimerical on Dec 02, '08 05:41:29PM
There are also a list of highly useful bookmarklets here:

http://pimpmysafari.com/bookmarklets

They work with Firefox too.

[ Reply to This | # ]
alternative to bookmarklets
Authored by: ra4ul on Jan 07, '09 04:54:39PM

these bookmarklets won't work when javascript is disabled (say with NoScript). it's better to resize the window using the browser code; here's what i use to toggle window size:

(window.outerWidth == 1024) ? window.resizeTo(800,768) : window.resizeTo(1024,768);

use KeyConfig, FireGestures, etc. to trigger it.



[ Reply to This | # ]
alternative to bookmarklets
Authored by: palahala on Jan 08, '09 02:55:59AM

I never knew there's something like "browser code". Still looks like JavaScript to me? I guess I need to investigate...



[ Reply to This | # ]