parsing localstorage objects before passing to contentscript