If running in an external window, don't run code on startup.  Prevents new window in chrome