JS capitalize
diff --git a/index.html b/index.html
index e579985..7f0a605 100644
--- a/index.html
+++ b/index.html
@@ -20,6 +20,10 @@
</head>
<body>
<script>
+String.prototype.capitalize = function() {
+ return this.charAt(0).toUpperCase() + this.slice(1);
+}
+
var elements = document.getElementsByClassName("button");
Array.from(elements).forEach(function(element) {
element.addEventListener('click', clickButton);
@@ -147,7 +151,7 @@
var header = document.createElement('div');
header.classList.add('message-header');
- header.textContent = classe.friendly_name || classe.calendar_name;
+ header.textContent = classe.friendly_name.capitalize() || classe.calendar_name.capitalize();
var body = document.createElement('div');
body.classList.add('message-body');