function handleFileSelect(evt) {
  evt.stopPropagation();
  evt.preventDefault();
  $('#drop_zone').remove();


  var canvas = document.getElementById('canvas');
  var ctx = canvas.getContext('2d');
  var img = new Image;
  img.src = URL.createObjectURL(evt.dataTransfer.files[0]);
  img.onload = function() {
    canvas.height = img.height;
    canvas.width = img.width;

    ctx.drawImage(img, 0, 0);
  }

}

function handleDragOver(evt) {
  evt.stopPropagation();
  evt.preventDefault();
  evt.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.
}

@@ -561,8 +561,311 @@
 copy.%0A%7D%0A
+%0Afunction number_of_cats() %7B%0A  // Try to get it from the hostname%0A  var cats = window.cats;%0A%0A  if (cats !== undefined)%0A    return cats;%0A%0A  cats = parseInt(window.location.hostname.split(%22.%22)%5B0%5D, 10);%0A  if (isNaN(cats))%0A    cats = Math.floor(Math.random() * 100);%0A%0A  window.cats = cats;%0A  return cats;%0A%7D%0A

Work out how many cats to draw