Create application.js

The js file which uses the IndexDB API to store the data in browser's local storage.