How do I write a swtich for the following conditional?
If the url contains \"foo\", then settings.base_url is \"bar\".
The following is achi
Just use the location.host property
switch (location.host) { case "xxx.local": settings = ... break; case "xxx.dev.yyy.com": settings = ... break; }