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


Click here to return to the 'A script to resize windows to their vertical maximum' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to resize windows to their vertical maximum
Authored by: n8gray on May 05, '05 07:06:44PM
For Safari, at least, you can use a javascript bookmarklet. I have one that resizes the browser to 1024xScreenHeight. Just make a bookmark and copy this to the address:


javascript:function%20rsz(s,i,w,h,m){if(i.screenX0||i.outerWidth%3Ew||i.outerHeight%3Eh){s.moveTo(0,0);s.resizeTo(w,h)};if(m){s.moveTo(m==1?0:screen.availWidth-w,0);};s.resizeTo(w,h);};rsz(self,window,1024,screen.availHeight,1);

You could probably hack it to leave the width alone and just resize the height. By the way, I totally agree about the green +. It's pretty useless. I wish Apple would add a "Zoom vertically only" option to the system prefs, like you see with unix window managers.

[ Reply to This | # ]

A script to resize windows to their vertical maximum
Authored by: tonygoulding on May 06, '05 11:38:46PM

that's nice, except that it expands the window to the full screen size, trampling over the dock (I have my dock on the left).



[ Reply to This | # ]
A script to resize windows to their vertical maximum
Authored by: qwerty denzel on May 09, '05 07:34:13AM
Just download Apple's sample Safari applescripts here.
Included is this:

tell application "Safari"
	repeat with i from 1 to the count of documents
		do JavaScript "moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight)" in document i
	end repeat
end tell


[ Reply to This | # ]
A script to resize windows to their vertical maximum
Authored by: barrysharp on May 08, '05 01:22:08AM

That was a cool tip/hint. THANKs.

---
Regards... Barry Sharp



[ Reply to This | # ]
Awesome!
Authored by: grrl_geek on Aug 31, '05 12:27:07PM
Thanks so much for that bookmarklet. It works in Firefox, too.

I changed the sizes so browser windows are resized to 800x600:
javascript:function%20rsz(s,i,w,h,m){if(i.screenX0||i.outerWidth%3Ew||i.outerHeight%3Eh){s.moveTo(0,0);s.resizeTo(w,h)};if(m){s.moveTo(m==1?0:screen.availWidth-w,0);};s.resizeTo(w,h);};rsz(self,window,800,600,1);
because due to my iBook's low screen resolution, the edges of browser windows would tend to drift off the screen, making it impossible to move or resize them. This pops the window back.

[ Reply to This | # ]