code: function parseUrlHash_(hash) {
      const parameters = hash.split('&');
  
      let tabHash = parameters[0];
      if (tabHash === '' || tabHash === '#') {
        tabHash = undefined;
      }
  
      // Split each string except the first around the '='.
      let paramDict = null;
      for (let i = 1; i < parameters.length; i++) {
        const paramStrings = parameters[i].split('=');
        if (paramStrings.length !== 2) {
          continue;
        }
        if (paramDict === null) {
          paramDict = {};
        }
        const key = decodeURIComponent(paramStrings[0]);
        const value = decodeURIComponent(paramStrings[1]);
        paramDict[key] = value;
      }
  
      return {tabHash, parameters: paramDict};
    }
docs: Takes the current hash in form of "#tab&param1=value1&param2=value2&..."
  and parses it into a dictionary.
  
  Parameters and values are decoded with decodeURIComponent().