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 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'StoneIsland/www/js/index.js') 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() -- cgit v1.2.3-70-g09d2