By the way, the UnPlug extension does this automatically.
I've made a video tutorial about something related to this, by the way; you might find it useful in the future:
https://goblinrefuge.com/mediagoblin/u/onpon4/m/tutorial-watching-videos-without-javascript/