title: HTML5 Local Storage, how to pass variables?
body: <p>Ok, here is my problem. I am writing a Chrome extension, it's almost done, but the problem is, for example:</p>
  
  <p>[Page popup.html]</p>
  
  <pre><code>localStorage["code"] = "alert('Hello!');";
  </code></pre>
  
  <p>[File injection.js; which will be called everytime a page is loaded, content script I think]</p>
  
  <pre><code>localStorage["code"] = (localStorage["code"] != undefined) ? localStorage["code"] : "alert('Default!');";
  eval(localStorage["code"]);
  </code></pre>
  
  <p>I have tried 2 methods, the first thing is to NOT OPEN THE POP UP, so that every page I load would run command alert("Default!"); and it works. Then I tried to load the popup first, and I realize that the variable <code>localStorage["code"]</code> is now up to the page I load, not to my extenstion anymore. In a quick explanation, in my extension, <code>localStorage["code"] == "alert('Hello');";</code> but in <a href="http://google.com" rel="nofollow">http://google.com</a> <code>localStorage["code"] == "";</code> or in <a href="http://facebook.com" rel="nofollow">http://facebook.com</a> <code>localStorage["code"] == "";</code>.</p>
  
  <p>My question is, is there anyway to store localStorage["code"] from popup.html that injection.js can access?</p>