B2G/gecko/browser/components/feeds/src/FeedWriter.js
/**
   * Takes a url to a media item and returns the best name it can come up with.
   * Frequently this is the filename portion (e.g. passing in 
   * http://example.com/foo.mpeg would return "foo.mpeg"), but in more complex
   * cases, this will return the entire url (e.g. passing in
   * http://example.com/somedirectory/ would return 
   * http://example.com/somedirectory/).
   * @param aURL
   *        The URL string from which to create a display name
   * @returns a string
   */
Takes a url to a media item and returns the best name it can come up with.
Frequently this is the filename portion , but in more complex
cases, this will return the entire url .
@param aURL
The URL string from which to create a display name
@returns a string
Takes a url to a media item and returns the best name it can come up with . Frequently this is the filename portion but in more complex cases this will return the entire url . @param aURL The URL string from which to create a display name @returns a string
function FW__getURLDisplayName(aURL) {
    var url = makeURI(aURL);
    url.QueryInterface(Ci.nsIURL);
    if (url == null || url.fileName.length == 0)
      return decodeURIComponent(aURL);
    return decodeURIComponent(url.fileName);
  }
function FW__getURLDisplayName ( aURL ) { var url = makeURI ( aURL ) ; url . QueryInterface ( Ci . nsIURL ) ; if ( url == null || url . fileName . length == 0 ) return decodeURIComponent ( aURL ) ; return decodeURIComponent ( url . fileName ) ; }
Takes a url to a media item and returns the best name it can come up with.
Takes a url to a media item and returns the best name it can come up with .