function countLetters(){
  var text = location.search.match(/\?data=(.*)/)[1];
  text = text.replace(/\+/g, '');
  var char_count = new Object();
  var text_length = text.length;
  for(var i = 0; i < text_length; i++){
    char_count[text.charAt(i)] = 0;
  }
  for(var i = 0; i < text_length; i++){
    char_count[text.charAt(i)] += 1;
  }
  text = "";
  for(var eachProperty in char_count){
    text += eachProperty + " " + char_count[eachProperty] + "<br>";
  }
  document.getElementById("results").innerHTML += text;
}


@@ -106,16 +106,45 @@
 g, '');%0A
+  text = text.toLowerCase();%0A
   var ch

lowercase input text