// Happen as soon as the DOM is loaded and before assets are downloaded
jQuery(function ($) {
  $('.js-hide-other-links').hideOtherLinks()
  $('.js-hide-other-departments').hideOtherLinks({ linkElement: 'span', alwaysVisibleClass: '.lead' })

  $('.govspeak').enhanceYoutubeVideoLinks()

  $('.js-toggle-change-notes').toggler({ actLikeLightbox: true })
  $('.js-toggle-footer-change-notes').toggler()

  $('.js-hide-extra-social-media').hideExtraRows({ rows: 5 })
  $('.js-hide-extra-metadata').hideExtraRows({ rows: 2, appendToParent: true })

  $('.see-all-updates').click(function (e) {
    $('#history .overlay').removeClass('visuallyhidden')
  })

  GOVUK.worldLocationFilter.init()
  GOVUK.hideDepartmentChildren.init()
  GOVUK.filterListItems.init()
  GOVUK.showHide.init()
  GOVUK.feeds.init()
})
// These want images to be loaded before they run so the page height doesn't change.
jQuery(window).load(function () {
  GOVUK.backToContent.init()
})

// Happen as soon as the DOM is loaded and before assets are downloaded
jQuery(function ($) {
  $('.js-hide-other-links').hideOtherLinks()
  $('.js-hide-other-departments').hideOtherLinks({ linkElement: 'span', alwaysVisibleClass: '.lead' })

  $('.govspeak').enhanceYoutubeVideoLinks()

  GOVUK.worldLocationFilter.init()
  GOVUK.hideDepartmentChildren.init()
  GOVUK.filterListItems.init()
  GOVUK.showHide.init()
  GOVUK.feeds.init()
})
// These want images to be loaded before they run so the page height doesn't change.
jQuery(window).load(function () {
  GOVUK.backToContent.init()
})

Remove JS that is no longer used
Remove JS that is no longer used

When I was looking at CSS that wasn't used I found this Javascript too.

I identified this wasn't used by grepping the code base for class names.
