extensions/wtf-injector-chrome/wtf-injector.js
function injectAddons(manifestUrls) {
  var addons = {};
  for (var n = 0; n < manifestUrls.length; n++) {
    // Fetch Manifest JSON.
    var url = manifestUrls[n];
    var json = getUrl(url);
    if (!json) {
      log('Unable to fetch manifest JSON: ' + url);
      continue;
    }
    json = JSON.parse(json);
    addons[url] = json;

    // If it has a tracing node, inject scripts.
    var tracingInfo = json['tracing'];
    if (tracingInfo && tracingInfo['scripts']) {
      var tracingScripts = tracingInfo['scripts'];
      for (var m = 0; m < tracingScripts.length; m++) {
        var scriptUrl = resolveUrl(url, tracingScripts[m]);
        if (!injectScriptFile(scriptUrl)) {
          log('Error loading addon ' + url + ':');
          log('Tracing script file not found: ' + scriptUrl);
        }
      }
    }
  }
  return addons;
}
function injectAddons(manifestUrls) {
  var addons = {};
  for (var n = 0; n < manifestUrls.length; n++) {
    // Fetch Manifest JSON.
    var url = manifestUrls[n];
    var json = getUrl(url);
    if (!json) {
      log('Unable to fetch manifest JSON: ' + url);
      continue;
    }
    json = JSON.parse(json);
    addons[url] = json;

    // If it has a tracing node, inject scripts.
    var tracingInfo = json['tracing'];
    if (tracingInfo && tracingInfo['scripts']) {
      var tracingScripts = tracingInfo['scripts'];
      for (var m = 0; m < tracingScripts.length; m++) {
        var scriptUrl = resolveUrl(url, tracingScripts[m]);
        if (!injectScriptFile(scriptUrl)) {
          log('Error loading addon ' + url + ':');
          log('Tracing script file not found: ' + scriptUrl);
        }
      }
    }
  }
  return addons;
}
function injectAddons ( manifestUrls ) { var addons = { } ; for ( var n = 0 ; n < manifestUrls . length ; n ++ ) { // Fetch Manifest JSON. var url = manifestUrls [ n ] ; var json = getUrl ( url ) ; if ( ! json ) { log ( 'Unable to fetch manifest JSON: ' + url ) ; continue ; } json = JSON . parse ( json ) ; addons [ url ] = json ; // If it has a tracing node, inject scripts. var tracingInfo = json [ 'tracing' ] ; if ( tracingInfo && tracingInfo [ 'scripts' ] ) { var tracingScripts = tracingInfo [ 'scripts' ] ; for ( var m = 0 ; m < tracingScripts . length ; m ++ ) { var scriptUrl = resolveUrl ( url , tracingScripts [ m ] ) ; if ( ! injectScriptFile ( scriptUrl ) ) { log ( 'Error loading addon ' + url + ':' ) ; log ( 'Tracing script file not found: ' + scriptUrl ) ; } } } } return addons ; }
Injects the given addons into the page.
@param {!Array.<string>} manifestUrls Addon manifest JSON URLs.
@return {!Object.<!Object>} Addon manifests, mapped by manifest URL.
Injects the given addons into the page .