Skip to content

Instantly share code, notes, and snippets.

@Contejious
Created March 5, 2012 15:11
Show Gist options
  • Save Contejious/1978684 to your computer and use it in GitHub Desktop.
Save Contejious/1978684 to your computer and use it in GitHub Desktop.
GetConfig
function getConfigVal(key, defaultValue){
if(localStorage.getItem('fixtureMode') === true){
var localStorageValue = localStorage.getItem(key);
if(localStorageValue == null){
return defaultValue;
}
else{
return localStorageValue;
}
}
}
env.suiteApi = getConfigVal('suiteApi', '/');
env.suiteWeb = getConfigVal('suiteWeb', '/');
env.fixtureMode = getConfigVal('fixtureMode', false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment