title: Storing/Accessing a simple variable in Firefox Addon SDK
body: <p>I hope that I haven't missed an answer here to this question, which seems far too simple but I can't find an answer between Mozilla or Stackoverflow.</p>
  
  <p>I am trying to use the Mozilla Addon SDK simple storage to store one single number that contains the number of pages that have been visited since the addon was activated. In order to do this I am increasing the variable number once on every page load. See code below. The only thing I can't find information on is how to load the stored data from the console (or, if I am misunderstanding, is this data not stored locally in the browser?). Where the comment says "//load ss.storage.page_visits" is where my problem arises - I cannot understand how to load this data.</p>
  
  <pre><code>var ss = require("sdk/simple-storage");
  var pageMod = require("sdk/page-mod");
  //load ss.storage.page_visits
  if (!ss.storage.page_visits){
      ss.storage.page_visits = 0;
  }
  var test=   '"&lt;style&gt;\
                  h1{\
                      font-size: 5em;\
                      color: red;\
                      font-family: Helvetica;\
                  }\
              &lt;/style&gt;\
                  &lt;h1&gt;test&lt;/h1&gt;&lt;h2&gt;' + ss.storage.page_visits + '&lt;/h2&gt;"';
  
  ss.storage.page_visits++;
  if (ss.storage.page_visits/5 == 1){
      pageMod.PageMod({
        include: "*",
        contentScript: 'document.body.innerHTML = ' +
                       test
      });
      ss.storage.page_visits = 0;
  }else{
      pageMod.PageMod({
        include: "*",
        contentScript: 'document.body.innerHTML = ' +
                       test
      });
  }
  console.log(ss.storage.page_visits);
  </code></pre>