function bindListeners()

in index.js [128:149]


function bindListeners() {
  for (const input of inputs) {
    input.addEventListener('input', recommendRegion);
    input.addEventListener('input', grayOutWhenZero);
  }

  document.getElementById('locations').addEventListener('change', recommendRegion);

  document.getElementById('products').addEventListener('change', recommendRegion);

  document.getElementById('share').addEventListener('click', () => {
    navigator.share({
      title: 'Google Cloud region recommender',
      url: document.location.href,
    });
  });

  document.getElementById('more').addEventListener('click', (event) => {
    event.target.remove();
    document.getElementById('results').classList.remove('short');
  });
};