Browse Source

Merge remote-tracking branch 'origin/master' into spaceapi

Aubort Jean-Baptiste 6 years ago
parent
commit
fefd43b164
1 changed files with 4 additions and 1 deletions
  1. 4 1
      site/script/main.js

+ 4 - 1
site/script/main.js

@@ -15,6 +15,9 @@ function loadmap(){
         String.prototype.startsWith = function (str){
             return this.indexOf(str) == 0;
         };
+        String.prototype.capitalize = function(str) {
+            return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
+        }
     }
 }
 
@@ -92,7 +95,7 @@ function populateData(key){
     dl.empty()
     $.each(hackerspaces[key], function(key, value){
         var dt = $('<dt>');
-        dt.text(key)
+        dt.text(key.capitalize())
         dl.append(dt);
 
         var dd = $('<dd>');