parseUrlParams_(url) {
    const params = {};

    const paramIndex = url.search('#');
    if (paramIndex == -1)
      return params;

    const paramTokens = url.substring(paramIndex + 1).split('&');
    if ((paramTokens.length == 1) && (paramTokens[0].search('=') == -1)) {
      // Handle the case of http://foo.com/bar#NAMEDDEST. This is not
      // explicitly mentioned except by example in the Adobe
      // "PDF Open Parameters" document.
      params['nameddest'] = paramTokens[0];
      return params;
    }

    for (let paramToken of paramTokens) {
      const keyValueSplit = paramToken.split('=');
      if (keyValueSplit.length != 2)
        continue;
      params[keyValueSplit[0]] = keyValueSplit[1];
    }

    return params;
  }
/**
   * Parse the parameters encoded in the fragment of a URL into a dictionary.
   *
   * @param {string} url to parse
   * @return {Object} Key-value pairs of URL parameters
   * @private
   */
Parse the parameters encoded in the fragment of a URL into a dictionary.
@param {string} url to parse
@return {Object} Key-value pairs of URL parameters
@private
Parse the parameters encoded in the fragment of a URL into a dictionary . @param { string } url to parse @return { Object } Key - value pairs of URL parameters @private
parseUrlParams_(url) {
    const params = {};
    const paramIndex = url.search('#');
    if (paramIndex == -1)
      return params;
    const paramTokens = url.substring(paramIndex + 1).split('&');
    if ((paramTokens.length == 1) && (paramTokens[0].search('=') == -1)) {
      params['nameddest'] = paramTokens[0];
      return params;
    }
    for (let paramToken of paramTokens) {
      const keyValueSplit = paramToken.split('=');
      if (keyValueSplit.length != 2)
        continue;
      params[keyValueSplit[0]] = keyValueSplit[1];
    }
    return params;
  }
parseUrlParams_ ( url ) { const params = { } ; const paramIndex = url . search ( '#' ) ; if ( paramIndex == - 1 ) return params ; const paramTokens = url . substring ( paramIndex + 1 ) . split ( '&' ) ; if ( ( paramTokens . length == 1 ) && ( paramTokens [ 0 ] . search ( '=' ) == - 1 ) ) { params [ 'nameddest' ] = paramTokens [ 0 ] ; return params ; } for ( let paramToken of paramTokens ) { const keyValueSplit = paramToken . split ( '=' ) ; if ( keyValueSplit . length != 2 ) continue ; params [ keyValueSplit [ 0 ] ] = keyValueSplit [ 1 ] ; } return params ; }
Parse the parameters encoded in the fragment of a URL into a dictionary.
Parse the parameters encoded in the fragment of a URL into a dictionary .
// Handle the case of http://foo.com/bar#NAMEDDEST. This is not // explicitly mentioned except by example in the Adobe // "PDF Open Parameters" document.