title: How to get the windows user name using javascript in google chrome browser for google chrome extension
body: <p>I have used the following code in javascript to get the windows user name in Firefox to create a firefox extension.</p>
  
  <pre><code>Components.classes["@mozilla.org/process/environment;1"].getservice(components.interfaces.nsienvironment).get('username');
  </code></pre>
  
  <p>Now I need to get the windows user name in javascript for <strong>Google Chrome</strong> to create a sample google chrome extension.</p>