I like your thinking, but I do have to wonder what you're trying to achieve
here.
Youtube-dl is great for downloading YouTube videos from the command line, but
if you're just browsing and want to watch a video without non-free software
(including javascript), why not just use HTML5-Video-Everywhere? [1]
This addon will replace the default YouTube video player (either Flash or
Javascript/HTML5) with the built-in native Firefox video player, which is
100% free software.
As a nice side-effect, it also makes it really easy to save videos if that's
what you want. Just right-click and select save.
The addon is 100% free software, and I believe it is included in the Trisquel
repositories.
[1] https://addons.mozilla.org/en-US/firefox/addon/html5-video-everywhere/