Beatprice Chrome Extension Edition

Published 2011-09-08 on Farid Zakaria's Blog

Beatprice Chrome Extension

About time

It's been a while since I've been only working on my HypeMachine extension and although it was simple (although learning how to get around the isolated world was interesting). The passion to make the HypeMachine extension was largely driven by my passion for music, and that's why I'm excited about the new extension I'm working on!

What is @REMOVED@?

For those unfamiliar with this site, it is an online music store specializing in electronic/dance music. What's great about the music store is that the whole spectrum of popularity range is on the store, anyone from as well known such as Tiesto to smaller local DJs in your hometown.

The current catalog is made up of more than 700,000 tracks, 160,000 releases, and 24,000 artist charts from over 120,000 artists and remixers.

The Catalyst

The songs sold on the site are ahem pretty steep. For a user who's gotten use to either purchasing their music from larger music stores (i.e. iTunes or Amazon), any track more than 0.99$ seems a lot.

Most tracks on the site are 2.49$ for instance

The goal in writing this new extension was to quickly offer a way for someone browsing @REMOVED@ to see if it's available on another online music store at a cheaper price. It was while browsing the store with a friend and remembering having seen the same track offered at almost -50% the cost did the drive and idea to write this extension come about.

The Extension

My goal with the extension was to inject something onto the online music stores web page (as the user browsed), to notify them that a cheaper alternative had been found. The ultimate goal is to have a list of supported music stores to check against and then present the cheapest price. The current workflow model however is:

  1. Browse the site until you are ready to purchase a track
  2. Click the icon action button in the url bar
  3. The script will scrape the current page for all purchasable songs
  4. The script will then attempt to find matching songs and present them in a popup window

Here is a quick video to show what I've done so far with the extension. Please ignore the Screenflow watermark. I upgraded my version and it wanted me to purchase a new license. ><;

Future

There are a bunch of fixes and polish I'd like to make, however I am pretty excited that the idea overall is plausible and somewhat functional! Things I'd like to change or add to the extension are:

  • I'd like to inject the notification or link to the cheaper site directly next to the buy icon on the webpage rather than having the user click the button in the URL tray
  • I'd like to support a bunch more sites (depending on whether they offer a search API) since iTunes only really sells the more notable artists. Some of the sites I'd like to include are juno.co.uk and stompy.com
  • Figure out a way to better perform the matching/searching for each track or release. I'm currently matching 100% on the track's title and artist, however it would be nice to figure out a more lenient model perhaps involving regular expressions
  • Create a settings page where the user can insert their country of origin and other information (perhaps even how strong they'd like the pattern matching to be. The country of origin is important, since some stores price the content differently and may not be available in certain countries.

Contribute!

I've learnt already a great deal more about Chrome Extension development, however my Javascript skills are far from amazing. If you are a fan of the site and would like to contribute please fork my repository and contribute changes! Just like my previous extension, I've uploaded this extension on GitHub and would love to see feedback and contribution from others. Hopefully I have made a great base to get the ball rolling!

You can find the extension on my GitHub