YousableTubeFix

By Mindeye Last update Feb 2, 2012 — Installed 594,792 times.

Save as filename

in
Subscribe to Save as filename 8 posts, 7 voices



zzzhong User
FirefoxWindows

Great scripts. It would be even nicer if the default save-as filename is some unique string such as the youtube video id.

 
Meuhcoin Scriptwright
FirefoxX11

I think Mindeye already explained that it wasn't possible : the name of the video is decided by the server, not the client, so it can't be changed with Javascript. All videos are stored with the filename "video.mp4" or "video.flv" on YouTube's server.
As for changing the name when the "Save as" window pops up, I don't think Javascript can do that either because it's a part of the browser, not the webpage.

Could be wrong though!

 
SlimShady Scriptwright
MozillaWindows

I believe only extensions could do that. Because they're closer to the browser.

 
Mindeye Script's Author
FirefoxWindows

Meuhcoin and Slimshady are right. I haven't found a way to change the filename using Javascript. I can only suggest the file type if the server doesn't do it (that's why you see video.flv and video.mp4 instead of getvideo, etc...).

 
armvdw User
FirefoxWindows

Couldn't it just grab the Title that is above the movie and
use this one as the prefered filename ?

 
Nintendo Man... User
FirefoxX11

There's also the problem of unsupported characters for filenames (like slashes), I could assume they could be replaced with a space.

 
FaeGiN Scriptwright
FirefoxWindows

Is it not possible to parse the title above the video and use that?
I am sure there are scripts (I may be wrong here though!) that take info from a page in a similar way.
Hmm I need to find one and have a look in it maybe.
I have an addon that does this for downloading youtube videos but I want to ditch any unnecessary addons in favour of this script if I can!
Please can someone maybe give me a clue on the code to take the title of the video and use it in this way?

 
Meuhcoin Scriptwright
FirefoxX11

The problem isn't to parse the title of the video, that would be too easy. The problem is that you then need to tell the browser "Use this string as the filename when saving the file". However, a Javascript script cannot do this, maybe because of security issues.
As you said, only add-ons for Firefox can directly tell the browser a filename, because they are closer to it. Now maybe some script writers found a workaround for this but I have yet to find one that is able to do that.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel