docs: function( url ) {
                  var parsedUrl = this.parseUrl( url || location.href ),
                      uri = url ? parsedUrl : location,
  
                      // Make sure to parse the url or the location object for the hash because using
                      // location.hash is autodecoded in firefox, the rest of the url should be from
                      // the object (location unless we're testing) to avoid the inclusion of the
                      // authority
                      hash = parsedUrl.hash;
  
                  // mimic the browser with an empty string when the hash is empty
                  hash = hash === "#" ? "" : hash;
  
                  return uri.protocol +
                      parsedUrl.doubleSlash +
                      uri.host +
  
                      // The pathname must start with a slash if there's a protocol, because you
                      // can't have a protocol followed by a relative path. Also, it's impossible to
                      // calculate absolute URLs from relative ones if the absolute one doesn't have
                      // a leading "/".
                      ( ( uri.protocol !== "" && uri.pathname.substring( 0, 1 ) !== "/" ) ?
                          "/" : "" ) +
                      uri.pathname +
                      uri.search +
                      hash;
              }