Script Summary: Replace the HTML code used to embed a Youtube video with valid HTML code. This version implement autocopy using a Flash script.
- removed the IE code that is unnecessary;
- I have transformed the function copyToClipboard to accept as input a string (instead of an input object as before), in this way it could be used to copy generic text, not only the value of input box.
End of Update
I have uploaded another userscript because this new version have little improovement in terms of usability but it require to use an external SWF file hosted on my site..
this is a modified version of my userscript: Youtube HTML Valid which add copy to clipboard capability when you click in the input box where is saved the embed code.
It is impossible to implement copy to clipboard function in Firefox (only extensions have these privilegies), as work around, it is possible to use a Flash script. This is not a "great" solution but it is the better one. Flash is very popular and if you want to view Youtube video you need to have it installed.
This script use an external swf file that I have uploaded on my web space and that I have downloaded from here:
If my webspace is down the copy to clipboard doen't work, if you have a webspace you can host the file on your space and modify the variable: clipboardswfpath with the location of the _clipboard.swf file.
If you don't like using an external Flash script, please download the old version of my script (without copy to clipboard capabilities).
NOTE: if you have already installed an old version of Youtube HTML Valid (<=0.4) please remove it first to avoid conflicts.
Replace the wrong HTML code provided by Youtube to embed a video in you blog/site with a standard valid HTML code recognized by the W3C Validator.