chrome.extension.getVersion = function() { 
  if (!chrome.extension.version_) { 
    var xhr = new XMLHttpRequest(); 
    xhr.open("GET", chrome.extension.getURL('manifest.json'), false); 
    xhr.onreadystatechange = function() { 
      if (this.readyState == 4) { 
        var manifest = JSON.parse(this.responseText); 
        chrome.extension.version_ = manifest.version; 
      } 
   }; 
   xhr.send(); 
 } 
 return chrome.extension.version_; 
}

chrome.extension.getName = function() { 
  if (!chrome.extension.name_) { 
    var xhr = new XMLHttpRequest(); 
    xhr.open("GET", chrome.extension.getURL('manifest.json'), false); 
    xhr.onreadystatechange = function() { 
      if (this.readyState == 4) { 
        var manifest = JSON.parse(this.responseText); 
        chrome.extension.name_ = manifest.name; 
      } 
   }; 
   xhr.send(); 
 } 
 return chrome.extension.name_; 
}