Posts

Showing posts from May, 2012

Cross site HTTP Auth via JavaScript

The best way to authenticate against another website is of course OAuth. But sometimes such an mechanism is not provided. E.g. Magnatune.com currently only supports HTTP Auth. Now that is something completely different, you might say (no communication between the two web servers possible). Well, once authenticated via HTTP Auth with Magnatune.com any site can embed a HTML5 audio element to play the member streams instead of just the free versions. So to enable a member feature in my Magnatune PlayerGreattune Player I came up with a hack to authenticate against Magnatune via JavaScript. Actually it's several hacks for different browsers and browser versions.

Add Browser Ponies to your Blog

Image
Because I was asked how to add Browser Ponies (a Desktop Ponies implementation in JavaScript I wrote a while ago) to your blogger blog I thought I write a howto here. For adding Browser Ponies to your tumblr see here. And here is a video showing how to make a Browser Ponies bookmarklet.

Save/download data generated in JavaScript

Because I was bored I wrote a HTML5 player for Magnatune: Magnatune PlayerGreattune Player [repo]. Besides learning jQuery, HTML5 audio and HTML Drag and Drop I also developed a method to save playlists to files. Everything except the search is implemented in JavaScript, so the server never knows the playlist. Because I didn't want to send the playlist to the server just so the user can download it I investigated what methods there are to save data generated in JavaScript. I came up with the solution presented here. It does not use Flash or a echo server and is therefore supported in every recent browser except Internet Explorer before the version 10.