store chrome window object in localstorage code example
Example 1: save to local storage
localStorage.setItem('myCat', 'Tom');
var cat = localStorage.getItem('myCat');
localStorage.removeItem('myCat');
// Clear all items
localStorage.clear();
Example 2: localstorage
localStorage.setItem('name', 'Bob') // make/set a key/value
var username = localStorage.getItem('name') // get the key
console.log(username) // log the key
// This data will be saved even after you close the page