Does this help?
https://github.com/jonathanboom/YouTube-video-downloader-for-Safari

What version of OS X and Safari?