function removeUnwantedArticleElements()

in inflation-explorer/harness/update-harness.js [85:106]


function removeUnwantedArticleElements(document) {
  // remove all <script> tags
  document.querySelectorAll('script').forEach(element => {
    element.remove()
  })

  // remove banner ad from top of page
  document.querySelector('.top-banner-ad-container').remove()

  let headline = document.querySelector('[data-gu-name="headline"]')
  headline.querySelector('div:first-child>div:first-child>div').remove()

  let media = document.querySelector('[data-gu-name="media"]')
  media.remove()

  // remove email form
  document.querySelector('#footer__email-form').remove()

  // remove content
  let content = articleContentNode(document)
  content.innerHTML = ''
}