add support for chrome apps

In a chrome app, it appears the following error:

window.localStorage is not available in packaged apps. Use chrome.storage.local instead.
```js
chrome.storage.local !== undefined
// ReferenceError: Can't find variable: chrome
```

in every browser other than chrome