extensions/wtf-injector-chrome/popup.js
function updateWithInfo(info) {
  var disableOverlay = document.querySelector('.disableOverlay');
  var stopRecordingButton = document.querySelector('.buttonStopRecording');

  var status = info.status;
  switch (status) {
    case 'instrumented':
      // Instrumentation is enabled for the page.
      disableOverlay.style.display = '';
      stopRecordingButton.innerText = 'Stop Recording';
      break;
    case 'whitelisted':
      // Tracing is enabled for the page.
      disableOverlay.style.display = '';
      stopRecordingButton.innerText = 'Stop Recording For This URL';
      break;
    default:
      // Tracing is disabled for the page.
      disableOverlay.style.display = 'none';
      stopRecordingButton.innerText = '';
      break;
  }

  buildAddonTable(info.all_addons, info.options['wtf.addons']);
}
function updateWithInfo(info) {
  var disableOverlay = document.querySelector('.disableOverlay');
  var stopRecordingButton = document.querySelector('.buttonStopRecording');

  var status = info.status;
  switch (status) {
    case 'instrumented':
      // Instrumentation is enabled for the page.
      disableOverlay.style.display = '';
      stopRecordingButton.innerText = 'Stop Recording';
      break;
    case 'whitelisted':
      // Tracing is enabled for the page.
      disableOverlay.style.display = '';
      stopRecordingButton.innerText = 'Stop Recording For This URL';
      break;
    default:
      // Tracing is disabled for the page.
      disableOverlay.style.display = 'none';
      stopRecordingButton.innerText = '';
      break;
  }

  buildAddonTable(info.all_addons, info.options['wtf.addons']);
}
function updateWithInfo ( info ) { var disableOverlay = document . querySelector ( '.disableOverlay' ) ; var stopRecordingButton = document . querySelector ( '.buttonStopRecording' ) ; var status = info . status ; switch ( status ) { case 'instrumented' : // Instrumentation is enabled for the page. disableOverlay . style . display = '' ; stopRecordingButton . innerText = 'Stop Recording' ; break ; case 'whitelisted' : // Tracing is enabled for the page. disableOverlay . style . display = '' ; stopRecordingButton . innerText = 'Stop Recording For This URL' ; break ; default : // Tracing is disabled for the page. disableOverlay . style . display = 'none' ; stopRecordingButton . innerText = '' ; break ; } buildAddonTable ( info . all_addons , info . options [ 'wtf.addons' ] ) ; }
Updates the popup with the given page information.
@param {!Object} info Page information.
Updates the popup with the given page information .