function getUrl(url) {
  var xhr = new XMLHttpRequest();
  xhr.open('GET', url, false);
  xhr.send('');
  if (xhr.status != 200) {
    return null;
  }
  return xhr.responseText;
}
Synchronously fetch the given URL.
If the URL is a reference to an extension resource it must be in the
web_accessible_resources manifest group.
@param {string} url URL to fetch.
@return {string|null} URL contents.