Created
March 5, 2012 15:11
-
-
Save Contejious/1978684 to your computer and use it in GitHub Desktop.
GetConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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