netlog_viewer/netlog_viewer/ui_webui_resources_js_util.js
function setQueryParam(location, key, value) {
  var query = parseQueryParams(location);
  query[encodeURIComponent(key)] = encodeURIComponent(value);

  var newQuery = '';
  for (var q in query) {
    newQuery += (newQuery ? '&' : '?') + q + '=' + query[q];
  }

  return location.origin + location.pathname + newQuery + location.hash;
}
function setQueryParam(location, key, value) {
  var query = parseQueryParams(location);
  query[encodeURIComponent(key)] = encodeURIComponent(value);

  var newQuery = '';
  for (var q in query) {
    newQuery += (newQuery ? '&' : '?') + q + '=' + query[q];
  }

  return location.origin + location.pathname + newQuery + location.hash;
}
function setQueryParam ( location , key , value ) { var query = parseQueryParams ( location ) ; query [ encodeURIComponent ( key ) ] = encodeURIComponent ( value ) ; var newQuery = '' ; for ( var q in query ) { newQuery += ( newQuery ? '&' : '?' ) + q + '=' + query [ q ] ; } return location . origin + location . pathname + newQuery + location . hash ; }
Creates a new URL by appending or replacing the given query key and value.
Not supporting URL with username and password.
@param {Location} location The original URL.
@param {string} key The query parameter name.
@param {string} value The query parameter value.
@return {string} The constructed new URL.
Creates a new URL by appending or replacing the given query key and value . Not supporting URL with username and password .