resize window before opening an url