export class Tabs {
  initEventListeners () {
    $('.nav-tabs a').on('click', $.proxy(this.changeTab, this))
  }

  changeTab (event) {
    let $current = $(event.currentTarget)
    /* if the browser supports history.pushState(), use it to update the URL
     with the fragment identifier, without triggering a scroll/jump */
    if (window.history && window.history.pushState) {
      /* an empty state object for now — either we implement a proper
       popstate handler ourselves, or wait for jQuery UI upstream */
      window.history.pushState({}, document.title, $current.href)
    } else {
      let scrolled = $(window).scrollTop()
      window.location.hash = '#' + $current.href.split('#')[1]
      $(window).scrollTop(scrolled)
    }
    $current.tab('show')
  }
}

@@ -35,24 +35,43 @@
 teners () %7B%0A
+    this.loadTab()%0A
     $('.nav-
@@ -787,11 +787,278 @@
 ow')%0A  %7D
+%0A%0A  loadTab () %7B%0A    let url = document.location.toString()%0A    if (url.match('#')) %7B%0A      let anchor = '#' + url.split('#')%5B1%5D%0A%0A      if ($('.nav-tabs a%5Bhref=' + anchor + '%5D').length %3E 0) %7B%0A        $('.nav-tabs a%5Bhref=' + anchor + '%5D').tab('show')%0A      %7D%0A    %7D%0A  %7D
 %0A%7D%0A

Load current tab from url hash