User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 I would like a button added to the Firefox "Save As" dialog box that would replace the contents of the "Name:" field with a filename generated from the URL, according to the following rules: - change the "://" after the protocol to a single slash - reverse the dot-separated fields of the hostname and replace them with slashes - make the protocol name a directory level after the hostname - if a non-default port number is used, append it to the protocol name - replace all weird characters with their escaped ("%##") equivalents - make all the slashes backslashes on MicroSoft systems :-) Examples: 1. Hitting the "generate URL from file" button while viewing http://www.cs.wichita.edu/~hains/prof/resume.html would replace the name in the "File:" field with edu/wichita/cs/www/http/%7Ehains/prof/resume.html 2. Hitting the "generate URL from file" button while viewing http://www.cs.wichita.edu:888/~hains/prof/resume:abc.html would replace the name in the "File:" field with edu/wichita/cs/www/http888/%7Ehains/prof/resume%3Aabc.html A demangler to retrieve the original page from a filename would be useful as well, but considerably less important. Another option would be to escape any "_" characters in the URL and then replace the "/"s in the generated filenames with "_"s. Reproducible: Always
Related to/duplicate of Core bug 173982?
*** This bug has been marked as a duplicate of 173982 ***