function displayZoomLevel(level) {
  const percentZoom = parseFloat(level) * 100;
  const zoom_percent_str = percentZoom.toFixed(1) + '%';

  document.getElementById('displayDiv').textContent = zoom_percent_str;
}
@fileoverview This code supports the popup behaviour of the extension, and
              demonstrates how to:

              1) Set the zoom for a tab using tabs.setZoom()
              2) Read the current zoom of a tab using tabs.getZoom()
              3) Set the zoom mode of a tab using tabs.setZoomSettings()
              4) Read the current zoom mode of a tab using
              tabs.getZoomSettings()

              It also demonstrates using a zoom change listener to update the
              contents of a control.