Open links in a new, regular Chrome window or tab
The old way the code was handling links opened them in a webapp webview window. The reasoning behind it - as I understand it from the code comments - was because window.open() crashed Chrome. But that's only correct when trying to use window.open() without the event handler because of a security restriction on Chrome packaged apps. Once you add the event handler, window.open() works perfectly fine.