Update main.js

First attempt with indexedDBs.  How bad could it go?