From 8a5e6dda222872aa1137482811b993fb8f81edb6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 2 Apr 2017 19:34:33 +0200 Subject: check hostname and launch in test mode --- StoneIsland/www/js/index.js | 8 +++++++- StoneIsland/www/js/lib/products/filters/SizeFilter.js | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index e583a2cd..43b55b04 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -4,7 +4,13 @@ var app = (function(){ app.init = function(){ console.log("init") - sdk.init({ env: "test" }) + if (window.location.hostname === 'lvh.me' || window.location.hostname === 'stone.giraffe.life') { + console.log('launching in test mode') + sdk.init({ env: "test" }) + } + else { + sdk.init({ env: "production" }) + } app.bind() app.build() diff --git a/StoneIsland/www/js/lib/products/filters/SizeFilter.js b/StoneIsland/www/js/lib/products/filters/SizeFilter.js index ef5ce789..6efcdeec 100644 --- a/StoneIsland/www/js/lib/products/filters/SizeFilter.js +++ b/StoneIsland/www/js/lib/products/filters/SizeFilter.js @@ -19,7 +19,6 @@ var SizeFilter = View.extend({ sizes.sort(function(a,b){ return a.Id - b.Id }) - console.log(sizes) var cats = sizes.map(function(cat){ return { id: cat.Id, -- cgit v1.2.3-70-g09d2