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


Click here to return to the 'Set browser window size and position via URL parameters' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set browser window size and position via URL parameters
Authored by: Lui-g on Apr 24, '09 04:35:19AM
My first three links in Safari are called: "<< LEFT", "MAX!" & "RIGHT>>" These can be called up with Apple + "1" or "2" or "3" respectively.

<<LEFT makes a browser window take up the left 50% of the screen; MAX! makes the browser take up the whole screen; and RIGHT>> makes a browser window take up the right 50% of the screen. This way, you can easily have two windows side by side (on a widescreen monitor), without manually resizing.

The code for the links is:
  • <<LEFT javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(1,0);
  • MAX! javascript:self.resizeTo(screen.availWidth-1,screen.availHeight);self.moveTo(1,0);
  • RIGHT>> javascript:self.resizeTo(screen.availWidth/2-1,screen.availHeight);self.moveTo(screen.availWidth+1,0);
**Note, the reason the window is placed at coordinates 1,0 rather than 0,0 was to circumvent a Safari bug. Other variations include:
  • <<800 - which makes a 800px wide window to the left of the screen (edit the 800 to anything else you like) javascript:self.resizeTo(800,screen.availHeight);self.moveTo(1,0);
  • >1024< - makes a window 1024px wide centered on the screen. javascript:self.resizeTo(1024,screen.availHeight);self.moveTo((screen.availWidth-1024)/2,0);
Hope someone finds this useful - I do. Lui-G

[ Reply to This | # ]
Set browser window size and position via URL parameters
Authored by: Neville Hillyer on Apr 24, '09 04:37:03AM

I am sure many will find this useful. Perhaps best to use (1,1) rather than zero for Mozilla browsers.



[ Reply to This | # ]
Set browser window size and position via URL parameters
Authored by: zoff on Apr 24, '09 04:40:59PM

None of the scripts work on a window with multiple tabs. They used to before 4 beta. Does it work for anyone with Safari 4 beta?



[ Reply to This | # ]