extensions/wtf-injector-firefox/lib/main.js
function getCanonicalUrl(url) {
  // Trim the #fragment. We are unique to query string, though.
  var hashIndex = url.indexOf('#');
  if (hashIndex != -1) {
    url = url.substring(0, hashIndex);
  }
  return url;
}
function getCanonicalUrl(url) {
  // Trim the #fragment. We are unique to query string, though.
  var hashIndex = url.indexOf('#');
  if (hashIndex != -1) {
    url = url.substring(0, hashIndex);
  }
  return url;
}
function getCanonicalUrl ( url ) { // Trim the #fragment. We are unique to query string, though. var hashIndex = url . indexOf ( '#' ) ; if ( hashIndex != - 1 ) { url = url . substring ( 0 , hashIndex ) ; } return url ; }
Canonicalizes a URL so that it can be matched against.
@param {string} url URL.
@return {string} Canonical URL.
Canonicalizes a URL so that it can be matched against .