Play YouTube inside of Gmail chat

If you ever wanted to watch YouTube while inside of Gmail this Chrome Extension is for you. What this does is take over your 'Tasks' popup box and place a YouTube video or playlist in that area. The point is I like to watch and sometimes listen to YouTube videos. It's sorta a pain to have two tabs open when I'm working in Gmail. So this Chrome Extension will put a page action button that when hit will ask you for a YouTube video or playlist URL. Then that video will popup inside your Gmail and everyone is happy.

So how's this all work?

I used Google's Closure JavaScript library for this. If you aren't familiar think the conveniences of jQuery but with more optimizations baked in. Specifically your JavaScript code is compiled into super-optimized JavaScript. This runs faster and works out all the cross-compatibility issues between different browsers.

Now lets take a look at the injected code:

This code will be run in the context of the page itself. The above was just in the extension's background view. This script will do all the heavy lifting. 


So that should do it. If everything works out you'll get it installed and playing videos in no time.

Popular posts from this blog

How to create a Chrome Extension

Connect to Gmail with Apps Script