B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Trims the query part or reference identifier of a url string, if necessary.
   *
   * @param string aUrl
   *        The script url.
   * @return string
   *         The url with the trimmed query.
   */
Trims the query part or reference identifier of a url string, if necessary.
@param string aUrl
The script url.
@return string
The url with the trimmed query.
Trims the query part or reference identifier of a url string if necessary . @param string aUrl The script url . @return string The url with the trimmed query .
function SS_trimUrlQuery(aUrl) {
    let length = aUrl.length;
    let q1 = aUrl.indexOf('?');
    let q2 = aUrl.indexOf('&');
    let q3 = aUrl.indexOf('#');
    let q = Math.min(q1 !== -1 ? q1 : length,
                     q2 !== -1 ? q2 : length,
                     q3 !== -1 ? q3 : length);
    return aUrl.slice(0, q);
  }
function SS_trimUrlQuery ( aUrl ) { let length = aUrl . length ; let q1 = aUrl . indexOf ( '?' ) ; let q2 = aUrl . indexOf ( '&' ) ; let q3 = aUrl . indexOf ( '#' ) ; let q = Math . min ( q1 !== - 1 ? q1 : length , q2 !== - 1 ? q2 : length , q3 !== - 1 ? q3 : length ) ; return aUrl . slice ( 0 , q ) ; }
Trims the query part or reference identifier of a url string, if necessary.
Trims the query part or reference identifier of a url string if necessary .