Lately I switched from using Chrome as my main browser to Safari on my MacBook. As the Safari Browser has not nearly as much extensions as Chrome, I had to look for some handy extensions to interact with my home mediacenter XBMC.
One of the nice little features of XBMC and its JSON interface is the possibility to send remote requests. So its pretty easy to send „Play“, „Pause“ oder „Vol+“ commands.
The nice thing about this is the possibility to send YouTube video ids to XBMCs YouTube plugin. With some sample code on hand and a tutorial for building Safari extensions I started coding.
It did not take to long to send some simple XMLHttpRequests and figure out a way to get the Video id from the URL string.
I hope you find this Safari extension useful.