prevent uncaught 'beforeunload is not available in packaged apps'
Merge pull request #265 from aggressiveasparagus/master

prevent uncaught 'beforeunload is not available in packaged apps'