code: function initVersionSelect () {
      // version select
      var versionSelect = document.querySelector('.version-select')
      versionSelect && versionSelect.addEventListener('change', function (e) {
        var version = e.target.value
        var section = window.location.pathname.match(/\/v\d\/(\w+?)\//)[1]
        if (version === 'SELF') return
        window.location.assign(
          'http://' +
          version +
          (version && '.') +
          'vuejs.org/' + section + '/'
        )
      })
    }
docs: Doc version select