function parseQueryString(queryString) {
  var result = {};
  if (queryString.length) {
    queryString = queryString.substring(1); // trim ?
  }
  var queryParts = queryString.split('&');
  for (var n = 0; n < queryParts.length; n++) {
    var pair = queryParts[n];
    var equalIndex = pair.indexOf('=');
    if (equalIndex != -1) {
      // Has an =, split.
      pair = pair.split('=');
      result[pair[0]] = pair[1];
    } else {
      // No =, just a bool.
      result[pair] = true;
    }
  }
  return result;
}
Parses a window query string into a map of key-value pairs.
No types are detected so assume all values are strings.
@param {string} queryString Query string.
@return {!Object.<string>} Key-value pairs.