I've seen other hints regarding Bookmarklets in Safari, and I figured I'd share a few that I've created to resize/reposition the browser window. Note: All "Clickable" Bookmarklet examples in this hint can be dragged directly into your Safari "Bookmarks Bar" to save them. Also, if you decide to manually enter them, all bookmarklets should be entered as ONE line. First, I created this "generic" bookmarklet:
javascript:function rsz(s,i,w,h,m){if(i.screenX<0||i.outerWidth>
w||i.outerHeight>h){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,
WIDTH,HEIGHT,H_ALIGN);
that has three user-modifiable parameters:Examples:
800,600,1: A left-aligned 800x600 window. - Clickable:
800x600
javascript:function rsz(s,i,w,h,m){if(i.screenX<0||i.outerWidth>
w||i.outerHeight>h){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);
800,screen.availHeight,2: A right-aligned 800xFull-Height window - Clickable:
800xFull
javascript:function rsz(s,i,w,h,m){if(i.screenX<0||i.outerWidth>
w||i.outerHeight>h){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,
screen.availHeight,2);
(Note: ignore, but don't change, the first two arguments in the rsz function call). Also, I use this simple bookmarklet to make my browser full-screen - Clickable:
Full Screen
javascript:self.moveTo(0,0);self.resizeTo(screen.availWidth,
screen.availHeight);
Many people don't realize this (even though it was mentioned in a previous hint), but when you create bookmarklets like these and put them in the "Bookmarks Bar" that they are automatically assigned hotkeys, from left to right, Command-1, Command-2, etc.. and these hotkeys work regardless of the visibility of the Bookmarks bar.Mac OS X Hints
http://hints.macworld.com/article.php?story=20040121130829756