Wednesday, June 01, 2016

Extending Knowledge with Chrome Extension

A bit of Google-ing and a read through the examples on Chrome Extensions, and I was able to create my first very simple Chrome extension.

When I come across a movie that I'd like to see - in a newsreader, YouTube trailer - I like to add it to my Netflix queue. This involves opening a new tab, going to Netflix, typing in the movie name in the search bar and then adding it to my saved queue. It'd be nice to just highlight the movie name text in the page I'm reading, right-click and select "Add to Netflix Queue". So that's what my extension does.

I needed to understand the basic extension manifest, how to use 'contextMenus' and the Netflix search URL. Code can be found on GitHub.

I haven't thought about putting it on the Chrome Store because of the graphics using the Netflix logo. This is not an extension authorized by Netflix so I don't want to have any issues around that. That would of course make installation easier as well as make Chrome not complain and remove the extension on each relaunch due to it not being in the Chrome Store.

I could also look into the Netflix API to see if I could authenticate if not already logged in and do some other checking, but for the 0.0.0.1 version, I'm more than happy I could hack something together that actually works!

No comments :

 

Copyright © VinsWorld. All Rights Reserved.