sync code with html5-video-everywhere extension
sync with HTML5-video-everywhere commit 9facfc7