On the subject of YouTube related chrome extensions, I created one called WikiTube a couple of years ago. Its super simple, and just adds relevant YouTube videos to the top of Wikipedia pages. I'm quite happy with it
I never got around to putting it on github, but its very easy to look at the original source code of any chrome extension, its not protected at all. By all means look through the code, there's not a lot of it :)
https://chrome.google.com/webstore/detail/wikitube/aneddidib...