diff --git a/index.html b/index.html
index 10ae0eb..7481e28 100644
--- a/index.html
+++ b/index.html
@@ -568,7 +568,7 @@
{{#website}}
- - {{website}}
+ - {{cleanedWebsite}}
{{/website}}
- Events: {{events}}
- Café: {{cafe}}
@@ -606,6 +606,7 @@
$.each(data, function (key, value) {
value.rowNumber = key;
value.slug = slugify(value.name);
+ value.cleanedWebsite = cleanWebsite(value.website);
});
$("#storeCount").html(data.length);
window.data = data;
@@ -637,6 +638,14 @@
.replace(/^-|-$/g, "");
}
+ function cleanWebsite(str) {
+ return str
+ .toLowerCase()
+ .replace(/^https?:\/\//g, "")
+ .replace(/^www./g, "")
+ .replace(/\/$/g, "");
+ }
+
function getStoreBySlug(slug) {
var ret = false;
$.each(window.data, function (key, value) {