Implementing this looks like it would be a fun project: https://github.com/JMPerez/spotify-web-api-js
You'd still need the Spotify desktop client open (Winamp2-js would function as a remote), but you could do things like populating the playlist window with a user playlist.