title: How to get the windows (logged in) username in Firefox using Javascript
body: <p>I am working on a very old web application(only for intranet usage). In the code, the developer is obtaining the logged in account via this</p>
  
  <p><code>var wshNetwork = new ActiveXObject("WScript.Network");
  document.getElementById('userId').value = wshNetwork.UserName;
  </code></p>
  
  <p>This works only in IE. How can I get the logged in account in Firefox/chrome?</p>
  
  <p>I have looked in to other thread (ex: <a href="https://stackoverflow.com/questions/399263/finding-the-currently-logged-in-user-from-a-firefox-extension">Finding the currently logged in user from a Firefox extension</a>) but that's only for extension. </p>
  
  <p>Are there any other ways to get the domain logged in username in Firefox/Chrome?</p>