title: Add items to local storage across multiple pages
body: <p>There are two files. The first:</p>
  
  <pre><code>&lt;div class="someclass"&gt;text1&lt;/div&gt;
  &lt;div class="someclass"&gt;text2&lt;/div&gt;
  
  &lt;script&gt;
    var foo = document.getElementsByClassName("someclass");
    var arr = Array.prototype.map.call(foo, function(elem) {
      return elem.innerHTML;
    });
    localStorage.foobar = JSON.stringify(arr);
    alert(localStorage.foobar);
  &lt;/script&gt;
  </code></pre>
  
  <p>That gives: <code>["text1","text2"]</code></p>
  
  <p>The second (files are identical except inner text in first two lines):</p>
  
  <pre><code>&lt;div class="someclass"&gt;text3&lt;/div&gt;
  &lt;div class="someclass"&gt;text4&lt;/div&gt;
  
  &lt;script&gt;
    var foo = document.getElementsByClassName("someclass");
    var arr = Array.prototype.map.call(foo, function(elem) {
      return elem.innerHTML;
    });
    localStorage.foobar = JSON.stringify(arr);
    alert(localStorage.foobar);
  &lt;/script&gt;
  </code></pre>
  
  <p>That gives: <code>["text3","text4"]</code></p>
  
  <p>I would like the second file to give <code>["text1","text2","text3","text4"]</code>, or maybe <code>["text3","text4","text1","text2"]</code>.</p>
  
  <p>How can I do that?</p>