code: function pushURL(language) {
      if (!history) { return; }
      var hash = window.location.hash;
      if (hash) {
        hash = hash.replace(/^#+/, '');
      }
      history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash);
  
      // save language as next default
      localStorage.setItem("language", language);
    }
docs: if a button is clicked, add the state to the history